Log Details (ERROR)
Tue May 22 2018 15:36:58 GMT+0200 (CEST)
Error loading custom_components.sensor.plugwisesmile. Make sure all dependencies are installed
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py", line 86, in get_component
module = importlib.import_module(path)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 673, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/homeassistant/.homeassistant/custom_components/sensor/plugwisesmile.py", line 30, in <module>
from lxml import etree
ImportError: No module named 'lxml'
I’m getting the next error log. I think it’s because the API changed
2018-07-04 13:55:52 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform plugwisesmile
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
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/plugwisesmile.py", line 169, in setup_platform
entities.append(PlugwiseSmileSensor(data, sensor_type))
File "/config/custom_components/sensor/plugwisesmile.py", line 239, in __init__
self.update()
File "/config/custom_components/sensor/plugwisesmile.py", line 271, in update
self.data.update()
File "/usr/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 319, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/sensor/plugwisesmile.py", line 190, in update
self._gas_module = self._api.get_gas_module()
File "/config/custom_components/sensor/plugwisesmile.py", line 95, in get_gas_module
module_id = modules_xml.xpath('//modules/module[count(./services/gas_interval_meter)>0]/@id')[0]
IndexError: list index out of range
I have modified the code from Jeroen van der Schoot so it should work on a recent Home Assistant version. Please go here and try it: https://github.com/bouwew/smilep1
I think this will work for a v2. Anyone with a v3 willing to test?
Hi Bouwe,
It’s been a while since you created the new version of this integration.
I’ve recently started with Home Assistant and wanted to install this for my V3.
Can’t get it to work, though. Have you had confirmation in the meantime that it should work? Otherwise I’m more than happy to test any further integration to the V3 version. Would you be willing to adapt it?
That’s just awesome!
Got it working. Tempted to shout out other integrations that I’m looking for, just to see if you’ve covered those as well
Anyway, back to the beta plugwise integration. I do think that some entities are missing. When I have a look at the plugwise smile tests page, I can also see that my setup is orange. I have this setup: electricity, solar and gas ( p1_full_option )
Would it help if I send the files required for that?
The xyz_point_sensors provide values with the unity Watt.
To turn the values of such a sensor to kWh you need to integrate over time, 1hr. And divide by 1000. So you are doing the 2nd part correct but the 1st part is missing.
Please have a look here: https://www.home-assistant.io/integrations/integration/
No that doesn’t work.
First you need to create the kWh-sensor:
- platform: integration
name: net_elect_kwh
source: sensor.p1_net_electricity_point
unit_prefix: k
unit_time: h
round: 1
Change to name to you liking.
This should give you the kWh-sensor that you can use in the next step, in creating the kWh-counters for a day, week, etc. using the Utility Meter integration.