Enigma2 receivers integration

You are including the wrong way.
On configuration.yaml do something like this

enigma: !include configs/enigma.yaml

And then on the enigma.yaml do like this:

devices:
  - host: 192.168.1.20
    port: 80
    name: Gigablue
    picon: picon
    timeout: 20
    username: root
    password: !secret enigma_password
  - host: 192.168.1.21
    port: 80
    name: Dreambox Room
    timeout: 20
    picon: screenshot
    username: root
    password: !secret enigma_password
    bouquet: '1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.dbe1e.tv" ORDER BY bouquet'
  - host: 192.168.1.22
    port: 80
    name: Dreambox Kitchen
    timeout: 20
    picon: screenshot
    username: root
    password: !secret enigma_password

1 Like

ok, its working now - thank you really much

1 Like

Hello,

I just install this nice enigma 2 tool and it works.

I have only one small problem, it does not popup or showing in my google home " google homeassistant" when I search I only see my lights etc, but not the box…

Does this also work with google home?

Media player is exposed to google home. (https://www.home-assistant.io/components/google_assistant/)

You should be able to turn on and off, an change the volume using birghtness.

I tried and that works with my installation: “Ok google, turn on room dreambox” and it turns it on.

Cinzas, Isn’t would be to possible somehow to switch between channels with Google Home? :thinking:

Cinzas, only today had time to upgrade to newest version.

Picons are not showing, screenshots are working.

Any idea?

enigma:
  devices:
    host: 192.168.1.99
    port: 80
    name: Vu+
    picon: picon
    timeout: 20
    username: root
    password: ''
    bouquet: '1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.upcd__digi_hu__1w_.tv" ORDER BY bouquet'

After today update I can’t even start my HA :slight_smile: :slight_smile:
It seems I’ve to look at he the changelogs.

Just arrived from a trip, I will look on it definitively on the weekend, as I have everything down at the moment

We will wait. :grinning: :+1:

@cinzas Here is the problem:

            else:
                self._picon_url = 'http://' + self._host + ':' + \
                                   str(self._port) + '/picon/' + \
                                   str(self._port) + '/picon/' + \
                                   reference.replace(":", "_")[:-1] \
                                   + '.png'
    _LOGGER.debug("Enigma: [update] - Eventtitle for host %s = %s",
                  self._host, eventtitle)

You doubled the line: str(self._port) + '/picon/' + \. Remove and it is ok.

You’re right.
Corrected.

Thanks

@cinzas, if you have time please try to play some local videos from your device. You will see a lot of error in log:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
    await self.hass.async_add_executor_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 "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/media_player/enigma.py", line 207, in update
    xml = self.request_call('/web/epgservicenow?sRef=' + reference)
  File "/config/custom_components/media_player/enigma.py", line 160, in request_call
    HTTPError.code)
AttributeError: type object 'HTTPError' has no attribute 'code'

/web/subservices:

<e2servicelist>
<e2service>
<e2servicereference/>
<e2servicename>valovilag9-41-resz.mp4</e2servicename>
</e2service>
</e2servicelist>

Hmm, why this line does not catch the empty servicereference?

if reference != 'N/A' and \
                            not reference.startswith('1:0:0:0:0:0:0:0:0:0:'):

@madrian Made a small change.

Can you please check now

I think that worked. :slight_smile: :+1::+1::+1:

@cinzas Is it also possible to zap channels? with :OK google, ?
Switch on works.

Unfortunately i don’t think so.
Home assistant exposes the media_player component to the google assistant as a swtich that allows ON,OFF and Brightness.

You can only turn it on and off, and change volume using brightness.

Maybe it will work better in the future.

Cheers

Hi, this custom add-on is really awesome. However since the latest update from github I have 2 issues.

I can‘t select the source anymore - this was working fine with previous versions. Now if I click on it, it does not open the list of the channles from the Bouquet anymore.

Also the picon or screenshots never worked for me so far.

I am running latest hass.io on raspberry pi 3 b+ and I am using the following receivers:

  • Mutant hd2400 with openatv
  • Vu+ Duo2 with vti
  • Vu+ Uno 4K SE with openatv

Do you have any idea what could be the root cause of my issues?
Thanks
Br
Chris

edit:

Log Details (ERROR)
Fri Dec 21 2018 22:38:19 GMT+0100 (CET)

Error handling message: {‘type’: ‘media_player_thumbnail’, ‘entity_id’: ‘media_player.hd2400’, ‘id’: 20}
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/websocket_api/decorators.py”, line 16, in _handle_async_response
await func(hass, connection, msg)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/init.py”, line 881, in websocket_handle_thumbnail
data, content_type = await player.async_get_media_image()
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/init.py”, line 388, in async_get_media_image
return await _async_fetch_image(self.hass, url)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/init.py”, line 815, in _async_fetch_image
response = await websession.get(url)
File “/usr/local/lib/python3.6/site-packages/aiohttp/client.py”, line 361, in _request
ssl=ssl, proxy_headers=proxy_headers, traces=traces)
File “/usr/local/lib/python3.6/site-packages/aiohttp/client_reqrep.py”, line 230, in init
self.update_auth(auth)
File “/usr/local/lib/python3.6/site-packages/aiohttp/client_reqrep.py”, line 397, in update_auth
self.headers[hdrs.AUTHORIZATION] = auth.encode()
File “/usr/local/lib/python3.6/site-packages/aiohttp/helpers.py”, line 127, in encode
creds = (’%s:%s’ % (self.login, self.password)).encode(self.encoding)
UnicodeEncodeError: ‘latin-1’ codec can’t encode characters in position 5-6: ordinal not in range(256)

Hello i had the same issue, the solution for me was:

open in your browser : http://box.ip/web/getservices

You can find your bouquet reference from as follows:

Example 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.favourites.tv" ORDER BY bouquet BOUQUET_NAME_HERE

then add in the config:
bouquet: '1:7:1:0:0:0:0:0:0:0:FROM BOUQUET “userbouquet.favourites.tv” ORDER BY bouquet BOUQUET_NAME_HERE`

1 Like

Could someone please advise why I get the following error;

enigma: Error on device update!

Traceback (most recent call last):
File “/config/custom_components/media_player/enigma.py”, line 155, in request_call
return self._opener.open(uri, timeout=self._timeout).read()
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 “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 248, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 349, in async_device_update
await self.hass.async_add_executor_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 “/usr/local/lib/python3.6/site-packages/homeassistant/util/init.py”, line 324, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/media_player/enigma.py”, line 206, in update
xml = self.request_call(’/web/epgservicenow?sRef=’ + reference)
File “/config/custom_components/media_player/enigma.py”, line 159, in request_call
HTTPError.code)
AttributeError: type object ‘HTTPError’ has no attribute ‘code’

My configuration is set as;

enigma:
devices:

  • host: 192.168.1.29
    port: 80
    name: Zgemma
    timeout: 20
    username: “”
    password: “”
    picon: picon

notify:

  • platform: enigma
    host: 192.168.1.29
    port: 80
    username: “”
    password: “”
    name: Zgemma

Im running Version: OWIF 1.3.3

Version: OWIF 1.3.3

curl http://192.168.1.29/web/getallservices
returns all the xml as expected.
Help much appreciated. Thank you

Hi,

thanks for your feedback and help. I works now for me. Additionally I also removed the username and password from the configuration, because I do not have set any so far and providing clear username: ‘’ generated errors.

BR
Chris

Hello,

I have also an Zgemma, My setup for enigma is this in enigma.yaml :

devices:

  • host: IP address of the Zgemma
    port: 80
    name: Zgemma
    picon: picon
    timeout: 20
    username: secret
    password: secret

in the custom_components/media_player I add the file enigma.py

Thats it.