Enigma2 receivers integration

Hi

Thanks for the hints.
The integration provides a media_player and notify platform.
The lovelace card used is the media-control, and it is restricted to the original elements.

The options is two create/develop a lovelace card that extends the media-control original elements.
I have no idea if it is possible to add more actions to the media_player platform, and make them available on the lovelace card.

I will need time to investigate that. Everything is possible, we just need time :slight_smile:

Hi,
I didn’t copy anything into custom components. yet discovery allows me to find my enigma. (an entity not an integration)
Is the version found by discovery that of cinzas?

I would have liked not to write in my configuration.yaml the port nor the password. ( if I write them in secret.yaml it doesn’t work )

No it is not.

It is probably using the default enigma platform.
My version is slightly different, and it allows sending notifications to enigma.

Cheers

Hi to all from Germany!

Before I get really desperate, I’m asking here after having tried getting all this to work for a few days already.

I use a Vu+ Uno 4k and would like to integrate this into my HA.

What I have done:

  • Created a folder “enigma” in “custom_components”.
  • Put the files from Github in that very folder.
  • Restarted HA.
  • Opened configuration.yaml and inserted this:
#Enigma MediaPlayer
enigma:
    devices:
      - host: 192.168.178.74
        port: 80
        name: Vu
        timeout: 20
        username: root
        password: xxxxxxx
        picon: picon

notify:
  - platform: enigma
    host: 192.168.178.74
    port: 80
    name: Vu
    username: root
    password: xxxxxxx

When checking configuration, I get the following error:

Integration error: enigma - Integration ‘enigma’ not found.
Platform error notify.enigma - Integration ‘enigma’ not found.

What the hell am I missing here? I am feeling pretty stupid already for I simply don’t get this working…

THANKS for any help!

(the code I posted looks unformatted, but in my file it’s inserted correctly)

Yes, the yaml seems unformatted, are you sure it is correct ?

When restarting home-assistant, on the log file, do you see enigma platform being loaded ?
Something like this

2022-02-18 15:08:03 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration **enigma** which has not been tested by Home Assistant. This component might cause s
tability problems, be sure to disable it if you experience issues with Home Assistant

Do you see a message like this, or an error ?

THANKS for your quick reply.

My configuration looks like this (see screenshot).

2022-02-18 16_41_13-File editor – Home Assistant

When restarting HA, I see the following in the logfile and this is the only enigma-related point:

2022-02-18 16:01:08 ERROR (SyncWorker_2) [homeassistant.loader] Error parsing manifest.json file at /config/custom_components/enigma/manifest.json: Expecting value: line 7 column 1 (char 6)

However, it’s quite strange that my other custom components (HACS, HyperHDR) get a warning in the log just as you wrote above. Enigma does NOT (apart from the message above)

The configuration is not correctly indented.

You have 4 spaces, instead of 2, before devices.
Put like this.

#Enigma MediaPlayer
enigma:
  devices:
    - host: 192.168.178.74
      port: 80
      name: Vu
      timeout: 20
      username: root
      password: xxxxxxx
      picon: picon

notify:
  - platform: enigma
    host: 192.168.178.74
    port: 80
    name: Vu
    username: root
    password: xxxxxxx

Hi,

I need a little help please :slight_smile:

I have copied the enigma folder from the zip into my custom_components

this is how my configuration looks like

enigma:
  devices:
    - host: 192.168.178.62
      port: 80
      name: dreambox
      timeout: 20
      username: !secret enigma2_user
      password: !secret enigma2_password
      bouquet: '1:A7:A1:A0:A0:A0:A0:A0:A0:A0:AFROM BOUQUET "userbouquet.favourites.tv" ORDER BY bouquet'
      picon: picon

notify:
  - platform: enigma
    host: 192.168.178.62
    port: 80
    name: dreambox
    username: !secret enigma2_user
    password: !secret enigma2_password

but after rebooting it doesn’t show up in my device or entity list. I have searched for enigma and dreambox but can’t find anything.

Thank you!

Hi @DirkStorck

The configuration looks good.
Can you restart HA and have a look to the log.
There must be some errors loading the custom_component.
Example from home_assistant.log

2022-04-21 14:18:52 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration enigma which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-21 14:20:12 INFO (MainThread) [homeassistant.setup] Setting up enigma
2022-04-21 14:20:12 INFO (MainThread) [custom_components.enigma] Initializing enigma devices
2022-04-21 14:20:12 INFO (MainThread) [homeassistant.setup] Setup of domain enigma took 0.0 seconds
2022-04-21 14:20:12 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.enigma
2022-04-21 14:20:12 INFO (MainThread) [homeassistant.components.notify] Setting up notify.enigma

Hi @cinzas

I have found this error after starting

2022-04-23 20:55:23 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2022-04-23 20:55:25 ERROR (MainThread) [homeassistant.components.media_player] enigma: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 735, in async_device_update
    await task
  File "/config/custom_components/enigma/media_player.py", line 205, in async_update
    pwstate = powerstate_soup.e2instandby.renderContents().decode('UTF8')
AttributeError: 'NoneType' object has no attribute 'renderContents'

Hi @DirkStorck

Don’t you have errors before ?
Remove the bouquet entry and see if it works (at least if it detects the device).

What OpenWebIf version are you running ?

Hi @cinzas ,

my WebInf-Version is 1.9

I have removed the bouquet and restarted HA I get these errors.

2022-04-25 12:56:06 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-25 12:56:18 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of timer is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.components.scene] Setup of scene platform homeassistant is taking over 10 seconds.
2022-04-25 12:56:31 ERROR (MainThread) [custom_components.xiaomi_miot_raw.deps.xiaomi_cloud_new] Timeout while loading MiCloud device list
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of input_button is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of input_text is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of tag is taking over 10 seconds.
2022-04-25 12:56:31 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
2022-04-25 12:56:33 WARNING (MainThread) [homeassistant.config_entries] Config entry 'NINA' for nina integration not ready yet; Retrying in background
2022-04-25 12:56:35 WARNING (MainThread) [homeassistant.config_entries] Config entry '192.168.178.247' for ipp integration not ready yet: Invalid response from API: Error occurred while communicating with IPP server.; Retrying in background
2022-04-25 12:57:00 ERROR (MainThread) [homeassistant.components.media_player] enigma: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 735, in async_device_update
    await task
  File "/config/custom_components/enigma/media_player.py", line 205, in async_update
    pwstate = powerstate_soup.e2instandby.renderContents().decode('UTF8')
AttributeError: 'NoneType' object has no attribute 'renderContents'
2022-04-25 12:57:18 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 334, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"

Hi

Ok, so you are receiving a HTPP 400 from the enigma box.

aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered'"

If you open this link via browser, http://192.168.178.62/web/getservices, using your user and password defined on HA, do you get a xml with the list of services on enigma2 ?

Which satellite box do you own, and which image are you running ?
You have openwebif 1.9 ? Isn’t 1.5 the latest version ?

Hi,

where do I have to put the user and password? like
http://user:[email protected]/web/getservices

if I only open the link I get

grafik

That is the version I see in the WebInf

Hi,

is there something I can do about that?

Thank you!

Found the solution.
If I now open
http://192.168.178.62/web/getservices,
in my browser I get

1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.favourites.tv" ORDER BY bouquet Favourites (TV) 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.NN2-Streaming-Server-HLS.tv" ORDER BY bouquet NN2-Streaming-Server-HLS 1:7:1:0:0:0:0:0:0:0:FROM BOUQUET "userbouquet.NN2-Streaming-Server-RTSP.tv" ORDER BY bouquet NN2-Streaming-Server-RTSP

It was a setting of the webinf

webinterface -> Antihijack 

that made the problem

Now I will test if the integration works

Excellent

Was not aware of that option
Test it and let us know if it works

Hi,
this entry should show up? right?

If I add the media player I only get this

grafik

and the power button doesn’t have any effect, can’t turn the device on or off

Strange.

Again, try always to provide some logs to help understand.
When the Dreambox is ON, and playing, what is the lovelace card showing ?

With lovelace card you mean this one? Only to make sure I use the right one.

I have added here the log file
home-assistant.log