cyberjunky / home-assistant-custom-components Goto Github PK
View Code? Open in Web Editor NEWMy custom components for Home Assistant
License: MIT License
My custom components for Home Assistant
License: MIT License
I can't get it working. The module seems to load, but I can't configure HA to see my circles.
1) de module seems to load
2020-02-09 18:07:10 INFO (SyncWorker_12) [homeassistant.loader] Loaded plugwise from homeassistant.components.plugwise
2) I did put the file on the location you metioned on git
config # find custom-components/
custom-components/
custom-components/plugwise
custom-components/plugwise/switch.py
custom-components/plugwise/init.py
custom-components/plugwise/manifest.json
3) The configuration in the configuration.yaml
...
...
switch:
platform: rfxtrx
automatic_add: true
devices:
0b11000c0032b3260b010f40:
name: lamp_slaapkamer_MenS
platform: plugwise
port: /dev/ttyUSB1
circles:
CirclePlus: 000D6F0000B81678
Waterbed: 000D6F00044658F3
Droger: 000D6F00044658D7
Boiler: 000D6F00044658D7
CentraleAfzuiging: 000D6F0003562AAC
...
...
And some general info:
arch | x86_64 |
---|---|
dev | false |
docker | true |
hassio | false |
os_name | Linux |
python_version | 3.7.6 |
timezone | UTC |
version | 0.104.3 |
virtualenv | false |
What I'm doing wrong?
Can you please help me?
The switch configured for the rfxtrx is working fine.
Hi,
see also this topic on the home-assistant forum.
Since updating to Home Assistant 0.59, your custom Toon component no longer works. It seems that some things are changed, which requires supported_features (like target_temperature, operation_mode) to be included in climate components.
I installed it by hacs, an made this in the config.yaml:
switch:
But after reboot nothing came, tried it now 2 times.
In the log I found this:
Logger: homeassistant.components.switch
Source: helpers/entity_platform.py:193
Integration: Schakelaar (documentation, issues)
First occurred: 11:38:36 (1 occurrences)
Last logged: 11:38:36
The plugwise platform for the switch integration does not support platform setup. Please remove it from your config.
i am getting errors.
Help!
2019-04-29 20:16:22 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for plugwise_custom which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-04-29 20:16:23 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform plugwise_custom
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, 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/plugwise_custom/switch.py", line 38, in setup_platform
import plugwise
ModuleNotFoundError: No module named 'plugwise'
Hi,
The toon_climate component is outputting errors and the component is not being loaded anymore after changes in the Home Assistant 0.96 update.
Thu Jul 18 2019 15:14:50 GMT+0200 (Midden-Europese zomertijd) Update for sensor.toon_room_temp fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 221, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 380, 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/toon_boilerstatus/sensor.py", line 149, in update self.data.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 224, in wrapper result = method(*args, **kwargs) File "/config/custom_components/toon_boilerstatus/sensor.py", line 98, in update self.data = requests.get(BASE_URL.format(self._host, self._port, '/boilerstatus/boilervalues.txt'), timeout=5, headers={'accept-encoding': None}).json() File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 518, 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 value: line 1 column 1 (char 0)
Thu Jul 18 2019 15:14:50 GMT+0200 (Midden-Europese zomertijd) Update for sensor.toon_room_temp_setpoint fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 221, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 380, 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/toon_boilerstatus/sensor.py", line 149, in update self.data.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 224, in wrapper result = method(*args, **kwargs) File "/config/custom_components/toon_boilerstatus/sensor.py", line 98, in update self.data = requests.get(BASE_URL.format(self._host, self._port, '/boilerstatus/boilervalues.txt'), timeout=5, headers={'accept-encoding': None}).json() File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/local/lib/python3.7/site-packages/simplejson/__init__.py", line 518, 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 value: line 1 column 1 (char 0)
More info about the changes:
https://www.home-assistant.io/blog/2019/07/17/release-96/#climate
[EDIT] Formatting of text
[EDIT 2] Correction of spelling in title.
Hi,
I'm not much of a python coder but want to share this error message when i update my home assistant HASSIO to 0.63. I hope someone can help?
2018-02-12 20:44:04 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.toon_room_temp_setpoint fails Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 201, in async_update_ha_state yield from self.async_device_update() File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 324, in async_device_update yield from self.hass.async_add_job(self.update) File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup future.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/sensor/toon_boilerstatus.py", line 181, in update self._state = float(boilerstatus["roomTempSetpoint"]) TypeError: float() argument must be a string or a number, not 'NoneType'
Love the p2000 component.
Custom_updater support would be nice.
This is the output of my toon, it seems to use a newer(?) device-ID
{
"dev_settings_device":{"uuid":"xxxxxxxxxxxxxx", "name":"settings_device", "internalAddress":"settings_device", "type":"settings_device", "supportsCrc":"0", "location":"(null)"},
"dev_10":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3", "internalAddress":"10", "type":"HAE_METER_v3", "supportsCrc":"1", "ccList":"5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e", "supportedCC":"5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e", "IsConnected":"1", "DeviceName":"", "HealthValue":"10", "location":"(null)"},
"dev_10.1":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3_1", "internalAddress":"10.1", "type":"gas", "supportsCrc":"0", "ccList":"5e 59 85 8e 3c 3d 3e", "supportedCC":"5e 59 85 8e 3c 3d 3e", "CurrentGasFlow":"623.00", "CurrentGasQuantity":"9840.00", "location":"(null)"},
"dev_10.2":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3_2", "internalAddress":"10.2", "type":"elec", "supportsCrc":"0", "ccList":"5e 59 85 8e 3c 3d 3e", "supportedCC":"5e 59 85 8e 3c 3d 3e", "CurrentElectricityFlow":"3163.00", "CurrentElectricityQuantity":"21848.00", "location":"(null)"},
"dev_10.3":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3_3", "internalAddress":"10.3", "type":"elec_solar", "supportsCrc":"0", "ccList":"5e 59 85 8e 3c 3d 3e", "supportedCC":"5e 59 85 8e 3c 3d 3e", "CurrentElectricityFlow":"NaN", "CurrentElectricityQuantity":"NaN", "location":"(null)"},
"dev_10.4":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3_4", "internalAddress":"10.4", "type":"elec_delivered_nt", "supportsCrc":"0", "ccList":"5e 59 85 8e 3c 3d 3e", "supportedCC":"5e 59 85 8e 3c 3d 3e", "CurrentElectricityFlow":"NaN", "CurrentElectricityQuantity":"NaN", "location":"(null)"},
"dev_10.5":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3_5", "internalAddress":"10.5", "type":"elec_received_nt", "supportsCrc":"0", "ccList":"5e 59 85 8e 3c 3d 3e", "supportedCC":"5e 59 85 8e 3c 3d 3e", "CurrentElectricityFlow":"NaN", "CurrentElectricityQuantity":"NaN", "location":"(null)"},
"dev_10.6":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3_6", "internalAddress":"10.6", "type":"elec_delivered_lt", "supportsCrc":"0", "ccList":"5e 59 85 8e 3c 3d 3e", "supportedCC":"5e 59 85 8e 3c 3d 3e", "CurrentElectricityFlow":"NaN", "CurrentElectricityQuantity":"NaN", "location":"(null)"},
"dev_10.7":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3_7", "internalAddress":"10.7", "type":"elec_received_lt", "supportsCrc":"0", "ccList":"5e 59 85 8e 3c 3d 3e", "supportedCC":"5e 59 85 8e 3c 3d 3e", "CurrentElectricityFlow":"NaN", "CurrentElectricityQuantity":"NaN", "location":"(null)"},
"dev_10.8":{"uuid":"xxxxxxxxxxxxxx", "name":"HAE_METER_v3_8", "internalAddress":"10.8", "type":"heat", "supportsCrc":"0", "ccList":"5e 59 85 8e 3c 3d 3e", "supportedCC":"5e 59 85 8e 3c 3d 3e", "CurrentHeatQuantity":"NaN", "location":"(null)"}
}
I changed every dev_3. to dev_10. and that seems to work.
Thanks for sharing your code!
Only Toon Gas Used Last Hour is 0.0
I still need to figure out why.
It seems 'last hour' confused me, it's current gas usage only. The value is valid, but returns to 0 when the flow stops.
2018-10-24 20:48:24 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.toon_power_use fails
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
await self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in iter
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.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/sensor/toon_smartmeter.py", line 180, in update
self._state = energy["dev_2.2"]["CurrentElectricityFlow"]
KeyError: 'CurrentElectricityFlow'
and
2018-10-24 20:48:24 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.toon_power_use_cnt fails
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
await self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in iter
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.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/sensor/toon_smartmeter.py", line 188, in update
self._state = float(energy["dev_2.2"]["CurrentElectricityQuantity"])/1000
KeyError: 'CurrentElectricityQuantity'
After installing HA 0.90.1 the Toon climate component isn't working any more. I get the error below:
2019-03-24 18:55:14 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform toon
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 124, in _async_setup_platform
task = async_create_setup_task()
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 89, in async_create_setup_task
None, platform.setup_platform, hass, platform_config,
AttributeError: module 'homeassistant.components.toon.climate' has no attribute 'setup_platform'
Today I found out that I do not get any new values out of the sensors of the Solarportal component. Also my logging is filled with messages like this:
Jul 30 08:36:48 pi hass[509]: 2020-07-30 08:36:48 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.solar_energy_today fails
Jul 30 08:36:48 pi hass[509]: Traceback (most recent call last):
Jul 30 08:36:48 pi hass[509]: File "/opt/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
Jul 30 08:36:48 pi hass[509]: await self.async_device_update()
Jul 30 08:36:48 pi hass[509]: File "/opt/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 466, in async_device_update
Jul 30 08:36:48 pi hass[509]: self.update # type: ignore
Jul 30 08:36:48 pi hass[509]: File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
Jul 30 08:36:48 pi hass[509]: result = self.fn(*self.args, **self.kwargs)
Jul 30 08:36:48 pi hass[509]: File "/home/pi/.homeassistant/custom_components/solarportal/sensor.py", line 179, in update
Jul 30 08:36:48 pi hass[509]: self._state = income.find('etoday').text
Jul 30 08:36:48 pi hass[509]: AttributeError: 'NoneType' object has no attribute 'find'
my boilerstatus gives an error constantly:
2019-03-10 17:46:34 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.toon_boiler_intemp fails
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
await self.async_device_update()
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 348, 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/toon_boilerstatus/sensor.py", line 161, in update
self._state = float(boilerstatus["boilerInTemp"])
TypeError: float() argument must be a string or a number, not 'NoneType'
of course I should comment out the boilerInTemp in my config, but it would be nice if this was not an error but a warning, with some information in there.
Here's my boilervalues.txt
{"sampleTime":"10-03-2019 17:45:00","boilerSetpoint":28.44,"roomTempSetpoint":20.5,"boilerPressure":6,"roomTemp":20.5,"boilerOutTemp":36,"boilerInTemp":null,"boilerModulationLevel":11}
Hi
I have a lot of plugwise and want to use them in hass.
But i have no idea how to use/place the dependency ?
It has this dependency: python-plugwise
Can you explain a little bit more where to place them and which files ?
Thanks
Andreas
Hey, love the plugwise component.
I have 9 circles and 1 circle+.
When using the Windows software it finds them all, but when I use Home Assistant i get a lot of timeouts, especially when restarting HASS.
After restart some are missing and the only way to get them back is by restarting HASS over and over again untill they are discovered again. Is there any way to give the component more time to discover all the circles?
Running HASS in venv on a NUC btw.
Heres a log example.
2019-05-19 09:41:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.homecinema fails Traceback (most recent call last): File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state await self.async_device_update() File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 377, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/plugwise/switch.py", line 107, in update self.data.update() File "/home/homeassistant/.homeassistant/custom_components/plugwise/switch.py", line 127, in update self.current_consumption = plugwise.Circle(self.mac, self.stick).get_power_usage() File "/srv/homeassistant/lib/python3.6/site-packages/plugwise/api.py", line 177, in get_power_usage corrected_pulses = self.pulse_correction(pulse_1s) File "/srv/homeassistant/lib/python3.6/site-packages/plugwise/api.py", line 125, in pulse_correction self.calibrate() File "/srv/homeassistant/lib/python3.6/site-packages/plugwise/api.py", line 143, in calibrate calibration_response = self._expect_response(PlugwiseCalibrationResponse) File "/srv/homeassistant/lib/python3.6/site-packages/plugwise/api.py", line 114, in _expect_response return self._comchan.expect_response(response_class, self.mac) File "/srv/homeassistant/lib/python3.6/site-packages/plugwise/api.py", line 73, in expect_response retval = self._recv_response(resp) File "/srv/homeassistant/lib/python3.6/site-packages/plugwise/api.py", line 53, in _recv_response raise TimeoutException("Timeout while waiting for response from device") plugwise.exceptions.TimeoutException: Timeout while waiting for response from device
EDIT: Tried to adjust the DEFAULT_TIMEOUT = 10 in the /srv/homeassistant/lib/python3.6/site-packages/plugwise/api.py file, this helps a little.
Using CyberJunky's plugwise lib.
I see how you get the data from the smartmeter and boiler. But how to get the data of the smartplugs?
The smartplugs show up in the zwave devices:
http://192.168.1.11:10080/hdrv_zwave?action=getDevices.json
"dev_5": {"uuid": "9426f408-6736-4e19-a6c4-266f71a5696c", "name": "Lampjes", "internalAddress": "5", "type": "NAS_WR01Z", "supportsCrc": "0", "ccList": "5e 72 86 85 59 5a 73 70 25 27 71 32 20", "supportedCC": "5e 72 86 85 59 5a 73 70 25 27 71 32 20", "nodeFlags": [], "IsConnected": "1", "DeviceName": "Lampjes", "TargetStatus": "0", "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "9200.00", "HealthValue": "10"},
Where nothing changes when switching the devices on or off. Sothe CurrentElectricityFlow stays at 0.00 and the CurrentElectricityQuantity stays at 9200. I thought these would change, as some other wich would represent the current status of the smartplug. IsConnected does change when the smartplug is removed from a wall socket.
And I can switch the smartplugs with:
http://192.168.1.11:10080/hdrv_zwave?action=basicCommand&nodeID=4&state=1
But how to get the status and the elec_flow of the smartplugs? I can't seem to find it on the devices and googling doesn't help.
I Would like to see the feature added that calculates or displays the power usage of today. I would like to see how much power I used today. Now I always have to go to the Toon.
Hi,
plugwise component isn't worrking anymore after updating to 0.96.
can anyone put me in the right direction to get this fixed.
thx, Athebe
I wanted to be able to tell Toon to resume it's normal program and I added the following to the toon.py climate-component.
self._operation_list = ['Comfort', 'Home', 'Sleep', 'Away', 'Holiday', 'ProgramOn', 'ProgramOff']
def set_operation_mode(self, operation_mode):
"""Set HVAC mode (comfort, home, sleep, away, holiday, programon, programoff)."""
state = 2
if operation_mode == "Comfort":
mode = 0
elif operation_mode == "Home":
mode = 1
elif operation_mode == "Sleep":
mode = 2
elif operation_mode == "Away":
mode = 3
elif operation_mode == "Holiday":
mode = 4
elif operation_mode == "ProgramOn":
mode = -1
state = 1
elif operation_mode == "ProgramOff":
mode = -1
state = 0
self._data = self.do_api_request(BASE_URL.format(
self._host,
self._port,
'/happ_thermstat?action=changeSchemeState'
'&state='+str(state)+'&temperatureState='+str(mode)))
_LOGGER.debug("Set operation mode=%s(%s%s)", str(operation_mode),
str(state),str(mode))
ProgramOff disables Toon's program. ProgramOn re-enables it and activates the proper program according to Toon's schedule.
There's probably a more elegant way to solve this, but this works fine for me.
I could open a PR if that's helpful.
Could you perhaps configure this github repository to have support voor the Home Assistant Community Store, which makes it easy to update the custom components from within Home Assistant. https://hacs.xyz/
Hello Ron,
Since the last update of home assistant the plugwise plugin is not working anymore and replies with a timeout in the logs.
Before this update I did not had any problems.
Details:
Home Assistant 0.102.2
Frontend-versie: 20191119.6 - latest
Hass.io 192
Logboekdetails ( ERROR )
Fri Nov 29 2019 07:27:00 GMT+0100 (Midden-Europese standaardtijd)
plugwise: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, 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/plugwise/switch.py", line 105, in update
self.data.update()
File "/config/custom_components/plugwise/switch.py", line 125, in update
self.current_consumption = plugwise.Circle(self.mac, self.stick).get_power_usage()
File "/usr/local/lib/python3.7/site-packages/plugwise/api.py", line 177, in get_power_usage
corrected_pulses = self.pulse_correction(pulse_1s)
File "/usr/local/lib/python3.7/site-packages/plugwise/api.py", line 125, in pulse_correction
self.calibrate()
File "/usr/local/lib/python3.7/site-packages/plugwise/api.py", line 143, in calibrate
calibration_response = self._expect_response(PlugwiseCalibrationResponse)
File "/usr/local/lib/python3.7/site-packages/plugwise/api.py", line 114, in _expect_response
return self._comchan.expect_response(response_class, self.mac)
File "/usr/local/lib/python3.7/site-packages/plugwise/api.py", line 73, in expect_response
retval = self._recv_response(resp)
File "/usr/local/lib/python3.7/site-packages/plugwise/api.py", line 53, in _recv_response
raise TimeoutException("Timeout while waiting for response from device")
plugwise.exceptions.TimeoutException: Timeout while waiting for response from device
getting the same error on hass every time did what was written...
Error fetching description at http://127.0.0.1:58080/dcf2819722.xml
18:27 ssdp.py (WARNING)
Error doing job: Task exception was never retrieved
18:27 loader.py (ERROR)
Should it be possible to use Toon with the Google Assistant. If i ask OK Google whats the temperature. It says the current temperature but also says toon is Off
There is no way to activate it. And if i like to change te temperature it seems not to recognize the command.
Any idea ?
Got a new Smartmeter the other day and tried to connect it to Home Assistant via your Custom Component. However, the sensors all remain "unknown" in HA.
Relevant config:
# sensors.yaml
- platform: toon_smartmeter
host: !secret toon_host
port: !secret toon_port
scan_interval: 60
resources:
# - gasused #No Gas smart meter module yet
# - gasusedcnt
- elecusageflowlow
- elecusagecntlow
- elecusageflowhigh
- elecusagecnthigh
- heat
JSON from Toon:
{"dev_settings_device":
{"uuid": "616d0bfd-646f-422e-ab09-0251102dbd12", "name": "settings_device", "internalAddress": "settings_device", "type": "settings_device"},
"dev_2": {"uuid": "935246f8-0fbf-4b71-9a69-d72f7b43130c", "name": "HAE_METER_v3", "internalAddress": "2", "type": "HAE_METER_v3", "supportsCrc": "1", "ccList": "5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e", "supportedCC": "5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e", "nodeFlags": [], "IsConnected": "1", "HealthValue": "-1", "DeviceName": "HAE_METER_v3", "CurrentSensorStatus": "UNKNOWN"},
"dev_2.1": {"uuid": "41c54ffc-e075-4f2c-81ee-42328b7efc0f", "name": "HAE_METER_v3_1", "internalAddress": "2.1", "type": "HAE_METER_v3_1", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "COMMISSIONING", "CurrentGasFlow": "0.00", "CurrentGasQuantity": "0.00", "DeviceName": ""},
"dev_2.2": {"uuid": "a1b51016-0e26-4542-85d1-5aa6b6c4dab4", "name": "HAE_METER_v3_2", "internalAddress": "2.2", "type": "HAE_METER_v3_2", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "DISABLED", "DeviceName": "", "CurrentElectricityFlow": "NaN", "CurrentElectricityQuantity": "NaN"},
"dev_2.3": {"uuid": "e89338cc-158e-439e-a53b-a92139738f39", "name": "HAE_METER_v3_3", "internalAddress": "2.3", "type": "HAE_METER_v3_3", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "UNKNOWN", "DeviceName": "", "CurrentElectricityFlow": "NaN", "CurrentElectricityQuantity": "NaN"},
"dev_2.4": {"uuid": "4e23518f-449b-440e-9dd4-c5af902c2074", "name": "HAE_METER_v3_4", "internalAddress": "2.4", "type": "HAE_METER_v3_4", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "OPERATIONAL", "DeviceName": "", "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "4103.00"},
"dev_2.5": {"uuid": "06ecd825-c0da-4b81-b2fb-29c7be487ee0", "name": "HAE_METER_v3_5", "internalAddress": "2.5", "type": "HAE_METER_v3_5", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "OPERATIONAL", "DeviceName": "", "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "0.00"},
"dev_2.6": {"uuid": "c364a3bd-1886-4b93-a14b-fd0073adf472", "name": "HAE_METER_v3_6", "internalAddress": "2.6", "type": "HAE_METER_v3_6", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "OPERATIONAL", "DeviceName": "", "CurrentElectricityFlow": "284.00", "CurrentElectricityQuantity": "5260.00"},
"dev_2.7": {"uuid": "a71ac503-f1c2-4c49-a40a-8c2e0b52799a", "name": "HAE_METER_v3_7", "internalAddress": "2.7", "type": "HAE_METER_v3_7", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "OPERATIONAL", "DeviceName": "", "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "5.00"},
"dev_2.8": {"uuid": "88fc3dca-b996-4915-84a2-c778e0f29bdd", "name": "HAE_METER_v3_8", "internalAddress": "2.8", "type": "HAE_METER_v3_8", "supportsCrc": "0", "ccList": "5e 59 85 8e 3c 3d 3e", "supportedCC": "5e 59 85 8e 3c 3d 3e", "nodeFlags": [], "CurrentSensorStatus": "UNKNOWN", "DeviceName": "", "CurrentHeatQuantity": "NaN"}
}
I am not familiar with checking out/in, but to get the component working in HASS 0.89.0, I had to change/add something in the climate.py file.
I changed the imports to the following:
from homeassistant.components.climate import (ClimateDevice, PLATFORM_SCHEMA)
from homeassistant.components.climate.const import (SUPPORT_TARGET_TEMPERATURE, SUPPORT_OPERATION_MODE)
After a fresh install of a rooted toon (never worked before) i did follow all instructions. But the custom component wont connect.
`Log Details (ERROR)
Thu Oct 10 2019 21:52:11 GMT+0200 (Midden-Europese zomertijd)
Error while setting up platform toon_climate
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.7/http/client.py", line 1244, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1290, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1239, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 184, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 164, in _new_conn
% (self.host, self.timeout),
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7fa9d1432810>, 'Connection to 192.168.2.10 timed out. (connect timeout=5)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.2.10', port=10080): Max retries exceeded with url: /happ_thermstat?action=getThermostatInfo (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fa9d1432810>, 'Connection to 192.168.2.10 timed out. (connect timeout=5)'))
During handling of the above exception, another exception occurred:
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/toon_climate/climate.py", line 68, in setup_platform
config.get(CONF_PORT))])
File "/config/custom_components/toon_climate/climate.py", line 90, in init
self.update()
File "/config/custom_components/toon_climate/climate.py", line 119, in update
'/happ_thermstat?action=getThermostatInfo'))
File "/config/custom_components/toon_climate/climate.py", line 95, in do_api_request
req = requests.get(url, timeout=DEFAULT_TIMEOUT)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 504, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.2.10', port=10080): Max retries exceeded with url: /happ_thermstat?action=getThermostatInfo (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fa9d1432810>, 'Connection to 192.168.2.10 timed out. (connect timeout=5)'))`
Since HA 0.89, Toon came with the following error:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 124, in _async_setup_platform
task = async_create_setup_task()
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 89, in async_create_setup_task
None, platform.setup_platform, hass, platform_config,
AttributeError: module 'homeassistant.components.toon.climate' has no attribute 'setup_platform'
I have already placed the python script in a folder named 'toon and renamed the .py files to climate.py and sensor.py for release 0.88
As discussed from this post on:
Toon app: boiler status the Toon is able to display the status of an OpenTherm boiler. If it would be possible to incorporate this data in Home-Assistant the need for an OpenTherm Gateway is taken away since you will be able to log and monitor the behaviour of your boiler more closely.
I'm using HA 0.91, changed the location of the files as instructed (custom_components/solarportal) and downloaded the latest files.
Configuration is unchanged. But SolarPortal no longer works.
home_assistant.log shows the following errors:
2019-04-05 07:49:10 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform solarportal
Traceback (most recent call last):
File "/home/pi/.homeassistant/custom_components/solarportal/sensor.py", line 68, in setup_platform
data = SolarPortalData(host, port, username, password)
File "/home/pi/.homeassistant/custom_components/solarportal/sensor.py", line 111, in __init__
root = ET.parse(urlopen(requesturl)).getroot()
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 472, in open
response = meth(req, response)
File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.5/urllib/request.py", line 510, in error
return self._call_chain(*args)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=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/pi/.homeassistant/custom_components/solarportal/sensor.py", line 69, in setup_platform
except RunTimeError:
NameError: name 'RunTimeError' is not defined
I ran into a problem with HA 0.92, overriding a build in component now requires a manifest.json.
My fix was to rename the toon folder to toon_custom and use toon_custom instead of toon as the platform.
Location sensor totally wrong. Despite latitude longitude data correctly config. Map location of the sensor is somewhere under Africa, while it must be in the Netherlands.
Hi . Thx for the great work
Any id how to get the ui card back in Lovelace . I lost the option home/sleep/away/comfort
Ha version 0.86.4
When using the new P2000 sensor I get status unknown. When I switch to the map the log is filling with errors: ERROR (MainThread) [frontend.js.latest.201901211] http://ha:8123/frontend_latest/4f3fb0938fa64e54c4e9.chunk.js:4:18668 TypeError: null is not an object (evaluating 'latlng.lat') and the map is behaving weird.
Updated from 0.87.0 to 0.88.0 and now Toon isn't working anymore:
2019-02-21 17:10:53 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform toon
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/toon/climate.py", line 21, in setup_platform
add_entities([ThermostatDevice(hass)], True)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/toon/climate.py", line 31, in __init__
self.thermos = hass.data[toon_main.TOON_HANDLE]
KeyError: 'toon_handle'
I noticed in HASS my GasUsed last hour was quite high, inspected the code and found this:
toon_smartmeter.py
if self.type == 'gasused':
if 'dev_3.1' in energy:
self._state = float(energy["dev_3.1"]["CurrentGasFlow"])/100
elif 'dev_2.1' in energy:
self._state` = float(energy["dev_2.1"]["CurrentGasFlow"])/100
If I look in my Toon the CurrentGasFlow is measured in liter,
"CurrentGasFlow": "3345.00"
Which shows 3345 liter on my Toon, so it should be /1000 right?
I wasn't sure if you'd like me to open a pull request hence the opening of the issue.
Thanks for the SolarPortal component, I like it. Since 6 months or so, the Omnik portal website switched to https. I would like to ask you if you could check whether it is now also possible to talk to their API securely, and if possible update the component.
This way the username and password would no longer be sent unencrypted. Thanks in advance!
I want to use the plugwise and p2000 addons in my HA.
Sadly I cannot import the repo via the addons store and import function.
I am complete new to HA so maybe I am just missing something.
19-08-12 17:59:19 INFO (MainThread) [hassio.store.git] Clone add-on https://github.com/cyberjunky/home-assistant-custom-components repository
19-08-12 17:59:22 ERROR (MainThread) [hassio.utils.json] Can't read json from /data/addons/git/166757fd/repository.json: [Errno 2] No such file or directory: '/data/addons/git/166757fd/repository.json'
19-08-12 17:59:22 WARNING (MainThread) [hassio.store.data] Can't read repository information from /data/addons/git/166757fd/repository.json
19-08-12 17:59:22 INFO (MainThread) [hassio.store] Load add-ons from store: 59 all - 0 new - 0 remove
Hi, i'm searching for a way too include the burnerInfo state of my rooted toon. I saw in your toon_google that you already pull the data, but not sure how it is displayed so i can use it.
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.