Sinope Line Voltage Thermostats

I don’t think the thermostat can be used as repeater if they are not on the smae network. Isn’t it ?

What would be the best way to switch the thermostat to my zigbee controller and keeping them as same entities so I don’t have to recreate the automation?
Summer is the best time for this hehe.

If the thermostats are on the same network, Nevieb or ZHA, they act as a repeater. Any message they receive if it is not for them they will repeat it. Both network are not on the same bandwidth so there is no mix up between the two network. Sinopé zigbee thermostat are repeater by default. For example the water leak detector are terminal network. They send there data but they don’t listen on the network and cannot be used as a repeater.
As for the switch from Neviweb130 to ZHA, The devices are not named the same way. neviweb130 devices are called as climate.neviweb130_climate_lavage. For ZHA it is like climate.salle_de_bain_thermostat, the name you give when you connect a new device to ZHA. Both are stored in the file .storage/core.entity_registry
ZHA device:

"config_entry_id": "ec2e648309cb49bc91a2b449b2f91933",
        "device_class": null,
        "device_id": "8a477e53924d44b5a0838ea84a480ad6",
        "disabled_by": null,
        "entity_category": null,
        "entity_id": "sensor.climatesalle_de_bain_thermostat_temperature",
        "hidden_by": null,
        "icon": null,
        "id": "54fdb78071a741d795f22980e9883342",
        "has_entity_name": false,
        "name": "temperature salle de bain",
        "options": {},
        "original_device_class": "temperature",
        "original_icon": null,
        "original_name": "Sinope Technologies TH1300ZB 6d260200 temperature",
        "platform": "zha",
        "supported_features": 0,
        "unique_id": "50:0b:91:40:00:02:26:6d-1-1026",
        "unit_of_measurement": "°C"
      },

sinope GT130 devices:

"config_entry_id": null,
        "device_class": "temperature",
        "device_id": null,
        "disabled_by": null,
        "entity_category": null,
        "entity_id": "climate.neviweb130_climate_lavage",
        "hidden_by": null,
        "icon": null,
        "id": "f12b2b9df9e3db91423fab56aa0f8a0e",
        "has_entity_name": false,
        "name": "Lavage",
        "options": {},
        "original_device_class": "temperature",
        "original_icon": null,
        "original_name": "neviweb130 climate Lavage",
        "platform": "neviweb130",
        "supported_features": 17,
        "unique_id": 295056,
        "unit_of_measurement": "celsius"
      },

Both have an “id”:… field which define that specific device.
Maybe it is possible to switch your thermostat to ZHA. Then edit .storage/entity_registry file and take the ID of your device in neviweb130 (climate.neviweb130_climate_lavage) and copy it over in the sensor.climatesalle_de_bain_thermostat_temperature ID field.
Make a complete HA backup before you try this.
The safer way is to transfer your thermostat to ZHA, then edit your card and automation to replace your old neviweb130 device with the new ZHA devices and restart HA. As you say in summer it’s time to shake your code.
When it is done just edit .storage/core.entity_registry to remove the old neviweb130 devices that have been transfered to ZHA.
Let me know if it work

Hello, I have a bug in this component.
here is the log:

Logger: homeassistant.setup
Source: custom_components/neviweb/__init__.py:149
Integration: Sinope Neviweb (documentation)
First occurred: 10:08:48 (1 occurrences)
Last logged: 10:08:48

Error during setup of component neviweb
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fa9ce947610>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='neviweb.com', port=443): Max retries exceeded with url: /api/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa9ce947610>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/neviweb/__init__.py", line 145, in __post_login_page
    raw_res = requests.post(LOGIN_URL, data=data,
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='neviweb.com', port=443): Max retries exceeded with url: /api/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa9ce947610>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
    result = await task
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/neviweb/__init__.py", line 75, in setup
    data = NeviwebData(hass_config[DOMAIN])
  File "/config/custom_components/neviweb/__init__.py", line 98, in __init__
    self.neviweb_client = NeviwebClient(username, password, network, network2)
  File "/config/custom_components/neviweb/__init__.py", line 128, in __init__
    self.__post_login_page()
  File "/config/custom_components/neviweb/__init__.py", line 149, in __post_login_page
    raise PyNeviwebError("Cannot submit login form")
custom_components.neviweb.PyNeviwebError: Cannot submit login form

Please tel me what can I do. I have HA in docker on ubuntu 22 machine.
Manyy thanks for your help

Hello, sorry for disturbinb, but I have a problem with this integration.
Here is the log:

Logger: homeassistant.setup
Source: custom_components/neviweb/__init__.py:149
Integration: Sinope Neviweb (documentation)
First occurred: 10:08:48 (1 occurrences)
Last logged: 10:08:48

Error during setup of component neviweb
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fa9ce947610>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='neviweb.com', port=443): Max retries exceeded with url: /api/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa9ce947610>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/neviweb/__init__.py", line 145, in __post_login_page
    raw_res = requests.post(LOGIN_URL, data=data,
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='neviweb.com', port=443): Max retries exceeded with url: /api/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa9ce947610>: Failed to establish a new connection: [Errno -3] Try again'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
    result = await task
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/neviweb/__init__.py", line 75, in setup
    data = NeviwebData(hass_config[DOMAIN])
  File "/config/custom_components/neviweb/__init__.py", line 98, in __init__
    self.neviweb_client = NeviwebClient(username, password, network, network2)
  File "/config/custom_components/neviweb/__init__.py", line 128, in __init__
    self.__post_login_page()
  File "/config/custom_components/neviweb/__init__.py", line 149, in __post_login_page
    raise PyNeviwebError("Cannot submit login form")
custom_components.neviweb.PyNeviwebError: Cannot submit login form

Many thanks for your help !
Best regards

Look like your user / password to connect to Neviweb api is wrong.

In configuration.yaml you should have this:

neviweb:
  username: !secret climate_username  <-- this is the email used to connect to neviweb
  password: !secret climate_password <-- this must be the password you use to connect to your Neviweb account
  network: !secret climate_gateway <-- this is the location (emplacement) name used in Neviweb for your miwi devices
  scan_interval: 360

Hello Claude - thank you for all your help on this

I have everything set up and working really well - except for getting energy usage from a RM3250ZB

hourly_kwh_count works but I can’t get hourly_kwh to work…it just shows zero. I wonder if this only works for thermostats, not switches?

My code is below - thank you in advance for any suggestions!

This works

  - sensor:
    - name: Hot water tank energy usage
      unit_of_measurement: kWh
      device_class: energy
      state_class: total_increasing
      state: >
        {{ state_attr("switch.neviweb130_switch_rm3250zb","hourly_kwh_count") }}

This doesn’t work (returns 0)

  - sensor:
    - name: Hot water tank test
      unit_of_measurement: kWh
      device_class: energy
      state_class: total
      state: >
        {{ state_attr("switch.neviweb130_switch_rm3250zb","hourly_kwh") }}

hourly_kwh_count is normally updated once per hour
daily_kwh_count is updated by the end of each day
monthly_kwh_count is updated by the end of each month

hourly_kwh is the total for the present hour
daily_kwh is the total for today updated each hour
monthly_kwh is the total for this month updated by the end of each day

This is what I hve for my RM3250ZB:

Wattage: 783
hourly_kwh_count: 3777.495
daily_kwh_count: 3774.748
monthly_kwh_count: 3687.336
hourly_kwh: 0
daily_kwh: 2.747
monthly_kwh: 90.159

Look like hourly_kwh is not populated. I need to investigate.

Thank you to pointing this to me.

OK I’ve found the bug. hourly_kwh is updated every minutes by Neviweb but I’m polling the data only once every 30 minutes. But it is possible to get the data of every minutes as a dictionary and calculate a total for this hour period.

for example the data receive for last hour

|history|[ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]|
|0|Object { period: 0, periodQuality: 0, counter: 3777495, … }|
|1|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|2|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|3|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|4|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|5|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|6|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|7|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|8|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|9|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|10|Object { period: 0, periodQuality: 60, counter: 3777495, … }|
|11|Object { period: 400, periodQuality: 60, counter: 3777095, … }|
|12|Object { period: 767, periodQuality: 60, counter: 3776328, … }|
|13|Object { period: 761, periodQuality: 60, counter: 3775567, … }|
|14|Object { period: 767, periodQuality: 60, counter: 3774800, … }|
|15|Object { period: 52, periodQuality: 60, counter: 3774748, … }|
|16|Object { period: 0, periodQuality: 60, counter: 3774748, … }|
|17|Object { period: 0, periodQuality: 60, counter: 3774748, … }|
|18|Object { period: 0, periodQuality: 60, counter: 3774748, … }|
|19|Object { period: 0, periodQuality: 60, counter: 3774748, … }|
|20|Object { period: 0, periodQuality: 60, counter: 3774748, … }|
|21|Object { period: 0, periodQuality: 60, counter: 3774748, … }|
|22|Object { period: 0, periodQuality: 60, counter: 3774748, … }|
|23|Object { period: 0, periodQuality: 60, counter: 3774748, … }|
|24|Object { period: 649, periodQuality: 60, counter: 3774099, … }|
|25|Object { period: 688, periodQuality: 60, counter: 3773411, … }|
|26|Object { period: 0, periodQuality: 60, counter: 3773411, … }|
|27|Object { period: 0, periodQuality: 60, counter: 3773411, … }|
|28|Object { period: 0, periodQuality: 60, counter: 3773411, … }|
|29|Object { period: 0, periodQuality: 60, counter: 3773411, … }|
|30|Object { period: 0, periodQuality: 60, counter: 3773411, … }|
|31|Object { period: 642, periodQuality: 60, counter: 3772769, … }|
|32|Object { period: 160, periodQuality: 60, counter: 3772609, … }|
|33|Object { period: 0, periodQuality: 60, counter: 3772609, … }|
|34|Object { period: 383, periodQuality: 60, counter: 3772226, … }|
|35|Object { period: 775, periodQuality: 60, counter: 3771451, … }|
|36|Object { period: 779, periodQuality: 60, counter: 3770672, … }|
|37|Object { period: 783, periodQuality: 60, counter: 3769889, … }|
|38|Object { period: 271, periodQuality: 60, counter: 3769618, … }|
|39|Object { period: 0, periodQuality: 60, counter: 3769618, … }|

I need to sum the period value to get the hourly_kwh. I’ll try to make a patch this week.

Amazing timely response - thank you!!

Bonjour Claude,

Tout fonctionnait super bien depuis des mois et puis ce matin, tous mes thermostats connectés sur la plateforme neviweb ne se connectent plus… Est-ce que tu peux m’aider?
Voici mon log:

2022-08-24 22:17:26.152 DEBUG (SyncWorker_3) [custom_components.neviweb] Login response: {'user': {'id': 10549, 'role': 'owner', 'email': '[email protected]', 'locale': 'fr', 'format': {'time': '24', 'temperature': 'c'}, 'initialized': 1, 'dataPolicyConsent': 1}, 'account': {'id': 10781, 'interface': 'neviweb', 'type': 'free', 'category': None, 'betaLevel': None}, 'iat': 1661393845981, 'permissionContext': 'userNeviwebOwner1', 'session': '0753b90e9c7ce2b656906e04af90caac232820872c3ff40f', 'refreshToken': 'd217d71cc5ebd4c85eebaa5bb0aa9f670507f747e68d8f2e19918ae6b7dfeb696666f3c3a623ee6e0d05efa4eeaad994'}

2022-08-24 22:17:26.152 DEBUG (SyncWorker_3) [custom_components.neviweb] Successfully logged in

2022-08-24 22:17:26.291 DEBUG (SyncWorker_3) [custom_components.neviweb] Number of networks found on Neviweb: 1

2022-08-24 22:17:26.555 ERROR (MainThread) [homeassistant.setup] Error during setup of component neviweb

Traceback (most recent call last):

File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component

result = await task

File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run

result = self.fn(*self.args, **self.kwargs)

File "/config/custom_components/neviweb/__init__.py", line 75, in setup

data = NeviwebData(hass_config[DOMAIN])

File "/config/custom_components/neviweb/__init__.py", line 98, in __init__

self.neviweb_client = NeviwebClient(username, password, network, network2)

File "/config/custom_components/neviweb/__init__.py", line 129, in __init__

self.__get_network()

File "/config/custom_components/neviweb/__init__.py", line 186, in __get_network

if network["name"] == self._network_name:

TypeError: string indices must be integers

Merci à l’avance…

Moi aussi…the same has happened to me.

2022-08-24 23:03:42 ERROR (MainThread) [homeassistant.setup] Error during setup of component neviweb130
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/neviweb130/__init__.py", line 106, in setup
data = Neviweb130Data(hass_config[DOMAIN])
File "/config/custom_components/neviweb130/__init__.py", line 133, in __init__
self.neviweb130_client = Neviweb130Client(username, password, network)
File "/config/custom_components/neviweb130/__init__.py", line 159, in __init__
self.__get_network()
File "/config/custom_components/neviweb130/__init__.py", line 213, in __get_network
if network["name"] == self._network_name:
TypeError: string indices must be integers

I’ve restarted HA this morning and I have the same error for the two custom_components neviweb130 and neviweb. Don’t know if it is related but when you log on neviweb.com you are prompted to accept the new security policy of Sinopé. Maybe There is something that have changed in neviweb.com
Let me check.

OK the error is

networks: {'error': {'code': 'VALMISDATA', 'data': {'list': ['account$id']}}}

Something have changed in Neviweb api. I need to check closely. I’ll need to change the networks connection command in neviweb and neviweb130 custom_components

1 Like

Ok I had lost electricity all day because of Hydro maintenance. I’ve a working solution for neviweb130 and neviweb and will push a new version tonight. Need to do a little code cleaning and we will be up and running again.
You can test branch https://github.com/claudegel/sinope-130/tree/login-patch
only __init__.py have changes.

Will finish tonight. Sorry for the delay

Good news!

I just updated __init__.py and everything is working again.

Thank you Claude - it’s great how fast you were able to fix this!

I’ve released new versions for neviweb130 and neviweb custom_component that fix issue created with Sinopé Neviweb API changes. Please test.

Thank you

Thank you Claude! It is working good for me too… :+1:

I’m not sure if this is related to the change Sinope made last week or not…but I just unplugged my GT130 to move the cable and now it won’t boot up…

Power light: solid with occasional flash
Web light: off
Radio light: flashing red

To be clear…this has nothing to do with Claude’s addon…I think Sinope may have just pushed down a different update that loaded when I power cycled…and now…I don’t know

I recommend not unplugging your gateways for now, and I will contact Sinope support on Monday

The silver lining is now I get to experiment adding via ZHA directly to HA! :slight_smile:

The day I’ve made the last release I got power failure for 6 hours. Hydro maintenance. Then my GT130 came back normally. My addon neviweb130 do not know anything about the GT130. It just poll Neviweb and it is Neviweb that poll the GT130. Let us know what is the problem.
Did you check on Neviweb if you can reconnect your GT130. Is it still there but unavailable ?
By the way following the power outage one of my TH1300ZB didn’t reconnect. And now I can’t connect it to the GT130 or ZHA. I’ll probably need to do a hard reset of the TH1300ZB. :thinking:

Hi @Seizici I just push a new release for neviweb130 that should fix the hourly_kwh bug for RM3250ZB switch. Please test

Sorry @claudegel - my GT130 is still offline.

I’ve emailed Support tonight and will test for you once it’s back online!