Enigma2 receivers integration

Correct. I first wanted to try out and share with the community to see the feedback.
I also need to see what is needed to submit. These were my first and only steps in to python, so I need to see what kind of support can be granted later :slight_smile:

1 Like

Cinzas, I have one suggestion for improvement of your module. Everything is working greate for me for few months now (openwebif 0.4.7). Today I decided to turn off my receiver and I have found one annoying thing, a lot of errors start to spaming the log file. I have to remove my receiver from coniguration.yaml because that. Could you do somethink like greyed the device when the device is unacessible? It will be much better than spaming about connection errors…

@cinzas

what need to be changed in the code to load xyz bouquet? I am using a bouquet updater script and well, my main bouquet is not the first one.

That’s one of the things I want to implement - ability to choose bouquet.
Currently I’m too busy at work, but will take a look when I’ve time :slight_smile:

1 Like

Thank you, I’ll watch the topic then.

Error in log when I open a recording/movie in the built in movie player:

UnicodeEncodeError: 'ascii' codec can't encode character '\xe1' in position 102: ordinal not in range(128)
2018-10-09 22:37:32 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.vu fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 223, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 352, 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 "/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 193, in update
    xml = self.request_call('/web/epgservicenow?sRef=' + reference)
  File "/config/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 526, in open
    response = self._open(req, data)
  File "/usr/local/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  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 1346, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/local/lib/python3.6/urllib/request.py", line 1318, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1250, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/local/lib/python3.6/http/client.py", line 1117, in putrequest
    self._output(request.encode('ascii'))
UnicodeEncodeError: 'ascii' codec can't encode character '\xe1' in position 102: ordinal not in range(128)
1 Like

I fixed local media playing bug and I added multiple bouquet support. You can install from here, or wait until it will be merged by cinzas.

2 Likes

Hi @madrian

Excellent work.
Let me try that on my installation, against my 3 distinct enigma boxes.
If all is working properly (which I believe is), I will merge.

I will later take a look of what is needed to submit this as a component to HA.
I believe some code cleanup is also needed (and documentation)

Thanks for sharing

Nice, thanks. :slightly_smiling_face:

Thanks to @madrian I’ve commited the changes today.
You can now choose your bouquet in the configuration file.

Just improved (i guess) a little bit the way to check the bouquet reference.
Goto http://box.ip/web/getservices and check the string you need to copy

It’s explained on the README.

I will now check what’s need to propose the custom component to a component.

Thanks

4 Likes

Hi Everyone

I made a minor update on the component.
Now you can change a channel via channel number.
6
Call the service media_player.play_media
Arguments:
"entity_id": “your_enigma2_id”
“media_content_id”: “your_channel_number”
“media_content_type”: "not_used_set_to_null"

Now play with it and share your configs :slight_smile:
You can set to with channel the box should change whenever you turn it on, or at a specified time, etc.

I will work on the proposal of the enigma2 component

Find it in the usual place https://github.com/cinzas/homeassistant-enigma-player

1 Like

Nice, thank you. :slight_smile:

So … some new commits, nothing changed, only code cleanup.

I’m new to git, but I think I managed to do it and placed my first pull request to ha.

https://github.com/cinzas/home-assistant/pull/1

hi, I just tested it with my environment but it looks a little bit strange and no screenshot is shown as like the example. I’m using Vuzero with VTI image 13.0.12 with OpenWebif 1.2.8.

media_player:

  • platform: enigma
    host: 192.168.1.67
    port: 80
    name: vuzero
    icon: mdi:satellite-variant
    timeout: 20
    username: root
    password: geheim
    bouquet: ‘1:7:1:0:0:0:0:0:0:0:FROM BOUQUET “userbouquet.favourites.tv” ORDER BY bouquet’

because of new user restriction as a second post:
2018-11-09%2011_04_49-Home%20Assistant

Hi

Can you see the picons when you access directly to the OpenwebIf page?
Are the picons stored in the /picon folder in the enigma2 box ?
If not create a symlink from /picon to the picon folder

no, but im fine without channel logo. Want to see what is running as the example e.g. with a screenshot.

“no, but im fine without channel logo. Want to see what is running as the example e.g. with a screenshot.”

Nice idea.

My suggestion for showing image:

  • show screenshot
  • show screenshot if no picons available
  • show picons
  • empty

It should be totally possible and would be a very nice feature. We can grab screenshot: /grab?format=jpg

You’re right.
I’ll look around. I know it is possible to grab a screenshot.

you can grab screenshot:

grab -dp /tmp/screenshot.jpg