I do not think that HA is running in a virtual env. wihtin the docker, but of course I am not an expert.
But there is no /srv/homeassistant directory
If I run the PIP command within the Docker I am getting this error message:
root@UnRaid:/usr/src/app# pip install PyBLNET==0.4.2
Collecting PyBLNET==0.4.2
Using cached https://files.pythonhosted.org/packages/73/72/668f8ab18ed0291bd89430bc39784ffd19ffa0cacbc5dda30151b1a627bf/PyBLNET-0.4.2-py2.py3-none-any.whl
Collecting html (from PyBLNET==0.4.2)
Using cached https://files.pythonhosted.org/packages/4a/df/0e3d22d50ee43274eb5116f49972a164d853bb3ab305a69a0540b6292252/html-1.16.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 14, in <module>
from setuptools.dist import Distribution, Feature
File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 24, in <module>
from setuptools.depends import Require
File "/usr/local/lib/python3.6/site-packages/setuptools/depends.py", line 7, in <module>
from .py33compat import Bytecode
File "/usr/local/lib/python3.6/site-packages/setuptools/py33compat.py", line 11, in <module>
from setuptools.extern.six.moves import html_parser
File "/usr/local/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 92, in __get__
result = self._resolve()
File "/usr/local/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 115, in _resolve
return _import_module(self.mod)
File "/usr/local/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 82, in _import_module
__import__(name)
ModuleNotFoundError: No module named 'html.parser'; 'html' is not a package
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-rzjxgfdy/html/
The error was caused by using a deprecated html module inside pyblnet. Try fetching the newest blnet custom component files (raising the required version of pyblnet to 0.5). This should fix it.
2018-05-17 09:40:07 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package pyblnet==0.5: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-ual7_aub/html/
2018-05-17 09:40:07 ERROR (MainThread) [homeassistant.requirements] Not initializing blnet because could not install requirement pyblnet==0.5
2018-05-17 09:40:07 ERROR (MainThread) [homeassistant.setup] Setup failed for blnet: Could not install all requirements.
Unfortunatley I am not a linux/docker pro, but somehow I think this is docker-related…
I released a new version of PyBLNET (0.5.1) and set this requirement in the blnet.py files. Try the new ones. A manual installation of pyblnet should not be necessary anymore.
With the configuration, as long as it is at top level and specified as you said, I cannot find the error.
It is working perfectly, better then before on the RPi. On the RPi sometimes the BLNET didnt except any new requests if I often restarted home assistant in a short time. Now this is completley gone.
I want to donate you a beer (or whatever you are drinking)
Update for this project: There are now switches included for controlling whether a digital output works in automated (AUTO) or manual (HAND) mode. They are generated with the same id as their corresponding outptut switches but with the appendix _automated (i.e. switch.blnet_digital_2_automated). They are turned on if the switch is controlled by the blnet program and turned off when controlled manually.
Speed, energy and power meter are now supported too as a direct TCP connection is built up similar to the one use by the official TA tools
It can be chosen which connections to use. If web connection is turned off, digital values cannot be switched anymore and automation state cannot be retreived. Without TA connection, no power, energy or speed values may be retreived.
Configuration is as follows:
blnet:
resource: "http://myaddress"
password: pw
can_node: 1 # optional, will use default
use_web: true # optional, default true, use web frontend to scrap data
use_ta: true # optional, default true, use TCP connection to receive data
web_port: 80 # optional, default 80
ta_port: 40000 # optional default 40000
but upon startup of hass I get the following errors:
2018-12-03 16:23:24 ERROR (MainThread) [homeassistant.setup] Error during setup of component blnet
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
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/blnet.py", line 98, in setup
data = fetch_data()
File "/home/homeassistant/.homeassistant/custom_components/blnet.py", line 94, in fetch_data
return hass.data["DATA_{}".format(DOMAIN)].update()
File "/home/homeassistant/.homeassistant/custom_components/blnet.py", line 156, in update
data = self.blnet.fetch(self.node)
File "/srv/homeassistant/lib/python3.6/site-packages/pyblnet/blnet.py", line 56, in fetch
self.blnet_web.read_analog_values()
File "/srv/homeassistant/lib/python3.6/site-packages/pyblnet/blnet.py", line 106, in _convert_web
for sensor in values:
TypeError: 'NoneType' object is not iterable