I downloaded another PowerView version from Github and have been testing it for a couple of days. Here are some comments - not in any particular order. I will continue to investigate more.
1. It is much slower. I think because of the ‘?refresh=true’ in the powerview2.py shade procedure. I see that this is apparently necessary to accurately retrieve the shade position.
2. The slower response causes a timeout from time to time.
3. The get “Action Group -> Set Shade Position -> Configure Set Shade Position -> Lookup Current Position? -> Current Position” works correctly now - probably because of the ?refresh=true setting. I tried without the refresh option and it did NOT return the correct shade position. Maybe this setting could be set just for this command (to improve overall performance).
4. The math error is gone. The shades open and CLOSE now correctly.
5. I have one shade that needs to be reprogrammed to the hub (it works correctly with the remote control). I'm leaving this way for the testing. There should be some notification when no data is retrieved - probably in the procedure shade:
def shade(self, hubHostname, shadeId, room=False) -> dict:
shadeUrl = 'http://%s/api/shades/%s?refresh=true' % (hubHostname, shadeId)
data = self.get(shadeUrl)
if not data:
*** New *** indigo.server.log('shade ****** No data for shade, url: %s.' % shadeUrl) *** shade name would be better than url, also could be a warning or error
return {}
data = data.pop('shade')
etc
6. It may take a minute or more to see any shade start moving when a call is made to open or close ALL the window blinds (like I’m leaving the house or coming home). I don’t know if its Indigo or PowerView.
Sometimes it take 30 seconds to a minute just the for PowerView configure dialog to come up. When that happens the cursor spins.
7. I get the following stack trace when a call is made to open or close ALL the window blinds. It happens on one random shade. It would be a different one each time. It may be a time out problem. I don’t get this when I comment out the ?refresh=true setting. The behavior is repeatable but the particular shade may be different. I have 16 shades in this experiment. There is one more - a vertical shade - that I’ll add and test later.
PowerView Error Error fetching
http://10.0.1.219/api/shades/64014?refresh=trueTraceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/IndigoPluginHost3.app/Contents/Resources/PlugIns/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/IndigoPluginHost3.app/Contents/Resources/PlugIns/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/IndigoPluginHost3.app/Contents/Resources/PlugIns/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/IndigoPluginHost3.app/Contents/Resources/PlugIns/requests/adapters.py", line 440, in send
resp = conn.urlopen(
Etc.