Hooking up the UVR1611 via BLNET

Hey, thanks for this detailed log!

Did you set up the username and password required to log into the device? If not, I think the component fails to log in and returns None (which of course should be handled, I will fix that soon).

Another possible point of failure is a RequestException - in that case most likely your BLNet is not reachable and the request times out.

Could any of this cause your problem?

Unfortunately that’s not it.

There is no login/password set (just tried again from a new browser to be sure), and it is also reachable.

Any other ideas? I’d be happy to try new versions and post logs if it helps.

thanks!

Unfortunatly it seems like “no login required” currently is a problem (see this issue on the PyBLNET package)

Can you configure the BLNET to require a password for login and try again?

Sorry, I can’t set a password, as the UVR1611 scraper for my current home automation system does not support logins. I’m at the start of the process of migrating everything into HA, and the UVR1611 is a pretty important component in my system. But it will probably be weeks until HA is all properly setup and all components have been migrated, so I can’t really make changes that break my current system…

Alright. Fear not, a recent pull request will most likely fix this issue. I expect it to be included into the custom component in about one to two weeks.

Great! I just tried out the change quickly with the example.py, and I can get the blnetweb read_analog and read_digital working.

blnet high level interface and blnetdirect still throw an exception, though, have to investigate further.

There actually is just one value I’m missing from the web data: current actual heat pump power in kW… don’t know why this is not included in the web interface of the UVR1611.

Somehow my BLNET Integration is throwing now error messages since upgrade to 0.88

WARNING (MainThread) [homeassistant.loader] Integrations need to be in their own folder. Change switch/blnet.py to blnet/switch.py. This will stop working soon.

2019-02-23 17:46:18 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.blnet.switch. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/loader.py", line 147, in _load_file
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 962, in _find_and_load_unlocked

Thanks for the hint! I looked into it and changed the source according to the current layout. Now, simply copy the directory blnet from homeassistant/components into the custom_components directory.

Also, remove the top level blnet.py and the blnet.py files inside sensor and switch. This is now all included in the one package mentioned above. No configuration changes should be needed! I am always glad about feedback!

Many Many Thanks!

Another stupid question:

I created a history_graph:

history_graph:
  solar_graph:
    name: Solar Graph
    entities:
      - sensor.blnet_analog_1
      - sensor.blnet_analog_3
      - sensor.blnet_analog_6
      - sensor.blnet_analog_2
    hours_to_show: 48
    refresh: 300

Although my Sensor “Analog_1” is showing negative values (it is the outside sensor) I can see in the graph only positiv values.

image

Do you have an idea, why the graph is cut at 0 Degree Celsius?

Br,
Johannes

Ok, I think I was wrong. It seems that the sensor is also not showing values below zero.

Hi @nielstron, I can verify it now.

The BLNET Sensor is not delivering values below 0 degree. Maybe you have an idea?

Br,
Johannes

Hey @ebnerjoh,

I have had a quick look in the underlying library. Turns out negative values (prefixed by a “-”) simply weren’t parsed at all. This was fixed now. Change the required version of pyblnet to 0.8.0 or just update to the current files in the repository. Hope this fixes your issue!

Br

Hi,

Did you really update the repo? Last update is 7 days ago.

Br,
Johannes

You’re right, I didn’t push. Now it is online. :slight_smile:

Dear @nielstron

I am using your component since long time.

Reading basic values working perfectly fine. I was also able to read the difgital output, but somewhen it stopped working.

I am having pyBlnet 0.8.0 and also the latest “custom_components” installed but somehow I do not get the values anymore. The attributes are shown up, but not with accurate values.

Br,
Johannes

Hello @ebnerjoh ,

somehow I do not get the values anymore. The attributes are shown up, but not with accurate values.

I am sorry to hear that. Can you give a few more details, like when (pyblnet update, new custom component, new home-assistant version) the component stopped working? Or can you provide me with some error logs or the kind of error in the digital values?

Best regards

Hi,

Somehow my BLNET is broken, maybe this is the reason for that. I ordered now a CMI.

Br,
Johannes

Hi Nielstron,

i’m trying to attach my UVR1611 to my home assist. Actually i stuck at the following problem:
Maybe you have an Idea … The connection and login seems to be successfully.But then this problem appears:
Source: custom_components/blnet/init.py:147
First occurred: 8:12:53 AM (1 occurrences)
Last logged: 8:12:53 AM

Error during setup of component blnet
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 174, in async_setup_component
component.setup, hass, processed_config # type: ignore
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/blnet/init.py”, line 103, in setup
data = fetch_data()
File “/config/custom_components/blnet/init.py”, line 99, in fetch_data
return hass.data["DATA
{}".format(DOMAIN)].update()
File “/config/custom_components/blnet/init.py”, line 147, in update
data = self.blnet.fetch(self.node)
File “/usr/local/lib/python3.7/site-packages/pyblnet/blnet.py”, line 86, in fetch
self.blnet_web.read_analog_values())
File “/usr/local/lib/python3.7/site-packages/pyblnet/blnet_web.py”, line 195, in read_analog_values
data_raw = dom.text()
AttributeError: ‘NoneType’ object has no attribute ‘text’
Connection lost. Reconnecting…

Regards wiggi

Hi @wiggi, sorry for the late reply. Is this issue still occuring? Please mention me directly with “@” when replying so that I get notified via email.

Hi @nielstron
I am very new to Home Assistant and looking into it as replacement for FHEM. While the Homematic stuff is still on FHEM I want to start integrating the UVR1611 in HA.
HA runs as virtual environment on a raspberry and I installed your packages as described above:

  • sudo to HA user and start virtual python environment
  • installed with pip3 install PyBLNET
  • added the blnet part to the configuration.yaml under ~/.homeassistant

When I start HA I get the following error message:

ERROR (MainThread) [homeassistant.setup] Setup failed for blnet: Integration not found.

And honestly I have no clue where to look …