Hooking up the UVR1611 via BLNET

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
    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/


Then you have to install html==1.0 again before installing PyBLNET

I am getting the same error message when doing that.

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.

I think I have done this.

Because when I try to install it outside the docker it is installing without any issues.

But I will check again.

Ok, I noticed that you just updated the files a couple of minutes ago :slight_smile: Also the PyBLNET.

So I replaced the 3 files in custom_components and I also did a pip3 install pyblnet==0.5, outside the docker.

Now I am not getting an error message in HA.log anymore after restarting HA, but I still get an error message on the frontend invalid config.

The config itself is just:

  ressource: ip_of_blnet
  password: pass_of_blnet

this should be “resource” with one s

Also note that you can specify the scan_interval, if the parsing breaks down due to too often accessing the blnet.

Of course, my mistake, but I had the typo only here in the forum.

The “can_node” I am not using, having only one UVR. On the raspberry it worked without any issues.


Did you use the exactly same configuration? I.e. the resource should have a http:// in front of the IP


But now I can see again the error message:

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.

1 Like


Now it is working!!!



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) :slight_smile:

1 Like

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.


Update for this project:

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:

   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


I am getting the following error, when starting HA-Docker:

2018-11-04 09:51:05 ERROR (MainThread) [homeassistant.setup] Error during setup of component blnet

Traceback (most recent call last):
File "/usr/src/app/homeassistant/setup.py", line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
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/blnet.py", line 94, in setup
load_platform(hass, 'sensor', DOMAIN, disc_info)
TypeError: load_platform() missing 1 required positional argument: 'hass_config'

This seems to be a recent change in the HA base. Passing the homeassistant configuration is now required instead of optional as it was before.

It should work now, with the most recent fix. Please tell me if it does!

1 Like

Thanks, works perfectly again.


I’m having troubles getting this installed.

Installed the pyblnet using pip in the ha venv:

pip install PyBLNET

and added the config:

# UVR1611
  resource: ''
  can_node: 1

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
  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

Any help would be greatly appreciated!