Sinope Line Voltage Thermostats

Hi Claude,

I’m helping a friend setting up his HA. He has two networks configured on his Neviweb account. How can he configure HA to access both network integration ?

Does he have the two network connected to a different gt125 or is it one with the gt125 and one with the gt130.
If it is two gt125 then the fastest way is to copy file from neviweb component to another folder named neviweb2 for example. Then edit the file to change the neviweb name to neviweb2 everywhere in the code. This will act as two separated custom component. Then in the configuration.yaml you setup the new neviweb2 component using the same password:

neviweb:
  username: !secret climate_username
  password: !secret climate_password
  network: !secret climate_gateway
  scan_interval: 360

neviweb2:
  username: !secret climate_username
  password: !secret climate_password
  network: !secret climate_gateway2
  scan_interval: 360

So only network parameter will be different. Once loaded you can group devices from both component in the same group.

I’ll check if we can load two gt125 networks in the same component.

I’ve started a new branch in claudegel/sinope-1 called two-network and added the modified files to have the second component neviweb2.

Please copy in folder custom_components/neviweb2. Setup the neviweb2 in configuration.yaml. restart HA

test and let me know.

It’s two different GT125.

So, we need to create a new special component called neviweb2 based upon the first one except for the name everywhere in the code. The only drawback is that he will need to edit this “special” component manually each time you provide a new version.

Will use this method but could you consider adding a feature that could load components from all networks in the future ? If such a thing is possible of course !

Thanks

Yes certainly. I’ve already started but as I have only one GT125. I’ll need beta tester. I already found out how to get all network name from Neviweb. I need to test the best way to configure the two network name in the same config in configure.yaml to pass those network name to the neviweb component.
Then I’ll find a way to call data for each network and merge them in same gateway_data.

1 Like

Will definitely beta test for you !

I’ve started a new branch under the neviweb component this time to merge the two network.
claudegel/sinope-1/custom_components called merge-network

Config in configuration.yaml will look like:

neviweb:
  username: !secret climate_username
  password: !secret climate_password
  network: !secret climate_gateway
  network2: !secret climate_gateway2
  scan_interval: 360

I’ve modified __init__.py and add some debug. Please test and send me the debug you get
I’ve only change __init__.py for now. I’ll change other files once this one look good.

I’ve updated neviweb2 for HA 0.110

In merge-network I’ve updated climate.py, light.py and switch.py to load devices from each network.

Let me know

Hi Claude, here is the debug I got with the new “merge-network” branch

2020-05-22 01:42:28 ERROR (MainThread) [homeassistant.setup] Setup failed for neviweb: unknown error
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 137, in _async_setup_component
component = integration.get_component()
File “/usr/src/homeassistant/homeassistant/loader.py”, line 264, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File “/usr/local/lib/python3.7/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1006, in _gcd_import
File “”, line 983, in _find_and_load
File “”, line 967, in _find_and_load_unlocked
File “”, line 677, in _load_unlocked
File “”, line 724, in exec_module
File “”, line 860, in get_code
File “”, line 791, in source_to_code
File “”, line 219, in _call_with_frames_removed
File “/config/custom_components/neviweb/init.py”, line 164
_LOGGER.debug(“Selecting %s network among: %s”,
^
IndentationError: unindent does not match any outer indentation level

Sorry, fixed the indentation on line 164 and 165

Thx. HA crashed…not able to reboot. will reinstall HA and troubleshoot tomorrow

I hope you find something in the log as I cannot test on my side. I have only one GT125 and one GT130 but they are managed in different modules

OK I’ve added a config parameter that was missing for the second network

try it

I will. Just re-intall my HA today

When using the GT130 does it push exterior temps to the thermostats?
I have 15 TH1124ZB’s hooked in through the hubitat integration, but hubitat doesn’t natively support exterior temps, only current set temp.

Does this integration talk directly with the bridge or does it connect online?

For now the claudegel/sinope-130 (neviweb130) component access the Sinope devices connected to the gt130 via Neviweb and it is Neviweb that push current outside temperature to the thermostat once per hour. This way you will have outside temperature on each thermostat.
If you have device connected on gt125, there are two components available: manage device via Neviweb, claudegel/sinope-1 (neviweb component), or manage devices directly via connection to the gt125 with claudegel/sinope-gt125 (sinope component).
I’m developing a new component to connect directly to the gt130 router to manage your devices but it is still under development and not available to test yet. But it will be available soon I hope.

1 Like

Hi Claude, Here is another debug with merge-network

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/config/custom_components/neviweb/switch.py”, line 52, in async_setup_platform
for device_info in data.neviweb2_client.gateway_data2:
AttributeError: ‘NeviwebData’ object has no attribute ‘neviweb2_client’
2020-05-24 09:18:25 ERROR (MainThread) [homeassistant.components.light] Error while setting up neviweb platform for light
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/config/custom_components/neviweb/light.py”, line 56, in async_setup_platform
for device_info in data.neviweb2_client.gateway_data2:
AttributeError: ‘NeviwebData’ object has no attribute ‘neviweb2_client’

Oups there was one «2» in extra in switch.py and light.py

Network 1 is visible; nothing on Network2

2020-05-24 15:13:59 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.neviweb_switch_chauffe_eau is taking over 10 seconds
2020-05-24 15:14:23 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.neviweb_switch_chauffe_eau fails
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 279, in async_update_ha_state
await self.async_device_update()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 472, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/neviweb/switch.py”, line 107, in update
self._today_energy_kwh = device_daily_stats[0] / 1000
IndexError: list index out of range
2020-05-24 15:20:00 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.neviweb_switch_chauffe_eau is taking over 10 seconds
2020-05-24 15:20:10 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.neviweb_switch_pompe is taking over 10 seconds
2020-05-24 15:21:01 WARNING (SyncWorker_16) [custom_components.neviweb.switch] Error in reading device neviweb switch Pompe: ({‘errorCode’: ‘ReadTimeout’})