claudegel : parle tu francais?
oui, français, anglais et espagnol
Comment on peux se parler en privé je suis nouveau sur home assistant
Hi, I’m gonna install an Hass.io device and add sinope component on it to document the process. Did you succeed ?
I changed the CONFIG setting in device.py to “/config/.storage” as it looks like every add-on have their config file there.
I got a different error.
Writing config to file /config/.storage/sinope_devices.json …
Traceback (most recent call last):
File “device.py”, line 195, in
uid = pwd.getpwnam(owner).pw_uid
KeyError: “getpwnam(): name not found: ‘homeassistant’”
I’ve installed Hass.io and changed device.py so now it work great on Hass.io.
please see my branch select-config where device.py is working for both Hass.io and Hassbian.
I’ve changed my code to be able to detect where is the config file. For device.py you will only need to uncomment one line at the to (line 13 or 14) depending on your setup, Hass.io or Hassbian. When you start the custom component after it should detect automatically the config path.
My last problem with Hass.io is that the crc8 requirement is not installed on startup by HA and I need to find out a way to solve that issue. At worst I’ll add crc8 to the custom component file.
In Hass.io I’ve installed the package SSH & Web Terminal. It allow to edit your config without the need to login via SSH. it work directly in the HA left panel
I finally made the changes to be able to have sinope-GT125 to work in Hass.io and Hassbian.
I still need to do some test to make sure that I didn’t break it for Hassbian and I need to update the doc.
If you install package «SSH & Web Terminal» you will be able to run device.py with the command
phyton3.7 device.py
in a web terminal directly in HA.
See branch «select-config» on my git for the files. I’ll make a PR soon if everything is ok. You will need all files as I’ve made changes in all of them.
Finally, Hass.io is very fussy about adding python library so for now I’ve placed the crc8.py lib here so it can be imported in sinope for Hass.io.
Let me know if you find something wrong.
Small syntax error: device.py, line #174, the Try: should be try:
After i made the change, copied crc8.py and uncommented line #14, everything went well.
Thank you for your time on this.
Thank you I’ve made the correction. Did you start sinope ?
I just merge the changes to allow sinope-gt125 to be run in Hassbian or Hass.io
Update your sinope custom component.
Everything is working, i got my 9 switches/dimmers and 3 thermostats in HA and the automations worked as they should.
I actually forgot one thermostat on the initial try and had to go back to add it, no issues.
I actually removed the neviweb version and i am running only on the gt-125 version.
Actually you can run device.py as many time as you want to add new devices. It will add them to the config file.
Now I’ve updated device.py so you don’t need to uncomment a line. Hass.io or Hassbian will be detected automatically.
Sinope finally got back to me Only about 10 days later
Last week, we began the migration to our new platform. We have also created applications for Android and iOS platforms.
However, some difficulties were encountered during this migration. We are working to resolve them as soon as possible.
In the coming days, an update will be deployed. This will bring several fixes, both visually and functionally.
If you have any questions, feel free to reply to this email. A member of our team will answer you as soon as possible. For more information about the Neviweb app, we invite you to visit the Neviweb Support section.
So open source is faster then private sources
I’m still waiting for them to send me doc about there error message. I hope it will help fine tune the neviweb component.
Hey Claude, didn’t have time this summer to update my HA system. Now with the new python 3.7 requirement and the new Neviweb app, I decided to build a new hass.io system based on sinope_gt125.
I played with the gt125 before, so I had my file “devices.json” already populated. I installed the component with HACS and renamed my device file to “sinope_devices.json” and put it in /config/.storage. I also added my config to the yaml file.
But I’m still getting this error at startup :
2019-09-01 17:42:44 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform sinope
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 150, 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 “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/sinope/climate.py”, line 62, in setup_platform
dev_list.append(json.loads(line))
File “/usr/local/lib/python3.7/json/init.py”, line 348, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python3.7/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/local/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)
Hi, I think you should rebuild your sinope_devices.json. It look like you try to load data from a devices that do not exist. Just put your sinope_devices.json aside and build from scratch.
Also check your configuration .yaml as there was a lot of changes this summer. Now you don’t need to write your GT125 ID in reversed order.
Once you rebuild your sinope_devices.json the first line will give you the needed info you need to write in your configuration.yaml
Let me know how it work.
Yeah, just saw for reply, but that is exactly what I did. I rebuild the json file. I did not see that there was a new line at the beginning of the file. It works now as it should. Thanks
I’ve got a lot of the following error lately. It happens for light and climate devices. Do you have any idea what can cause this ?
2019-09-02 06:48:34 ERROR (MainThread) [homeassistant.helpers.entity] Update for light.sinope_light_basement fails
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 261, in async_update_ha_state
await self.async_device_update()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 441, 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/sinope/light.py”, line 96, in update
device_data = self._client.get_light_device_data(self._id)
File “/config/custom_components/sinope/init.py”, line 533, in get_light_device_data
intensity = get_intensity(bytearray(send_request(self, data_read_request(data_read_command,device_id,data_light_intensity))).hex())
File “/config/custom_components/sinope/init.py”, line 290, in get_intensity
return int(float.fromhex(tc2))
ValueError: invalid hexadecimal floating-point string
I’ve the same error for one device. It’s when the device do not reply.
I’ll try to improve error detail to find out what it is. Could also be a competition between neviweb request and sinope-GT125 request.
I have this error from neviweb:
Updating neviweb switch Prises ext. (13.716 sec): {‘error’: {‘code’: ‘DVCCOMMTO’, ‘data’: {‘retry’: 2}}}