Sinope Line Voltage Thermostats

That’s the next thing I need to implement. Sort of away mode and an off/auto/manual selector.
I’ll let you know when I have something to test.

Hi,

I just add the code for changing mode between off, manual and auto on my git and merge it into sinope.py for the thermostat. Lot of changes.

Please test and let me know. I’m working on adding temperature alarm and away mode code.

Christmass gif

1 Like

Thanks alot man! That will help turning off the heating in part of the house when our roomates are not home

Better now. I’ve added away mode.
Added possibility to set away mode for one selected device. Beware that if you set away mode for one device you won’t be able to change operation mode from Neviweb for that device. It’s locked. Neviweb allow only to switch all devices to away mode then all back to there previous operation mode. Via HA it’s now possible to change operation mode to away for one device but it is not possible to revert to previous operation mode. You have to set it back to whatever operation mode you want. Still investigating to see if it is possible to send command to revert to previous operation mode automatically. Need testing to see if it work to set all climate device from one group to away via automation. Let me know

I’ve also added some devices attributes. Min_Temp, Max_temp, Wattage and Alarm state if set on the device. They will be available for automation.

Hey Claude, did you make progress on this lately ? It will be great to access the Sinopé gateway locally instead of using Neviweb cloud.

Merci

Hi, didn’t had much time in December as it is my busy period. I hope to have something in January.In the mean time I did some improvement in the sinope.py

1 Like

Claude,

Testing your new version right now. I’ve got some issues.

  1. One thermostat seems to report an operation mode not supported by the new code. I suspect the Floor Heating Thermostat.
    Here is the error : 2019-01-02 09:36:49 WARNING (MainThread) [custom_components.climate.sinope] Operation mode 131 could not be mapped to hass

  2. I have the following error generated for each of my 10 thermostats :
    2019-01-02 09:37:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
    File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
    result = coro.send(None)
    File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py”, line 352, in _async_add_entity
    await entity.async_update_ha_state()
    File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 240, in async_update_ha_state
    device_attr = self.device_state_attributes
    File “/home/homeassistant/.homeassistant/custom_components/climate/sinope.py”, line 170, in device_state_attributes
    ‘wattage’: self._wattage,
    AttributeError: ‘SinopeThermostat’ object has no attribute ‘_wattage’

Also, I would like to make a suggestion. Could you rename the component “sinope.py” to a more related name, like “sinope_climate.py”.

Merci

Your first issue is because your thermostat is in “hold” mode (Temporary in neviweb) and it’s not currently supported. Btw, @claudegel I think operation modes are probably some kind of bit flags that you check using bitwise operations. Especially here with 131:

1000 0000 = 128 (hold_flag)
0000 0011 = 3 (auto_mode)

So the result of hold_flag bitwise OR auto_mode = 131.
But the real problem here is more Sinope not willing to give public access to is API documentation…!

Your second issue is because _wattage is not defined in SinopeThermostat __init__ function.

1 Like

I added the following line (last line) to the code to solve the issue with the wattage.

def __init__(self, sinope_data, device_id, name):
    """Initialize."""
    self.client_name = name
    self.client = sinope_data.client
    self.device_id = device_id
    self.sinope_data = sinope_data
    self._target_temp  = None
    self._cur_temp = None
    self._min_temp  = float(self.sinope_data.data[self.device_id]["info"]["tempMin"])
    self._max_temp  = float(self.sinope_data.data[self.device_id]["info"]["tempMax"])
    self._mode = None
    self._alarm = None
    self._operation_mode = None
    self._operation_list = [STATE_OFF, STATE_MANUAL, STATE_AUTO, STATE_NOT_HOME]
    self._state = None
    self._away = False
    self._wattage = None

But I don’t think you’ll get a value in this field. There is some code missing in the update function to initialize this. And from what I can see with my TH1120RF thermostat, there is no “wattage” attribute in the JSON response from neviweb each time a device is updated. The only device I can see wattage is my RM3250RF load controller and the attribute is called “powerWatt”.

Claude,

Just want to let you know that I tested the new version released a couple of hours ago and everything is fine. For your information, please update the README.md on Github to reflect the name of the new climate platform (sinope_climate).

Also, for those that will update the version, please note that all your thermostats will be given a new name in HA.
Ex: “climate.sinope_bathroom” becomes “climate.sinope_climate_bathroom”

Merci et bonne année !

I wasn’t able to connect yesterday. I correct all the error and changed the name for sinope.py to sinope_climate.py. Don’t forget to update your group.yaml and automation.yaml because the thermostat name are changed.

  • for the wattage it’s my fault. I just forgot to paste a line in my
    git. I’ve added it now and you will get the wattage measured by the
    thermostat.
  • for the mode = 131 it’s a standby mode that the sinope thermostat set
    when you manually change temperature setting or when you change it
    from HA. In that mode the thermostat will resume it’s auto
    mode at the next period if it was in auto mode before your change. In
    my code I use STATE_STANDBY translated to bypass.
  • there are two other mode for the thermostat: 129 = bypass freeze protect, 131 = bypass auto mode and 133= bypass away mode. In each case, setpoint will revert to freeze protect, auto or away mode temperature at the next program change. I don’t think that mode 129 will be used but it is possible that mode 133 show up in your log as I have set a warning in case of an unknown mode is set.
  • about the name of the thermostat, I know that HA will allow soon to set a short name for each devices. I’ts already available for the Sensibo thermostat to control your Clim. I should investigate on that.
    I’ll update the readme.md tonight.

Just to let you know I’ve also updated the sinope switch, dimmer and light component to add new modes. HA don’t offer as much support as for the climate component.

Happy new year and have fun with HA.

1 Like

I’ve added definition for the _wattage in the init. wattage is the actual load measured by the thermostat. For the RM3250RF there are wattage and powerwatt. Wattage is the reported load connected to the device and Powerwatt is the total actual load connected and consumed by the device. Both are reported by Neviweb when device are updated.

Actual response from Neviweb for the TH1120RF:

53124: {‘data’: {‘errorCode’: None, ‘mode’: 3, ‘setpoint’: ‘10.00’, ‘heatLevel’: 0, ‘rssi’: 42, ‘alarm’: 0, ‘temperature’: ‘14.68’}, ‘info’: {‘tempMin’: 5, ‘id’: 53124, ‘tempMax’: 20, ‘wattageOverride’: None, ‘family’: ‘1120-1’, ‘wattageError’: None, ‘type’: 10, ‘name’: ‘Spa’, ‘active’: 1, ‘wattage’: 2750, ‘gatewayId’: 8370, ‘model’: 1120}},

Actual response for the RM3200RF: (not sure for the RM3250RF)

54930: {‘info’: {‘id’: 54930, ‘wattage’: 28, ‘type’: 120, ‘applicationRef’: ‘other’, ‘wattageError’: None, ‘model’: 2505, ‘active’: 1, ‘family’: ‘2505’, ‘name’: ‘Prises ext.’, ‘gatewayId’: 8370}, ‘data’: {‘rssi’: 54, ‘mode’: 2, ‘powerWatt’: 28, ‘intensity’: 100, ‘alarm’: 0}},

if the RM3200RF is off then the Powerwatt is not reported or is set to 0. The wattage is alway reported on or off. So Powerwatt can be usefull for the RM devices and wattage is usefull for the thermostat.

1 Like

Hi,

there is also another info reported by the device. It is called RSSI which is the signal power between the device and the GT125. Could be useful to find the best place to put the GT125 so all devices connect perfectly and reliably or to find out why we drop a device from time to time. That was one of my bug at the beginning.

Ok I’ve added the possibility to rename the thermostat directly in the UI. Just click the setting icon in the upper right corner. This allow to have shorter name for each thermostat.
I’ve also added the same for Sinope dimmer, light and power switch.

I’ve found a strange bug in HA for the thermostats and I think it affect all other Sinope dimmer, light and switch. (or all my custom components.)

Just open one device to see the temperature graphic. If you leave it open for few second you will notice that, at each refresh, the graphic data change to show the data from another device. ex. open thermostat from bedroom, after few second, the graph change to show the kitchen temperature data and after it change again to show the basement dimmer data. It look like all data from the custom component are mixed.

Normally the page should show only the data for the selected device.

Plaese check and let me know if you see the same thing.

@claudegel I’ve been unable to reproduce this bug. I have not updated my sinope code though since November so it may be related to your recent changes. I am running 0.84.6 as well which I believe is the latest.

That’s strange because he problem not only affect sinope component but also my Sensibo component which is not a custom component. The graph keep changing to show thermostat or light or dimmer or sensibo on the same device history.
Do you use the device name translation to use smaller name to identify the devices. maybe this is the cause of that bug.
When I open a device, the graph data keep changing randomly between all devices data

With the update to 0.85.1 the bug is gone :slight_smile:
I’ve also added rssi info for connection power of the devices and heat level in % to know amount of heating of the thermostat.