Enigma2 receivers integration

I did a bit of digging and it turns out that the dreamboxes I have run different plugins than your setup, because I have an other webinterface installed than the OpenWebIf. I also cannot install the OpenWebIf because it used the old standard of installing plugins through ipk packages instead of deb packages.

I checked the link you provided and the OpenWebIf interace is totally different than the one I am using, but somehow your component still works on some of my dreamboxes so I guess there has to be some similarities.

Here are three pictures of my webinterface of a dreambox that does work (has the same software as the dreambox that doesn’t work, I dunno why):

Webinterface dreambox livingroom

Webinterface device info page dreambox livingroom

Webinterface about page dreambox livingroom

Hmmm

I would like to install that image in one of my boxes just to try it.
But it’s strange it is working in some but not in the others :face_with_raised_eyebrow:

Yeah right?! Like it should work on both, or not work on both… I also encountered another error with a dreambox I recently placed outside in my garden to watch tv on, this one got the same image as my dreambox in my bed room which works 100% with your component… The error thrown is different, it doesn’t throw the http 412 condition failed but another one. The weird thing is that it doesn’t always behave like this, so sometimes I get this error in my log every single minute, and sometimes it just works like it should and doesn’t throw an error. It feels like the error is thrown more often when the dreambox is turned off.

Update for media_player.terras_dreambox fails

Traceback (most recent call last):
  File "/home/hass/.homeassistant/custom_components/media_player/enigma.py", line 152, in request_call
    return self._opener.open(uri, timeout=self._timeout).read().decode('UTF8')
  File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
    yield from self.async_device_update()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
    yield from self.hass.async_add_job(self.update)
  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/util/__init__.py", line 319, in wrapper
    result = method(*args, **kwargs)
  File "/home/hass/.homeassistant/custom_components/media_player/enigma.py", line 193, in update
    xml = self.request_call('/web/epgservicenow?sRef=' + reference)
  File "/home/hass/.homeassistant/custom_components/media_player/enigma.py", line 154, in request_call
    _LOGGER.exception("Enigma: [request_call] - Error connecting to remote enigma %s: %s ", self._host, HTTPError.code)
AttributeError: type object 'HTTPError' has no attribute 'code'

If you need any help with finding or installing the right image I can try to help!

Cheers

Anyone else getting these errors? I am running 69b.0.3 and has just happened since the beta install.

2018-05-11 09:36:39 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.media_player.enigma. Make sure all dependencies are installed

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/loader.py”, line 86, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/media_player/enigma.py”, line 15, in
from bs4 import BeautifulSoup
ModuleNotFoundError: No module named ‘bs4’

Hi

Check the readme :slight_smile:

Install BeautifoulSoup:

$ python3 -m pip install BeautifoulSoup4

yep had already done that

python3 -m pip install BeautifoulSoup4
Collecting BeautifoulSoup4
Could not find a version that satisfies the requirement BeautifoulSoup4 (from versions: )
No matching distribution found for BeautifoulSoup4

I had to create another VE for HA, so not sure what problem is with the new VE

I had the same issue. Just try: python3.6 -m pip install BeautifoulSoup4

BTW: greate job! Thank you cinzas.

Hi. thanks… just confirming the install has to run in the Virtual Environment of HA?

That’s correct :slight_smile:

I love this idea

1 Like

Still getting “Could not find a version that satisfies the requirement BeautifoulSoup4 (from versions: )
No matching distribution found for BeautifoulSoup4” running “python3.6 -m pip install BeautifoulSoup4”

Try:

pip install beautifulsoup4

:wink:

I have similar problem some one run on Hassbian?

I am a newbie at Home Assistant (I was using OpenHab). Yesterday I installed hass.io just to try your enigma2 integration (I was looking for an implementation for OpenHab, with no success). However, after copying enimapy to /config/custom_components/media_player/ and /config/custom_components/notify/ and including the configuration examples (with my profile) that you include in GitHub, I obtain the following error:

SyntaxError: invalid syntax
Fatal error while loading config: invalid syntax (enigma.py, line 7)
Failed config
General Errors:
- invalid syntax (enigma.py, line 7)

Maybe the problem is the BeautifulSoup module. Any idea how to install it in hass.io?

Thanks in advance!

Hi

You put the files in the wrong folder.
From the README.

To use the media_player custom component, place the file enigma.py from the folder media_player inside your folder ~/.homeassistant/custom_components/media_player To use the notify custom component, place the file enigma.py from the folder media_player inside your folder ~/.homeassistant/custom_components/notify

The custom components directory is inside your Home Assistant configuration directory.

You need to install (if not yet) the BeautifoulSoup module for Pyhton.

Finally, I think that was a problem with the file that I uploaded. Now, everything is working fine in a Vu+ Solo2 with the OpenSpa distribution.

Now, I am going to integrate it with my Google Assistant (Home mini) :wink:

Thanks for your work and response.

Hi, first thank you for great integration of Enigma2 in HA!

Please can you tell me if there is a possibility of selection other services inside all bouquets because now I can see sources only from first bouquet.

Will this component work on hassOS?

Ok, got it working. But i had some trouble with the configuration because i havent set a password on my vuplus.
You must add the following to your configuration:

password: ‘’

Is it possible to completely turn off the receiver with this component?
I want to shutdown the receiver and cut the power with a sonoff s20 when I’m away. And start the receiver when i turn on the sonoff again.

Edit: never mind, found out. Changed the power off state to 1

why is this not in the HA Components page ?

Because it’s a custom component that the developer hasn’t submitted for inclusion.