This is a media_player _custom component for Enigma2 based STB’s running the OpenWebif web interface. It has only been tested by me with my Beyonwiz T4 DVB set top box.
I’ve been using this for about a year and it’s served my purposes. I’d like to clean it up, maybe add some functionality and make it more robust/compatible. It’s nothing special but I thought I’d throw it out onto the internet so that the community can help me improve it.
Thanks. Curious to see how someone else did the media player component.
I also meant to do a notify component but I couldn’t really find a use case where I needed it. Will give this a go. Maybe caller ID information if someone calls while you’re watching TV?
Notificación is interesting for notifications when a device tracking detects a device arriving/leaving a zone (for example, my daughters).
Meanwhile, I have tried your component with no success in my new hassio instalation. I has copied the enigma2.py to /config/custom_components/media_player folder, but when I reboot Home Assistant, I obtain the following error:
File “/config/custom_components/media_player/enigma2.py”, line 7
^
SyntaxError: invalid syntax
Fatal error while loading config: invalid syntax (enigma2.py, line 7)
Failed config
General Errors:
- invalid syntax (enigma2.py, line 7)
Successful config (partial)
I have not yet implemented user/pass as I don’t use them. Will look into it after I solve another problem I’m currently trying to deal with… ie when the Enigma box is unreachable.
It appears that this component has broken with 0.88 (still in beta) due to the new naming conventions of the custom_components folder. Is there a quick fix for this?
From what I can tell it has gone from media_player/enigma2.py and now has to be enigma2/media_player.py
@mihalski great work on this. I have been using my own the past couple of years and am in progress trying to get it merged here:
Initially, I was told the logic needed to go into a pypi pip module, so I created openwebif.py on pypi and this PR consumes that.
I’d love to add the channel selection like you have. That would be a nice addition to my existing PR (after I get it merged first I guess).
Oh and last night I got auto-discovery working, so just by launching Hass, both my Vu Duo2 and Vu Zero showed up a few seconds later in the UI. Zero config needed.
Good work!
I have not had the chance to try the component yet and I’m curious if you handled the issue my component had with the channel list.
If the list updates while I am viewing it then it jumps to the top. This happens on every update. I was going to implement a check to see if the list had changed from the last update to mitigate that but on second thought it might be something best initialised at setup and not checked again?
Yes for mine, I just initialise once on startup. If channel lists change then a restart of HA is required. I think this is ok as I know my lists change very infrequently.
Also, currently my implementation only reads the first bouquet, which for me is my Favourites one, and that is very static in my case.
You’re clearly more adept at Python than I am (I am literally only just beginning to learn) so I’m happy your component looks like it will make it into Home Assistant.
I’ve not yet looked at your openwebif library, but I was curious whether it was exclusively openwebif or if it also utilised the api calls?
Once I’m a little better versed in python I might do a parallel development of my component just to see how that goes. Maybe I will have something useful to contribute then.
Absolutely, I think with a couple of people working on it there could be some nice new features.
My PR just got merged, so it will be released in the 0.90 version of HA.
I am thinking that a notify component would be nice so people could send text to the TV screen via the UI or via an automation. This should be straight forward to do.
Regarding APIs: I only know about the OpenWebif ones. Are there others that you know of?