Hi,
Sorry for the delays. I’ll put the code on Github this weekend.
Seems to work fine. It stopped detecting one of my thermostat, I had to reboot, not sure why.
Hi,
Sorry for the delays. I’ll put the code on Github this weekend.
Seems to work fine. It stopped detecting one of my thermostat, I had to reboot, not sure why.
Great thanks @lrogoff. I was able to install the light switches but have not had time to work on the integration
Hi guys,
Sorry for the delays, I’m very busy.
I created a github to post my code, you can find it there with the instructions.
Let me know if it’s working. It’s gonna start to be cold around here, so it should be useful.
Ciao!
Thanks for this! I just set it up and I’m seeing all the info in Home Assistant so it seems to be working but it keeps throwing these errors for each thermostat.
2017-11-08 19:35:39 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.sinope_entrance fails
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
yield from self.async_device_update()
File "/usr/src/app/homeassistant/helpers/entity.py", line 309, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/climate/sinope.py", line 87, in update
self._target_temp = float(self.sinope_data.data[self.device_id]["data"]["setpoint"])
KeyError: 'setpoint'
There is a calls limit on the API so sometimes I cannot access the data or set the data (setpoint).
I didn’t put an exception yet as I have to code a “retry code”.
Are you able to set your thermostats and read all the infos from it?
If you try to set very quickly few thermostats, it will probably not work since the API will throw a reach limit error.
But overall, it’s working
Thanks for the upload!
I’m able see all my thermostats in the UI! I had to add the following code or else it was trying to set my sinope light switches up as thermostats
for id, device in sinope_data.data.items():
if device["info"]["type"] == 10:
devices.append(SinopeThermostat(sinope_data, id, '{} {}'.format(name, device["info"]["name"])))
I’m able to change the temperature of the thermostat if I call the climate.set_temperature service but using the arrows in the UI does not work and produces the same error that @larizzo mentioned.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
yield from self.async_device_update()
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 309, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
future.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/climate/sinope.py", line 88, in update
self._target_temp = float(self.sinope_data.data[self.device_id]["data"]["setpoint"])
KeyError: 'setpoint'
Did you happen to come across this?
Setting the temperature from the card now appears to be working after updating to 0.57.2!
I updated to 59.1 and the sinope modules not working anymore. I have entries like this in my log:
2017-12-05 06:50:22 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/src/app/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
new_entity, self, update_before_add=update_before_add
File "/usr/src/app/homeassistant/helpers/entity_component.py", line 247, in async_add_entity
yield from entity.async_update_ha_state()
File "/usr/src/app/homeassistant/helpers/entity.py", line 231, in async_update_ha_state
attr)
File "/usr/src/app/homeassistant/helpers/entity.py", line 333, in _attr_setter
value = getattr(self, name)
File "/usr/src/app/homeassistant/components/climate/__init__.py", line 736, in supported_features
raise NotImplementedError()
NotImplementedError
updated to .60 I’ve this error in my log on startup:
2017-12-25 15:00:08 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform sinope
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/sinope.py”, line 64, in setup_platform
devices.append(SinopeThermostat(sinope_data, id, ‘{} {}’.format(name, device[“info”][“name”])))
File “/config/custom_components/climate/sinope.py”, line 80, in init
self._min_temp = float(self.sinope_data.data[self.device_id][“info”][“tempMin”])
KeyError: ‘tempMin’
adding
if device[“info”][“type”] == 10:
at line 64 solve the problem. Now I see all my sinope and I’m able to set temp.
I still have an error in the log:
ERROR (SyncWorker_5) [custom_components.climate.sinope] Error on receive last Sinope data: Can not get page
is the module still working with the 0.60 version?
I get this error (configuration invalid):
Failed config
General Errors:
- Platform not found: climate.sinope
Thanks,
I am on 0.60 and I did have to update to the latest release of the sinope component. Go to the github link above and download the latest version and it will work again.
I’m also with 0.60 using the latest sinope component. It is fonctionnal but I still have some error on the refresh.
Error on receive last Sinope data: Can not get page
[“data”][“setpoint”]) KeyError: ‘setpoint’
I’ve called Sinope to get there api documentation and waiting for them
ok, I’ll try that and keep you posted.
Thanks !
Don’t forget to add this
at line 64. I think it is needed if you have other devices tan thermostats like switch and dimmer etc.
I’ve looked again and it doesn’t work.
I have this error in my log:
Failed config
General Errors:
- Platform not found: climate.sinope
I’ve put the sinope.py file in the /custom_compoments/climate folder.
Maybe I’m a little bit newbe here… There something I’m missing.
Thanks!
I finally find a way to install it! I’m almost there.
Right now, when I boot HA, I have an error:
Error while setting up platform sinope
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/climate/sinope.py”, line 47, in setup_platform
sinope_data.update()
File “/config/custom_components/climate/sinope.py”, line 158, in update
self.client.fetch_data()
File “/config/custom_components/climate/sinope.py”, line 240, in fetch_data
sinope_data.update({ device[“id”] : { “info” : device, “data” : self._get_data_device(device[“id”]) }})
TypeError: string indices must be integers
Someone can give me a hint?
Thanks!
I’m in the process of setting mine up as well and just ran into the almost the exact problem/error. Following!
ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform sinope
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/climate/sinope.py", line 46, in setup_platform
sinope_data = SinopeData(username, password, gateway)
File "/home/homeassistant/.homeassistant/custom_components/climate/sinope.py", line 151, in __init__
self.client = SinopeClient(username, password, gateway, REQUESTS_TIMEOUT)
File "/home/homeassistant/.homeassistant/custom_components/climate/sinope.py", line 181, in __init__
self._post_login_page()
File "/home/homeassistant/.homeassistant/custom_components/climate/sinope.py", line 196, in _post_login_page
self._headers = {"Session-Id": raw_res.json()["session"]}
KeyError: 'session'
Have you double check your credentials and the gateway name?
Oh my goodness. Thank you Maxime! I looked and thought it was ok and then looked again and realized I was missing the .com off my email address. Thank you so much!