makave1i / terneo_thermostat Goto Github PK
View Code? Open in Web Editor NEWTerneo thermostat component for Home Assistant
Terneo thermostat component for Home Assistant
Nice work! Thanks!
Do you planning to add HACS integration to your component? It whould be great!
I've tried to add this repo to addons and got the following error:
https://github.com/Makave1i/terneo_thermostat is not a valid add-on repository
Hello guys,
I'm facing issue with my devices, devices are not able to execute local API commands on /api.cgi, and it's impossible to locate devices by UDP multicast. They are still accessible from the cloud API (mobile app and my.terneo website).
This was caused by running this integration in HA, as I'm not using anything else.
The problem occurs every 2-3 days, and not with all devices at the same time. I have 6 ax and 1 sx devices, since Monday 2 ax are off, rest are ok.
Probably the problem related to devices firmware.
But it's started to be impossible to use your integration as the only one way to reboot a device is to cut off power.
Please let me know if can help somehow from my side.
Thanks
Terneo frimware version: 2.5
Sometimes got such error:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/terneo/climate.py", line 159, in update
self.thermostat.update()
File "/config/custom_components/terneo/thermostat.py", line 231, in update
data = self.status()
File "/config/custom_components/terneo/thermostat.py", line 121, in status
r = self.post(json={"cmd": 4})
File "/config/custom_components/terneo/thermostat.py", line 109, in post
content = r.json()
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
HA version: 2021.15
Detail log:
Logger: homeassistant.loader
Source: loader.py:802
First occurred: 10:41:14 AM (1 occurrences)
Last logged: 10:41:14 AM
No 'version' key in the manifest file for custom integration 'terneo'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'terneo'
Received error on component startup:
This error originated from a custom integration.
Logger: custom_components.terneo.thermostat
Source: custom_components/terneo/thermostat.py:112
Integration: terneo (documentation)
First occurred: 19:31:34 (90 occurrences)
Last logged: 19:48:44
Failed to parse as JSON: b''
I have two terneo thermostats and have this issue just with one of them.
Do you have any idea how to fix it?
Thanks for the plugin, I was able to setup it easily and can see all my thermostats in HA.
The only problem is that I could not control them. For example when I tried to change the needed temperature via UI after few seconds it returns to the previous value. Also other things like turn off/on, mode changing are not working.
Is there anything I can do to fix this?
From logs
2020-03-09 10:14:27 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.terneo 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 476, 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/terneo/climate.py", line 154, in update self.thermostat.update() File "/config/custom_components/terneo/thermostat.py", line 235, in update self._mode = self.get_mode(data) File "/config/custom_components/terneo/thermostat.py", line 190, in get_mode is_on = self.is_on() File "/config/custom_components/terneo/thermostat.py", line 129, in is_on r = self.post(json={"cmd": 1}) File "/config/custom_components/terneo/thermostat.py", line 109, in post content = r.json() File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 889, in json self.content.decode(encoding), **kwargs File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 525, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/local/lib/python3.7/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting ',' delimiter or ']': line 1 column 331 (char 330)
Could you please tell me? how can I remove th block.
I have access_token and s/n of the device. What are my next steps? I want to control my terneo thermostat via HA.
Thank you in advance.
Hi, hope you are doing well!
First of all - thanks for this integration, it looks and works just great!
Could you please advice, is it possible to add a few devices in single HA instance and how configuration strings should look like in this case? I have a three terneo devices and when I'm trying to add all of them to config file (example below), as result I can see only one of them in Lovelace dash.
There is a following sentence warning in file editor after adding more than 1 devices to config file:
duplicated mapping key at line 27, column -101:
climate:
^
My config example (serial numbers are hidden):
climate:
climate:
climate:
Many thanks in advance
Cheers!
Looks like everything is unblocked (terneo app works fine!) integration is in HACS and looks nice But if I change temperature for exemple, nothing happen to thermostat. And short time later temp jumps back in HA to thermostat temperature. Plz need help.
2020-06-10 15:44:40 ERROR (MainThread) [homeassistant.components.homeassistant] Platform error climate.terneo - cannot import name 'ClimateEntity' from 'homeassistant.components.climate' (/usr/src/homeassistant/homeassistant/components/climate/init.py)
Platform error climate.terneo - cannot import name 'ClimateEntity' from 'homeassistant.components.climate' (/usr/src/homeassistant/homeassistant/components/climate/init.py)
Did not changed anything in clymate.yaml, just updated custum_components folder
It looks like 0.9.2 now requires simplejson lib.
If it is not present in the system - component will fail to load:
Oct 29 09:25:55 hass[37769]: 2021-10-29 09:25:55 ERROR (MainThread) [homeassistant.config] Platform error: climate
Oct 29 09:25:55 hass[37769]: Traceback (most recent call last):
Oct 29 09:25:55 hass[37769]: File "/usr/local/lib/python3.9/site-packages/homeassistant/config.py", line 887, in async_process_component_config
Oct 29 09:25:55 hass[37769]: platform = p_integration.get_platform(domain)
Oct 29 09:25:55 hass[37769]: File "/usr/local/lib/python3.9/site-packages/homeassistant/loader.py", line 532, in get_platform
Oct 29 09:25:55 hass[37769]: cache[full_name] = self._import_platform(platform_name)
Oct 29 09:25:55 hass[37769]: File "/usr/local/lib/python3.9/site-packages/homeassistant/loader.py", line 537, in _import_platform
Oct 29 09:25:55 hass[37769]: return importlib.import_module(f"{self.pkg_path}.{platform_name}")
Oct 29 09:25:55 hass[37769]: File "/usr/lib64/python3.9/importlib/init.py", line 127, in import_module
Oct 29 09:25:55 hass[37769]: return _bootstrap._gcd_import(name[level:], package, level)
Oct 29 09:25:55 hass[37769]: File "", line 1030, in _gcd_import
Oct 29 09:25:55 hass[37769]: File "", line 1007, in _find_and_load
Oct 29 09:25:55 hass[37769]: File "", line 986, in _find_and_load_unlocked
Oct 29 09:25:55 hass[37769]: File "", line 680, in _load_unlocked
Oct 29 09:25:55 hass[37769]: File "", line 850, in exec_module
Oct 29 09:25:55 hass[37769]: File "", line 228, in _call_with_frames_removed
Oct 29 09:25:55 hass[37769]: File "/etc/hass/custom_components/terneo/climate.py", line 4, in
Oct 29 09:25:55 hass[37769]: from .thermostat import Thermostat
Oct 29 09:25:55 hass[37769]: File "/etc/hass/custom_components/terneo/thermostat.py", line 7, in
Oct 29 09:25:55 hass[37769]: from simplejson.errors import JSONDecodeError
Oct 29 09:25:55 hass[37769]: ModuleNotFoundError: No module named 'simplejson'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.