Closed MikeyMan83 closed 1 year ago
Also; i'm not seeing the devices in the MQTT output anymore... ?
Hey @MikeyMan83 this is a relatively old issue, can you check if it still occurs on the latest version?
@JanJaapKo It's not fully clean. Just did a git pull, and a restart:
2023-01-10 16:45:49.725 Error: Somfy zonneschermen: Call to function 'onStart' failed, exception details:
2023-01-10 16:45:49.728 Error: Somfy zonneschermen: Traceback (most recent call last):
2023-01-10 16:45:49.728 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 561, in onStart
2023-01-10 16:45:49.728 Error: Somfy zonneschermen: _plugin.onStart()
2023-01-10 16:45:49.728 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 174, in onStart
2023-01-10 16:45:49.728 Error: Somfy zonneschermen: filtered_devices = self.tahoma.get_devices()
2023-01-10 16:45:49.729 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/tahoma_local.py", line 188, in get_devices
2023-01-10 16:45:49.729 Error: Somfy zonneschermen: utils.handle_response(response, "get devices")
2023-01-10 16:45:49.729 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/utils.py", line 84, in handle_response
2023-01-10 16:45:49.729 Error: Somfy zonneschermen: raise exceptions.TahomaException("failed request during "+ action + ", check credentials: " + str(response.status_code))
2023-01-10 16:45:49.729 Error: Somfy zonneschermen: exceptions.TahomaException: failed request during get devices, check credentials: 401
It seems to be working though.
OK. If the error keeps coming, please make a full restart and send me also somfy.log.
After a restart the errors regularly come back:
2023-01-11 07:19:24.818 Error: Somfy zonneschermen: Call to function 'onStart' failed, exception details:
2023-01-11 07:19:24.829 Error: Somfy zonneschermen: Traceback (most recent call last):
2023-01-11 07:19:24.829 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 561, in onStart
2023-01-11 07:19:24.829 Error: Somfy zonneschermen: _plugin.onStart()
2023-01-11 07:19:24.829 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 174, in onStart
2023-01-11 07:19:24.830 Error: Somfy zonneschermen: filtered_devices = self.tahoma.get_devices()
2023-01-11 07:19:24.830 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/tahoma_local.py", line 188, in get_devices
2023-01-11 07:19:24.830 Error: Somfy zonneschermen: utils.handle_response(response, "get devices")
2023-01-11 07:19:24.830 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/utils.py", line 84, in handle_response
2023-01-11 07:19:24.830 Error: Somfy zonneschermen: raise exceptions.TahomaException("failed request during "+ action + ", check credentials: " + str(response.status_code))
2023-01-11 07:19:24.830 Error: Somfy zonneschermen: exceptions.TahomaException: failed request during get devices, check credentials: 401
2023-01-11 08:37:08.625 Error: SQL Query("SELECT nValue, sValue FROM Preferences WHERE (Key='SensorTimeout')") : no more rows available
Log file: somfy.log
@JanJaapKo anything useful in the logs?
You need to enable debug logging, now there is not enough info. Seems like an error at every restart of the plugin so should be easy enough to reproduce.
@JanJaapKo Took a while, since i had several issues after updating to bullseye... But here you are: somfy.log
Some other errors this time...
BTW; rather huge amount of logging. Today alone was 120mb :X
Well I don't see any errors in that log file?
And when you are just running normally, then you can switch off debug logging, that will save a lot of log lines.......
That's strange... I do see errors in domoticz:
2023-01-17 07:35:02.944 Error: Somfy zonneschermen: Update to 'UnitEx' failed to update any DeviceStatus records for key 38/io://2017-8871-5701/14384853/1
2023-01-17 08:05:04.344 Error: Somfy zonneschermen: Update to 'UnitEx' failed to update any DeviceStatus records for key 38/io://2017-8871-5701/14384853/1
2023-01-17 13:45:02.629 Error: Somfy zonneschermen: Update to 'UnitEx' failed to update any DeviceStatus records for key 38/io://2017-8871-5701/14384853/1
2023-01-17 15:25:02.976 Error: Somfy zonneschermen: Update to 'UnitEx' failed to update any DeviceStatus records for key 38/io://2017-8871-5701/14384853/1
2023-01-17 16:50:02.094 Error: Somfy zonneschermen: Update to 'UnitEx' failed to update any DeviceStatus records for key 38/io://2017-8871-5701/14384853/1
Yes but that was not included in the somfy log, as the error is not generated in the plugin (all system/domoticz errors only appear in the domoticz log). Let me have a look.
OK, is it always for the luminance sensor? And at every update or just once in a while?
Think it's always the same id.
Does get updated a lot:
2023-01-17 22:10:19.355 Status: Somfy zonneschermen: Updating device: Verlichtingssensor achterkant
2023-01-17 22:10:39.326 Status: Somfy zonneschermen: Updating device: Verlichtingssensor achterkant
2023-01-17 22:10:59.319 Status: Somfy zonneschermen: Updating device: Verlichtingssensor achterkant
2023-01-17 22:11:19.364 Status: Somfy zonneschermen: Updating device: Verlichtingssensor achterkant
Yes I know. Still trying to find a way to avoid it if the value hasn't changed but one of my Pi's broke this morning so I'm fixing that one in prarallel (but with slightly more prio ;) )
OK I pushed a version were there is a check on if the current value is not equal to the new value.
But when looking into the code, there was already something to prevent updating to the same state, so I added a new logline. So could you please be so kind to run it a while in debug mode?
@JanJaapKo of course! Small effort 😉
Got some different errors now:
2023-01-19 10:57:22.309 Error: Somfy zonneschermen: KeyError: 0
2023-01-19 10:57:42.294 Error: Somfy zonneschermen: Call to function 'onHeartbeat' failed, exception details:
2023-01-19 10:57:42.295 Error: Somfy zonneschermen: Traceback (most recent call last):
2023-01-19 10:57:42.295 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 611, in onHeartbeat
2023-01-19 10:57:42.295 Error: Somfy zonneschermen: _plugin.onHeartbeat()
2023-01-19 10:57:42.295 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 308, in onHeartbeat
2023-01-19 10:57:42.295 Error: Somfy zonneschermen: self.update_devices_status(utils.filter_states(filtered_devices))
2023-01-19 10:57:42.295 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 436, in update_devices_status
2023-01-19 10:57:42.295 Error: Somfy zonneschermen: UpdateDevice(dev, status_num, nValue,sValue)
2023-01-19 10:57:42.296 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 688, in UpdateDevice
2023-01-19 10:57:42.296 Error: Somfy zonneschermen: logging.debug("Updating device "+Devices[Device].Units[Unit].Name+ " with current sValue '"+Devices[Device].Units[Unit].sValue+"' to '" +sValue+"'")
2023-01-19 10:57:42.296 Error: Somfy zonneschermen: KeyError: 0
2023-01-19 10:58:02.440 Error: Somfy zonneschermen: Call to function 'onHeartbeat' failed, exception details:
2023-01-19 10:58:02.441 Error: Somfy zonneschermen: Traceback (most recent call last):
2023-01-19 10:58:02.441 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 611, in onHeartbeat
2023-01-19 10:58:02.441 Error: Somfy zonneschermen: _plugin.onHeartbeat()
2023-01-19 10:58:02.441 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 308, in onHeartbeat
2023-01-19 10:58:02.441 Error: Somfy zonneschermen: self.update_devices_status(utils.filter_states(filtered_devices))
2023-01-19 10:58:02.441 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 436, in update_devices_status
2023-01-19 10:58:02.441 Error: Somfy zonneschermen: UpdateDevice(dev, status_num, nValue,sValue)
2023-01-19 10:58:02.442 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 688, in UpdateDevice
2023-01-19 10:58:02.442 Error: Somfy zonneschermen: logging.debug("Updating device "+Devices[Device].Units[Unit].Name+ " with current sValue '"+Devices[Device].Units[Unit].sValue+"' to '" +sValue+"'")
And the log
Oops, small copying error. Should be fixed now.
Check! Git pull should do the trick?
Now only one time error:
2023-01-20 09:48:17.730 Error: Somfy zonneschermen: Call to function 'onStart' failed, exception details:
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: Traceback (most recent call last):
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 575, in onStart
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: _plugin.onStart()
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/plugin.py", line 176, in onStart
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: filtered_devices = self.tahoma.get_devices()
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/tahoma_local.py", line 188, in get_devices
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: utils.handle_response(response, "get devices")
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: File "/home/pi/domoticz/plugins/somfy/utils.py", line 84, in handle_response
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: raise exceptions.TahomaException("failed request during "+ action + ", check credentials: " + str(response.status_code))
2023-01-20 09:48:17.738 Error: Somfy zonneschermen: exceptions.TahomaException: failed request during get devices, check credentials: 401
Hi!
Had some further authorisation errors. Thought i'd do a git pull first and see what happened.
The login issues are gone (for now), but i do see some errors occuring:
And the logfile: somfy.log
Hope it helps :)