claudegel / sinope-130

Neviweb130 custom component for Home Assistant to manage devices connected via a GT130 and wifi devices from Sinopé

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Try to another second thermostat TH1400WF

dieuvolkanos opened this issue · comments

Bonjour Claude,

I'm trying to add a second thermostat TH1400WF without success. I already have a TH1124WF. But I can't see the TH1400WF in the entities list

In the code I see that supposed to support this version. model 739. Tried to reinstall the HACS to see it without success.

Here the debug file.
2022-02-28 18:17:31 DEBUG (MainThread) [custom_components.neviweb130.climate] Setting up neviweb130 climate TH1400WF: {'id': 268636, 'identifier': '246f28fffea7cf6c', 'name': 'TH1400WF', 'family': '739', 'signature': {'model': 739, 'modelCfg': 0, 'softBuildCfg': 0, 'softVersion': {'major': 2, 'middle': 3, 'minor': 7}, 'hardRev': 0, 'protocol': 'sinopcom'}, 'location$id': 48664, 'parentDevice$id': None, 'group$id': 103987, 'orderIdx': 0, 'sku': 'TH1400WF', 'vendor': 'Sinopé', 'url_en': None, 'url_fr': None}

2022-02-28 18:32:18 DEBUG (SyncWorker_1) [custom_components.neviweb130.climate] Updating neviweb130 climate TH1400WF (1.071 sec): {'roomSetpoint': 5, 'outputPercentDisplay': {'percent': 0, 'sourceType': 'heating'}, 'roomTemperature': {'value': 7.96, 'error': None}, 'roomSetpointMin': 5, 'roomSetpointMax': 30, 'timeFormat': '24h', 'temperatureFormat': 'celsius', 'drStatus': {'drActive': 'off', 'optOut': 'off', 'setpoint': 'off', 'powerAbsolute': 'off', 'powerRelative': 'off'}, 'drSetpoint': {'status': 'off', 'value': None}, 'loadWattOutput1': 0, 'loadWatt': 0, 'wifiRssi': -68, 'keyboardLock': 'unlock', 'config2ndDisplay': 'default', 'setpointMode': 'manual', 'occupancyMode': 'none', 'backlightAutoDim': 'alwaysOn', 'roomTemperatureDisplay': {'value': 8, 'status': 'on'}, 'earlyStartCfg': 'off', 'roomSetpointAway': 5, 'pumpProtection': {'status': 'off'}, 'floorMaxAirTemperature': {'value': None, 'status': 'off'}, 'airFloorMode': 'roomByFloor', 'floorSensorType': '10k', 'auxCycleLength': 0, 'cycleLength': 900, 'floorLimitHigh': {'value': None, 'status': 'off'}, 'floorLimitLow': {'value': None, 'status': 'off'}}

[configuration.yaml]
neviweb130:
username: !secret thermostat_user
password: !secret thermostat_password
scan_interval: 300
homekit_mode: False

Thanks
DieuVolkanos

Hi, with the log you have, the thermostat is detected and updated in neviweb130. Do you see it in the dev-tool section? should be called climate.neviweb130_climate_TH1400WF.

You don't need to add homekit_mode: False in your configuration.yaml if you don't use homekit. it is set to False by default.

Do you have two TH1400WF ? if yes you need to give a different name in neviweb or I think that HA will create climate.neviweb130_climate_TH1400WF and
climate.neviweb130_climate_TH1400WF_1 to differentiate them. Better to give a specific name in Neviweb so they will have different name in HA

Not in the devtool section.
No problem for the homekit, it's a rest of test.

I have just two thermostat. TH1124WF and the new one TH1400WF. Do I need to put another config parameter in the configuration.yml for the second thermostat?

[configuration.yaml]
neviweb130:
username: !secret thermostat_user
password: !secret thermostat_password
scan_interval: 300

No your configuration is OK. Neviweb130 will pick all device in the Neviweb location where you set your wifi devices in Neviweb. The proof is that in your log you can see [custom_components.neviweb130.climate] Setting up neviweb130 climate TH1400WF:...
This mean that neviweb130 found it from neviweb data received.
Then the log say [custom_components.neviweb130.climate] Updating neviweb130 climate TH1400WF...
This will be performed every scan_interval time which is 300 seconds.
You should see it in dev tool unless you have another error in your log for this thermostat

Check in your log for a line with the word ERROR if any

2022-02-28 21:15:38 DEBUG (SyncWorker_2) [custom_components.neviweb130] Login response: {'user': {'id': 39170, 'role': 'owner', 'email': 'email@email.com', 'locale': 'en', 'format': {'time': '24', 'temperature': 'c'}, 'communications': {'pushNotification': 'alert,maintenance'}, 'initialized': 1}, 'account': {'id': 39366, 'interface': 'neviweb', 'type': 'free', 'category': None, 'betaLevel': None}, 'iat': 1646100938595, 'session': '74e340j3f9nc', 'refreshToken': 'rfefe46333a5bferf0'}
2022-02-28 21:15:38 DEBUG (SyncWorker_2) [custom_components.neviweb130] Successfully logged in
2022-02-28 21:15:38 DEBUG (SyncWorker_2) [custom_components.neviweb130] Number of networks found on Neviweb: 1
2022-02-28 21:15:38 DEBUG (SyncWorker_2) [custom_components.neviweb130] Selecting Maison as network
2022-02-28 21:15:39 DEBUG (SyncWorker_2) [custom_components.neviweb130] Received gateway data: [{'id': 268676, 'identifier': 'ac67b2fffe220ec4', 'name': 'Thermostat', 'family': '1124-WF', 'signature': {'model': 1510, 'modelCfg': 1, 'softBuildCfg': 0, 'softVersion': {'major': 2, 'middle': 3, 'minor': 9}, 'hardRev': 0}, 'location$id': 48664, 'parentDevice$id': None, 'group$id': 102160, 'orderIdx': 0, 'sku': 'TH1124WF', 'vendor': 'Sinopé', 'url_en': None, 'url_fr': None}, {'id': 268636, 'identifier': '246f28fffea7cf6c', 'name': 'Thermostat Garage', 'family': '739', 'signature': {'model': 739, 'modelCfg': 0, 'softBuildCfg': 0, 'softVersion': {'major': 2, 'middle': 3, 'minor': 7}, 'hardRev': 0}, 'location$id': 48664, 'parentDevice$id': None, 'group$id': 103987, 'orderIdx': 0, 'sku': 'TH1400WF', 'vendor': 'Sinopé', 'url_en': None, 'url_fr': None}]
2022-02-28 21:15:39 DEBUG (SyncWorker_2) [custom_components.neviweb130] Received signature data: {'signature': {'model': 1510, 'modelCfg': 1, 'softBuildCfg': 0, 'softVersion': {'major': 2, 'middle': 3, 'minor': 9}, 'hardRev': 0, 'protocol': 'sinopcom'}}
2022-02-28 21:15:39 DEBUG (SyncWorker_2) [custom_components.neviweb130] Received signature data: {'signature': {'model': 739, 'modelCfg': 0, 'softBuildCfg': 0, 'softVersion': {'major': 2, 'middle': 3, 'minor': 7}, 'hardRev': 0, 'protocol': 'sinopcom'}}
2022-02-28 21:15:39 DEBUG (SyncWorker_2) [custom_components.neviweb130] Setting scan interval to: 0:05:00
2022-02-28 21:15:39 DEBUG (SyncWorker_2) [custom_components.neviweb130] Setting Homekit mode to: False
2022-02-28 21:15:40 DEBUG (MainThread) [custom_components.neviweb130.climate] Setting up neviweb130 climate Thermostat: {'id': 268676, 'identifier': 'ac67b2fffe220ec4', 'name': 'Thermostat', 'family': '1124-WF', 'signature': {'model': 1510, 'modelCfg': 1, 'softBuildCfg': 0, 'softVersion': {'major': 2, 'middle': 3, 'minor': 9}, 'hardRev': 0, 'protocol': 'sinopcom'}, 'location$id': 48664, 'parentDevice$id': None, 'group$id': 102160, 'orderIdx': 0, 'sku': 'TH1124WF', 'vendor': 'Sinopé', 'url_en': None, 'url_fr': None}
2022-02-28 21:15:40 DEBUG (MainThread) [custom_components.neviweb130.climate] Setting up neviweb130 climate Thermostat Garage: {'id': 268636, 'identifier': '246f28fffea7cf6c', 'name': 'Thermostat Garage', 'family': '739', 'signature': {'model': 739, 'modelCfg': 0, 'softBuildCfg': 0, 'softVersion': {'major': 2, 'middle': 3, 'minor': 7}, 'hardRev': 0, 'protocol': 'sinopcom'}, 'location$id': 48664, 'parentDevice$id': None, 'group$id': 103987, 'orderIdx': 0, 'sku': 'TH1400WF', 'vendor': 'Sinopé', 'url_en': None, 'url_fr': None}
2022-02-28 21:15:42 DEBUG (SyncWorker_1) [custom_components.neviweb130.climate] Updating neviweb130 climate Thermostat (0.94 sec): {'roomSetpoint': 17.5, 'outputPercentDisplay': {'percent': 0, 'sourceType': 'heating'}, 'roomTemperature': {'value': 19.28, 'error': None}, 'roomSetpointMin': 15, 'roomSetpointMax': 25, 'timeFormat': '24h', 'temperatureFormat': 'celsius', 'drStatus': {'drActive': 'off', 'optOut': 'off', 'setpoint': 'off', 'powerAbsolute': 'off', 'powerRelative': 'off'}, 'drSetpoint': {'status': 'off', 'value': None}, 'loadWattOutput1': 1913, 'loadWatt': 1913, 'wifiRssi': -39, 'keyboardLock': 'unlock', 'config2ndDisplay': 'default', 'setpointMode': 'autoBypass', 'occupancyMode': 'home', 'backlightAutoDim': 'alwaysOn', 'roomTemperatureDisplay': {'value': 19.5, 'status': 'on'}, 'earlyStartCfg': 'off', 'roomSetpointAway': 18}
2022-02-28 21:15:43 DEBUG (SyncWorker_6) [custom_components.neviweb130.climate] Updating neviweb130 climate Thermostat Garage (1.256 sec): {'roomSetpoint': 5, 'outputPercentDisplay': {'percent': 20, 'sourceType': 'heating'}, 'roomTemperature': {'value': 4.61, 'error': None}, 'roomSetpointMin': 5, 'roomSetpointMax': 30, 'timeFormat': '24h', 'temperatureFormat': 'celsius', 'drStatus': {'drActive': 'off', 'optOut': 'off', 'setpoint': 'off', 'powerAbsolute': 'off', 'powerRelative': 'off'}, 'drSetpoint': {'status': 'off', 'value': None}, 'loadWattOutput1': 0, 'loadWatt': 0, 'wifiRssi': -65, 'keyboardLock': 'unlock', 'config2ndDisplay': 'default', 'setpointMode': 'manual', 'occupancyMode': 'none', 'backlightAutoDim': 'alwaysOn', 'roomTemperatureDisplay': {'value': 4.5, 'status': 'on'}, 'earlyStartCfg': 'off', 'roomSetpointAway': 5, 'pumpProtection': {'status': 'off'}, 'floorMaxAirTemperature': {'value': None, 'status': 'off'}, 'airFloorMode': 'roomByFloor', 'floorSensorType': '10k', 'auxCycleLength': 0, 'cycleLength': 900, 'floorLimitHigh': {'value': None, 'status': 'off'}, 'floorLimitLow': {'value': None, 'status': 'off'}}
2022-02-28 21:15:43 ERROR (MainThread) [homeassistant.components.climate] neviweb130: Error on device update!
2022-02-28 21:20:44 DEBUG (SyncWorker_9) [custom_components.neviweb130.climate] Updating neviweb130 climate Thermostat (0.82 sec): {'roomSetpoint': 17.5, 'outputPercentDisplay': {'percent': 0, 'sourceType': 'heating'}, 'roomTemperature': {'value': 19.21, 'error': None}, 'roomSetpointMin': 15, 'roomSetpointMax': 25, 'timeFormat': '24h', 'temperatureFormat': 'celsius', 'drStatus': {'drActive': 'off', 'optOut': 'off', 'setpoint': 'off', 'powerAbsolute': 'off', 'powerRelative': 'off'}, 'drSetpoint': {'status': 'off', 'value': None}, 'loadWattOutput1': 1913, 'loadWatt': 1913, 'wifiRssi': -40, 'keyboardLock': 'unlock', 'config2ndDisplay': 'default', 'setpointMode': 'autoBypass', 'occupancyMode': 'home', 'backlightAutoDim': 'alwaysOn', 'roomTemperatureDisplay': {'value': 19, 'status': 'on'}, 'earlyStartCfg': 'off', 'roomSetpointAway': 18}

So your thermostat is called thermostat garage. Then it should be found as climate.neviweb130_climate_thermostat_garage.
What come just after the error line Error on device update!

Yes that's his name and not climate.neviweb130...

Sorry found more info:

2022-02-28 21:15:43 ERROR (MainThread) [homeassistant.components.climate] neviweb130: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 718, in async_device_update
await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/neviweb130/climate.py", line 668, in update
self._pump_protec_duration = device_data[ATTR_PUMP_PROTEC]["duration"]
KeyError: 'duration'

Fine it is the «duration» attribute that doesn't exist for your thermostat or Neviweb removed it for the low wifi thermostats.

in Climate.py just comment out line 668
self._pump_protec_duration = device_data[ATTR_PUMP_PROTEC]["duration"]
to become
# self._pump_protec_duration = device_data[ATTR_PUMP_PROTEC]["duration"]
Or possibly when pump protection status is off then Neviweb don't send the ather attribute, pumpprotect duration
I'll create a new branch wifi-thermostat and make a fix in few minutes

Could you try to put pump protection to «on» in Neviweb for your thermostat to see if the duration attribute will appear ?

After I comment line 668, I have this error, so I comment 669 too and now I see the entity

2022-02-28 22:07:26 ERROR (MainThread) [homeassistant.components.climate] neviweb130: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 718, in async_device_update
await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/neviweb130/climate.py", line 669, in update
self._pump_protec_freq = device_data[ATTR_PUMP_PROTEC]["frequency"]

yes you have to comment this line also because it is also a ATTR_PUMP_PROTEC.
What I need to know is if you put pump protection to «on» does those two attributes will show up. Please change pump protection to «on» in Neviweb to test.
I've setup a new branch wifi-thermostat. you can try climate.py in that branch

I modify pump protection to on and off and see nothing in the log

when you put it to «on» then restart HA and check the line Updating neviweb130 climate Thermostat Garage to see if you will get only pumpProtection': {'status': 'off'} or if you will get more attribute for pumpProtection like
pumpProtection': {'status': 'off', 'duration': xx, 'frequency': xx },

You can test the fix in branch wifi-thermostat before if you want

Tout à l'air fonctionnel,

Merci!!!!

Give me 1 min to test the "on"

Can you test with pumpProtection to on in Neviweb ? I need to know if those two attributes will show up to make the final fix

When pump protection is on, send me the line Updating neviweb130 climate Thermostat Garage.... so I can check if those attributes are there or I will have to remove them.

Pump protection on and restart
2022-02-28 22:29:19 DEBUG (SyncWorker_8) [custom_components.neviweb130.climate] Updating neviweb130 climate Thermostat Garage (1.094 sec): {'roomSetpoint': 5, 'outputPercentDisplay': {'percent': 0, 'sourceType': 'heating'}, 'roomTemperature': {'value': 4.67, 'error': None}, 'roomSetpointMin': 5, 'roomSetpointMax': 30, 'timeFormat': '24h', 'temperatureFormat': 'celsius', 'drStatus': {'drActive': 'off', 'optOut': 'off', 'setpoint': 'off', 'powerAbsolute': 'off', 'powerRelative': 'off'}, 'drSetpoint': {'status': 'off', 'value': None}, 'loadWattOutput1': 0, 'loadWatt': 0, 'wifiRssi': -66, 'keyboardLock': 'unlock', 'config2ndDisplay': 'default', 'setpointMode': 'manual', 'occupancyMode': 'none', 'backlightAutoDim': 'alwaysOn', 'roomTemperatureDisplay': {'value': 4.5, 'status': 'on'}, 'earlyStartCfg': 'off', 'roomSetpointAway': 5, 'pumpProtection': {'status': 'on', 'frequency': 1, 'duration': 60}, 'floorMaxAirTemperature': {'value': None, 'status': 'off'}, 'airFloorMode': 'roomByFloor', 'floorSensorType': '10k', 'auxCycleLength': 0, 'cycleLength': 900, 'floorLimitHigh': {'value': None, 'status': 'off'}, 'floorLimitLow': {'value': None, 'status': 'off'}}

Pump protection off and restart
2022-02-28 22:34:33 DEBUG (SyncWorker_0) [custom_components.neviweb130.climate] Updating neviweb130 climate Thermostat Garage (1.126 sec): {'roomSetpoint': 5, 'outputPercentDisplay': {'percent': 0, 'sourceType': 'heating'}, 'roomTemperature': {'value': 5.22, 'error': None}, 'roomSetpointMin': 5, 'roomSetpointMax': 30, 'timeFormat': '24h', 'temperatureFormat': 'celsius', 'drStatus': {'drActive': 'off', 'optOut': 'off', 'setpoint': 'off', 'powerAbsolute': 'off', 'powerRelative': 'off'}, 'drSetpoint': {'status': 'off', 'value': None}, 'loadWattOutput1': 0, 'loadWatt': 0, 'wifiRssi': -67, 'keyboardLock': 'unlock', 'config2ndDisplay': 'default', 'setpointMode': 'manual', 'occupancyMode': 'none', 'backlightAutoDim': 'alwaysOn', 'roomTemperatureDisplay': {'value': 5, 'status': 'on'}, 'earlyStartCfg': 'off', 'roomSetpointAway': 5, 'pumpProtection': {'status': 'off'}, 'floorMaxAirTemperature': {'value': None, 'status': 'off'}, 'airFloorMode': 'roomByFloor', 'floorSensorType': '10k', 'auxCycleLength': 0, 'cycleLength': 900, 'floorLimitHigh': {'value': None, 'status': 'off'}, 'floorLimitLow': {'value': None, 'status': 'off'}}

that's it 'pumpProtection': {'status': 'on', 'frequency': 1, 'duration': 60},
pumpProtection': {'status': 'off'}
So my fix is OK in wifi-thermostats. I'll make a new release
Thank you.

Thanks to you!

I've published new release 1.2.1 with the fix
Thank you

I'm doing a cleanup in auxiliary heat code for TH1400ZB and TH1400WF.

can you check in dev console of firefox or Chrome, when you are in Neviweb for your TH1400ZB what are the attributes sent when you change the value for auxiliary output cycle ?
is it just «auxCycleLength» that goes from 0 to 300 or more, and is there an on or off value.
Finally can you tell me what are the options available for the auxiliary output cycle for the drop down menu in the TH1400WF Neviweb options.

Thank you