Closed ab10002 closed 1 year ago
Did you removed the devices before using this branch?
Did you removed the devices before using this branch?
Sure
sorry, too rapid in copy paste, my mistake. Can you try again? All 3 errors should be fixed
sorry, too rapid in copy paste, my mistake. Can you try again? All 3 errors should be fixed 🤣 okay the log:
2022-09-16 14:38:23.234 Error: Tahoma: Call to function 'onCommand' failed, exception details: 2022-09-16 14:38:23.236 Error: Tahoma: Traceback (most recent call last): 2022-09-16 14:38:23.236 Error: Tahoma: File "/home/pi/domoticz/plugins/somfy-AddNewRollerShutter/plugin.py", line 458, in onCommand 2022-09-16 14:38:23.236 Error: Tahoma: _plugin.onCommand(DeviceId, Unit, Command, Level, Color) 2022-09-16 14:38:23.236 Error: Tahoma: File "/home/pi/domoticz/plugins/somfy-AddNewRollerShutter/plugin.py", line 189, in onCommand 2022-09-16 14:38:23.236 Error: Tahoma: event_list = self.tahoma.tahoma_command(self.json_data) 2022-09-16 14:38:23.236 Error: Tahoma: File "/home/pi/domoticz/plugins/somfy-AddNewRollerShutter/tahoma.py", line 104, in tahoma_command 2022-09-16 14:38:23.236 Error: Tahoma: event_list = self.get_events() 2022-09-16 14:38:23.236 Error: Tahoma: File "/home/pi/domoticz/plugins/somfy-AddNewRollerShutter/tahoma.py", line 236, in get_events 2022-09-16 14:38:23.236 Error: Tahoma: logging.debug("get events response: status '" + str(response.status_code) + "' response body: '"+str(response.json())+"'") 2022-09-16 14:38:23.236 Error: Tahoma: File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json 2022-09-16 14:38:23.236 Error: Tahoma: return complexjson.loads(self.text, **kwargs) 2022-09-16 14:38:23.236 Error: Tahoma: File "/usr/lib/python3.7/json/__init__.py", line 348, in loads 2022-09-16 14:38:23.236 Error: Tahoma: return _default_decoder.decode(s) 2022-09-16 14:38:23.236 Error: Tahoma: File "/usr/lib/python3.7/json/decoder.py", line 337, in decode 2022-09-16 14:38:23.236 Error: Tahoma: obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 2022-09-16 14:38:23.236 Error: Tahoma: File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode 2022-09-16 14:38:23.236 Error: Tahoma: raise JSONDecodeError("Expecting value", s, err.value) from None 2022-09-16 14:38:23.236 Error: Tahoma: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Read this in plugin.py... if lumstatus_l: #assuming for now that the luminance sensor is always a single unit in a device
I have allready 2 sensors...
Well at least this is a new error, so the previous 3 are indeed gone....... This error is a bit more tricky since the response data from the Somfy web api is different than expected, resulting in this json decoding error. I've left out the decoding now since it was only logging. Can you give it a try?
With the remark I mean the following: Somfy makes devies. Some of those have 2 (or more?) 'things' you can do with them: the blinds have both an up/down as well as an open/close movement. Here, you need then 2 units for 1 device. I am presuming, that this is not the case for this sensor (would be nice if you can provide a link to a website that shows it). It is probably 2x a device with 1 function (detect luminance).
Btw a short note on what you did that caused the error is usually also helpful (like: I tried to open my roller shutters).
Tested and NO errors! New devices are created and everything perfect👍
I'v 2 pieces from these: https://www.gossoutdoor.co.uk/somfy-sensors/sunis-wirefree-ii-io
Tested: