Einstein42 / udi-ecobee-poly

Ecobee Poly
MIT License
5 stars 2 forks source link

Turn off weather crash #48

Open jimboca opened 4 years ago

jimboca commented 4 years ago

If Nodeserver is added, the weather monitoring is turned off, it crashes:

2019-11-10 19:15:12,229 [Controller] [ERROR] _parseInput: failed t511889241737.runCmd(GV9) int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.6/site-packages/polyinterface/polyinterface.py", line 788, in _parseInput
    self.nodes[input[key]['address']].runCmd(input[key])
  File "/home/pi/.local/lib/python3.6/site-packages/polyinterface/polyinterface.py", line 691, in runCmd
    fun(self, command)
  File "/home/pi/development/udi-ecobee-poly/node_types.py", line 734, in cmdSetDoWeather
    if int(self.getDriver(cmd['cmd'])) == value:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Workaround is to restart so the driver is initialized, then it can be turned off.

jimboca commented 3 years ago
2020-12-25 19:34:12,859 [Controller] [ERROR] _parseInput: failed t411956665463.runCmd(GV9) 'dict' object has no attribute 'nodes'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 771, in _parseInput
    self.nodes[input[key]['address']].runCmd(input[key])
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 658, in runCmd
    fun(self, command)
  File "/app/nodeserver/nodes/Thermostat.py", line 620, in cmdSetDoWeather
    if int(self.getDriver(cmd['cmd'])) == value:
  File "/app/nodeserver/nodes/Thermostat.py", line 54, in getDriver
    self.driver[driver] = super(Thermostat, self).getDriver(driver)
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 664, in getDriver
    return self.controller.polyConfig.nodes[self.address][dv].value or None
AttributeError: 'dict' object has no attribute 'nodes'
jimboca commented 3 years ago

This seems to be a pgc python interface issue, it works on local but fails to get the driver value on pgc, so will wait for pg3.