Enigma2 receivers integration

Hello,

I run Home Assistant OS 6.2 (Home Assistant Core 2021.8.8) in a virtual machine on my server.
I wanted to setup my enigma receiver. Since the custom_components folder did not exist I created it myself and put the files in as the readme says.

After putting the example code (ip & user/password changed to my data) in my configuration.yaml I get this error when checking the config:

Component error: enigma - Integration 'enigma' not found.

What am I doing wrong?

PS: the standard home assistant integration works fine

Hi @Alkahna

Do you have the folder created in the right place ?
Can you post a screenshot of your HA home folder structure ?

I don’t use HassOS, but I am sure it should load the custom components also

custom_components
├── enigma
│   ├── __init__.py
│   ├── media_player.py
│   └── notify.py

I’m pretty sure. As the custom_components folder did not exist I created it myself after reading somewhere about it.
Here is my folder structure:

Looks fine

Next step - can you restart and provide logs ?
There should be some warning or errors thrown

I did a reinstall of Home Assistant OS and now it is working fine. After putting all files in their place (had to create the custom_components folder myself) I put in the code in the configuration.yaml and then reboot the my Host (the VM which Home Assistant OS is running in) it was working.

However I#m mostly interested to use the power features On/Off and Stanby.
In the standard GUI Element there is only the power button which does On/Off to and from Idle mode. How can you do the deep standby or shut off?

What file would I need to copy/edit to make a more simple GUI element that only has the 3 power options (on from standby, off to standby and deep standby) and an indicator if the device is on or not?

1 Like

Create control buttons by command line

Try this link contains commands for deep sleep and reboot.

1 Like

Hi,

i am already using the media-control card, but want also the source-list on this card. Is there chance to get it without clicking the three dots?

Has anyone an EPG-card? I search something, to see the program-guide and also to plan a recording…

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 ?