Closed sb37 closed 1 year ago
I've noticed this as well, will try to look in to it as soon as I have time
@sb37 , Should be fixed for now
Really fast! Good job!
Change of status of the appliance is updated, but sending commands does not work When calling _send_command the plugin tries to use APPLIANCE_DATA_URL which is not defined. I've changed that to API_URL (just a wild guess) in the code but to no avail.
The log says
2023-06-23 11:58:58.079 Error: Luchtfilter: Call to function 'onCommand' failed, exception details:
2023-06-23 11:58:58.080 Error: Luchtfilter: Traceback (most recent call last):
2023-06-23 11:58:58.080 Error: Luchtfilter: File "/srv/dev-disk-by-uuid-dbd55865-8c65-413f-87a6-d41cf998826d/int/domoticz/domoticz/plugins/domoticz-wellbeing-plugin/plugin.py", line 301, in onCommand
2023-06-23 11:58:58.080 Error: Luchtfilter: _plugin.onCommand(Unit, Command, Level, Color)
2023-06-23 11:58:58.080 Error: Luchtfilter: File "/srv/dev-disk-by-uuid-dbd55865-8c65-413f-87a6-d41cf998826d/int/domoticz/domoticz/plugins/domoticz-wellbeing-plugin/plugin.py", line 274, in onCommand
2023-06-23 11:58:58.080 Error: Luchtfilter: self._send_command(access_token, Devices[Unit].Options['pncId'], cmd)
2023-06-23 11:58:58.080 Error: Luchtfilter: File "/srv/dev-disk-by-uuid-dbd55865-8c65-413f-87a6-d41cf998826d/int/domoticz/domoticz/plugins/domoticz-wellbeing-plugin/plugin.py", line 156, in _send_command
2023-06-23 11:58:58.080 Error: Luchtfilter: self.api_wrapper("put", f"{APPLIANCE_DATA_URL}/{pnc_id}/Commands", data=command, headers=headers)
2023-06-23 11:58:58.080 Error: Luchtfilter: NameError: name 'APPLIANCE_DATA_URL' is not defined
Oops, I was too quick pushing the fix, didn't touched the send command part. Should be fixed too
Fixed
I can confirm the fix. Works like a charm. Thanks for fixing.
It seems this perfect plugin is affected as well. Have a look at the homeassistent integration
ha wellbeing issue