Sinope Thermostat Support

Dans Neviweb il y a un bouton pour réinitialiser le réseau GT125. Allez dans Neviweb et ouvrir les parametres pour l’appareil GT125. Sous «enregistrer» il y a un bouton bleu «reinitialiser le reseau»
Attention ce n’est pas le bouton »supprimer» :slight_smile:
si ca ne marche pas il faudra resetter chaque appareil qui n’est plus là et les re-apparier au GT125

Merci beaucoup pour votre réponse.
Comment on fait pour faire un reset sur un thermostat RF 1400 (mi-fi)?
Merci!

TH1120RF
1- Débrancher l’alimentation du GT125;
2- Maintenir le bouton du bas du thermostat jusqu’à ce qu’apparaisse le menu de configuration;
3- Appuyer une fois sur le bouton du bas et l’option de déconnecter devrait apparaitre (affiche «
No » et « Connect Reset »);
4- Appuyer sur le bouton du haut pour choisir « Yes »;
5- Appuyer sur le bouton du bas pour confirmer et l’écran de confirmation apparait (affiche «
sure », « no » et « Connect reset »);
6- Appuyer encore sur le bouton du haut pour choisir « Yes »;
7- Appuyer sur le bouton du bas pour confirmer; « Clr » affiche.
8- Rebranchez l’alimentation du GT125

TH1300RF et TH1400RF
1- Débrancher l’alimentation du GT125;
2- Appuyez sur le bouton du bas jusqu’à ce que le menu de configuration apparaisse.
3- Appuyez sur les deux boutons (haut et bas) en même temps jusqu’à ce que le texte “RST”
s’affiche à l’écran du thermostat.
4- Appuyez sur le bouton du bas pour choisir “YES”.
5- Appuyez sur les deux boutons (haut et bas) en même temps pour confirmer votre choix.
6- Le texte “SURE” s’affiche à l’écran. Vous appuyez sur le bouton du bas pour sélectionner “YES”.
7- Appuyez sur les deux boutons (haut et bas) en même temps pour confirmer votre choix.
8- Le texte “CLR” s’affiche à l’écran.
9- Rebranchez l’alimentation du GT125

Bonjour,

J’ai installé mon nouveau th1123wf à l’aide de votre composant. Ça fonctionne parfaitement, merci.

Ce thermostat affiche une températire extérieur, ce qui à mon avis est vraiment bien. Sauf que dans ma région, c’est peu représentatif de la réalité. J’ai déjà ma température extérieure réelle dans mon HASS, est-ce qu’il y à un moyen de remonter ma valeur vers le thermostat?

Encore un grand merci.


Short story in english : Great component, working well, thanks. Can I set the exterior temp that the TH11123wf display to the value of my own thermometer already available in HASS? Thanks again.

Oui dans HA vous pouvez prendre nimporte quel source de température pour l’envoyer à votre thermostat.
Il faut créer un template sensor qui suit la valeur de température puis envoyer cette donnée à votre thermostat. J’ai une sonde plancher sur mon MC3100ZB qui lit la température extérieure.
Mon sensor est comme suit

template:
   - sensor:
       - name: "varennes_local"
         unit_of_measurement: '°C'
         device_class: temperature
         state_class: measurement
         state: "{{ state_attr('switch.neviweb130_switch_mc3100zb', 'Extern_temperature') }}"

Ca me donne un sensor.varennes_local qui a la valeur de la température extérieure.

reste plus qu’à l’envoyer au thermostat avec une automation. Il faut s’assurer d’envoyer la température au moins une fois par heure car sinon le thermostat revient à la température de setpoint.

Hi, I just installed Home Assistant on a Intel NUC. I basically installed this version; https://github.com/home-assistant/operating-system/releases/download/9.5/haos_generic-x86-64-9.5.img.xz.

I installed HACS and downloaded Sinope GT125. The installation was automatically done in Config/custom_components/sinope

I tried to go through the setup documented in the Manifest.json but I’m not able to execute anything. SUDO doesn’t work and I don’t think there is any Python on this system. I tried installing the PYScript from the HACS Add-ons but that didn’t make a difference.

Can someone give me some pointers on how to proceed?

Thanks.

Hi @cpassalacqua, welcome to HA
You’ve installed Sinope GT125 via HACS. it’s perfect
How do you get to the file in config/custom_components/sinope. Are you using ssh & web terminal ?
I’m gonna guide you through the installation

Hi @claudegel so I have Studio Code Server and Terminal installed. However, I can also Putty into my HA.

I’m not sure that with Putty you will have the permission to run device.py.
Normally I use ssh & web terminal. Start ssh & web terminal in parameter/complementary module/ssh & web terminal. Open the terminal on the left side of the screen in HA. Then cd to config/custom_components/sinope.
To find out if python is installed just type python and hit TAB button on the keyboard. if it is install you should see which python you have and what command you can use. Normally it is python or python3 or python3.10. All three are availables and equivalent. Normally there is a symlink between python and python3.10 so you can use python device.py and follow what is asked on the screen to get your gateway access.
Studio code server could be used to edit your config files or you can install File editor module which give you access to all config files and allow to edit and save.

@claudegel yes the Putty was for another project. Let’s forget about that one. I had the Terminal and SSH installed so to make sure we’re setup the same I uninstalled that version and installed the SSH and Terminal version. Here is what I see when I type in python and click tab;

I hope that screenshot is visible or else let me know.
Just in case I do see;
python python3 python3.10

So I typed python device.py and I was asked questions which I was not able to do before with “Terminal and SSH” I provided all the information about the GT125.

When I ran device.py again I had one thermostat recognized by pressing the buttons but I did not have all the information that was asked so I entered return a few times. I see that no device was added to HA. I guess I will need to get all the info for the thermostat for it to function properly correct?

Thanks.

great, in fact python and python3 are symlink to the real command which is python3.10
So I suppose that now you have the first part done to get the api key from your GT125.
you should get something like this:
[“192.168.xxx.xxx”, “50119ec640bbd181”, “001EC0C13D44E672”, 4550] ← your GT125
[“id”, “name”, “type”, “watt”]
[“2e320100”, “bureau”, “10”, " "] ← a thermostat
[“5a2c0100”, “lumiere bureau”, “102”, “240”] ← light
[“6a560100”, “prise exterieur”, “120”, " "] ← load controller
Just answer the question as you run device.py. If I remember correctly for the type you can push the letter «h» to get the devices list. This is important for HA to load the device in the correct section, climate, light, switch etc.

  • The id come from the GT125 when you push the two buttons on your thermostats or light etc
  • the name is what you want to call you device. It can be changed later by editing the sinope_devices.json in the .storage folder or directly in HA.
  • The type field is the type of devices you are adding. You can find it at the beginning of climate.py, light.py etc in the sinope folder or by hitting the letter «h» in device.py.
  • The last field is the load in watt associated with each device. The thermostat are able to measure the load in watt but the light do not measure this so you need to evaluate the load to get some history for the energy module in HA. You can put any number and change it later by editing sinope_devices.json file in config/.storage folder.

Here is an example from my terminal. device.py will loop to add all devices. Just hit «q» letter at the end to make sure all devices are written in the file sinope_devices.json.
sinope-device

I did that on two of my Thermostats. I verified sinope_devices.json and I see them both there as follows;
sinopedevices
So once this step is done am I suppose to see these devices in the device list or entities of HA? As of this point I still don’t see them. Here is the log file;

File “/config/custom_components/sinope/init.py”, line 704, in get_climate_device_data

temperature = get_temperature(bytearray(send_request(self, server, data_read_request(data_read_command,device_id,data_temperature))).hex())

File “/config/custom_components/sinope/init.py”, line 551, in send_request

while sock.connect_ex(server_address) != 0:

socket.gaierror: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 507, in _async_add_entity

await entity.async_device_update(warning=False)

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 732, in async_device_update

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/sinope/climate.py”, line 430, in update

device_data = self._client.get_climate_device_data(self._server, self._id)

File “/config/custom_components/sinope/init.py”, line 710, in get_climate_device_data

raise PySinopeError(“Cannot get climate data”)

custom_components.sinope.PySinopeError: Cannot get climate data

2023-03-19 20:19:41.625 ERROR (MainThread) [homeassistant.components.climate] sinope: Error on device update!

Traceback (most recent call last):

File “/config/custom_components/sinope/init.py”, line 704, in get_climate_device_data

temperature = get_temperature(bytearray(send_request(self, server, data_read_request(data_read_command,device_id,data_temperature))).hex())

File “/config/custom_components/sinope/init.py”, line 551, in send_request

while sock.connect_ex(server_address) != 0:

socket.gaierror: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 507, in _async_add_entity

await entity.async_device_update(warning=False)

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 732, in async_device_update

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/sinope/climate.py”, line 430, in update

device_data = self._client.get_climate_device_data(self._server, self._id)

File “/config/custom_components/sinope/init.py”, line 710, in get_climate_device_data

raise PySinopeError(“Cannot get climate data”)

custom_components.sinope.PySinopeError: Cannot get climate data

Thanks.

Did you restart HA after detecting your two thermostats.
You should see them in Developer Tools / States as climate.sinope_climate_basement_thermostat and climate.sinope_climate_kitchen_thermostat.

Please add this in your configuration.yaml and restart HA.

logger:
  default: warning
  logs:
    homeassistant.custom_components: debug
    custom_components.sinope: debug

What is your configuration for sinope in configuration.yaml. Please post

After restart in home-assistant.log you should see those lines
[custom_components.sinope] Setting config location to: /config/.storage/
[custom_components.sinope] Setting scan interval to: 0:03:00
[custom_components.sinope] Setting time zone as: America/Toronto

[custom_components.sinope.climate] Setting up sinope basement thermostat: a0c70000
[custom_components.sinope.climate] Setting up sinope kitchen thermostat: 505c0100

sinopeyaml

Here is the log file;

2023-03-20 07:39:37.092 DEBUG (SyncWorker_4) [custom_components.sinope] Setting config location to: /config/.storage/

2023-03-20 07:39:37.092 DEBUG (SyncWorker_4) [custom_components.sinope] Setting scan interval to: 0:02:00

2023-03-20 07:39:37.092 DEBUG (SyncWorker_4) [custom_components.sinope] Setting time zone as: America/Toronto

2023-03-20 07:39:37.254 DEBUG (SyncWorker_8) [custom_components.sinope.climate] Setting up sinope Basement Thermostat: a0c70000

2023-03-20 07:39:37.254 DEBUG (SyncWorker_8) [custom_components.sinope.climate] Setting up sinope Kitchen Thermostat: 505c0100

2023-03-20 07:39:37.468 ERROR (MainThread) [homeassistant.components.climate] sinope: Error on device update!

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 507, in _async_add_entity

await entity.async_device_update(warning=False)

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 732, in async_device_update

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/sinope/climate.py”, line 430, in update

device_data = self._client.get_climate_device_data(self._server, self._id)

File “/config/custom_components/sinope/init.py”, line 704, in get_climate_device_data

temperature = get_temperature(bytearray(send_request(self, server, data_read_request(data_read_command,device_id,data_temperature))).hex())

File “/config/custom_components/sinope/init.py”, line 556, in send_request

sock.sendall(login_request(self))

File “/config/custom_components/sinope/init.py”, line 623, in login_request

login_crc = bytes.fromhex(crc_count(bytes.fromhex(login_data)))

ValueError: non-hexadecimal number found in fromhex() arg at position 45

2023-03-20 07:39:37.672 ERROR (MainThread) [homeassistant.components.climate] sinope: Error on device update!

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 507, in _async_add_entity

await entity.async_device_update(warning=False)

File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 732, in async_device_update

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/sinope/climate.py”, line 430, in update

device_data = self._client.get_climate_device_data(self._server, self._id)

File “/config/custom_components/sinope/init.py”, line 704, in get_climate_device_data

temperature = get_temperature(bytearray(send_request(self, server, data_read_request(data_read_command,device_id,data_temperature))).hex())

File “/config/custom_components/sinope/init.py”, line 556, in send_request

sock.sendall(login_request(self))

File “/config/custom_components/sinope/init.py”, line 623, in login_request

login_crc = bytes.fromhex(crc_count(bytes.fromhex(login_data)))

ValueError: non-hexadecimal number found in fromhex() arg at position 45

Look like your thermostats are registered and you should be able to see them in Developer Tools / States
But for some reason you can’t login to your GT125 for devices update.
Do you have more then one GT125 and if you have only one did you pick number 1 in device.py ?
Can you check your configuration.yaml with your first line of sinope_devices.json ? The parameters should be the same for:

  server: "192.168.xxx.xxx"
  id: "001EC0C1xxx1E672"
  api_key: "50119ecxxxxbd181"

and the first line of sinope_devices.json.
ID is the third parameter on the first line and api_key is the second parameter. Maybe you put them wrong in configuration.yaml

When I look at sinope_devices.json I see the following;
(server ip, api_key, id, port)
[“192.168.xx.xx”, “d62bfexxxxxxx16ee”, “D880xxxxxxxxD148”, 4550]

In configuration.yaml it;
Server
id
api_key

server: 192.168.xx.xx

id: D880xxxxxxxxD148

api_key: d62bfexxxxxxx16ee

Thanks.

Ok we will check what you send exactly on init.py line 623. I’ve added debug on that line to see what is sent to your GT125
I’ve created a new branch on my git, debug-data.

Pick the file init.py and replace yours in config/custom_components/sinope
Then restart HA and check in your log for the line containing:
[custom_components.sinope] login data = 55001200100172E621xxx1C01E0050119exxxxxxd181, crc= 35
You should see that after the part 550012001001
72E621xxx1C01E00 is your ID but written in reversed order
50119exxxxxxd181 is your api_key
I neeed also the crc = 35 your number will be different as it is a checksum of the big data line
The number above are from my debug . your ID will be written like this. If your id is 12345678 then it is written 78563412 in reversed order two by two. If it don’t correspond to your id and api_key then look in your configuration.yaml there should be something wrong.

The erreur ValueError: non-hexadecimal number stand for any character that’s not in 0-9 and a-f value found in the data part. Did you put a «o» letter instead of a 0 number for your ID or api_key in your config?

I hope I transferred the file correctly. Here is what I’m getting in the log file;

2023-03-21 15:45:43.653 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component custom_components.sinope

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/loader.py”, line 760, in get_component

cache[self.domain] = importlib.import_module(self.pkg_path)

File “/usr/local/lib/python3.10/importlib/init.py”, line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File “”, line 1050, in _gcd_import

File “”, line 1027, in _find_and_load

File “”, line 1006, in _find_and_load_unlocked

File “”, line 688, in _load_unlocked

File “”, line 879, in exec_module

File “”, line 1017, in get_code

File “”, line 947, in source_to_code

File “”, line 241, in _call_with_frames_removed

File “/config/custom_components/sinope/init.py”, line 73

sinope-gt125/__init__.py at debug-data · claudegel/sinope-gt125 · GitHub

^

SyntaxError: invalid character ‘·’ (U+00B7)

2023-03-21 15:45:43.654 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration sinope: Unable to import component: Exception importing custom_components.sinope