Enigma2 Plugin - Song Artist/Title Information

iBoston

SatelliteGuys Pro
Original poster
Jul 15, 2014
2,749
2,379
North Central
I have been wanting to expand my knowledge when it comes to plugins on Enigma2. I have been gaining a lot of experience in Python over the last couple years, and a lot of my other projects have shored up. Using AI as a reference guide, I was able to pull off a bucket list item.

Those that have been keeping track of my posts, I wrote a program that ran on windows and that would query the enigma2 server every few seconds asking what is the current active channel. Its a bit messy in terms of overhead, although its worked great for years. But, over the last week, i wrote my first Enigma2 Plugin. I call it UDPservice and it only does one thing.

1776199529535.png

The plugin runs and when ever you change a channel in the STB, it sends a UDP (non connection-less) internet packet to the IP/port of my choosing which can be modified in the Plugin setup screen within the STB. My windows program catches that UDP message and does its magic. My windows program no longer needs to keep checking with the STB to see if the channel has changed. The program just listens for the channel update messages. This is MUCH more efficient.

One of the other things my windows program did, was detect when you were on certain music services, and push a timed message box onto the Enigma2 STB showing you what the song is. I always believed this would be MUCH better as a Enigma2 Plugin built into the satellite receiver itself. Just could never find all the resources i needed. Not the case any more! This second plugin is called Muzak. It currently works with all Muzak services and the St Barth music service on 34.5w. This plugin automatically detects when your on a valid music channel, and fetches the song/artist information and displays it as an overlay that is non disruptive and maintains full remote functionality.

1776199971465.png

OLDER windows program method :
This is the original way where my windows program sent a timed message box to the Enigma2 STB.






1776200118850.png


Here is the new way where the song/title/channel information is handled completely internally via a enigma2 plugin. It overlays onto your music background, and automatically updates the channel/artist/title automatically without any user input.

If you turn to any other non supported music channel, the overlay goes away, only appearing when you turn to a supported music channel.

1776200714695.png

This new feature allows me to add the plugin to all my satellite receivers in the house, and not just the one that the windows program was monitoring. It also makes it very user friendly. Anyone could install this plugin and get the same functionality. I still have more work to do on this plugin. I have to add some configuration to the plugin that can be configured at a user level. Right now, i have it hard-coded.
 
1776278825295.png

Alright, i cleaned up all the little oddities. I also added a nice assortment of setup options.

One of the oddities was i had to figure out how to close the Muzak overylay when you opened up a menu or channel list, etc, ie other screens. It then returns when you close the other screens Minus the channel info. It stays on during that. I also added a wobble in the frequency and SR detection so it will work with +- 5, just in case there is a slight variance in the frequency/SR.

Very Slick! :bluesbros


1776279085836.png
 
Last edited:
Okay, i made a improvement on the Muzak plugin. I was always intending to do this, I'm just not an expert yet, and have to take things in chunks. The internet request to get the song information was done Synchronously, ie, blocking. That means, the plugin freezes the system waiting for the response. Being its usually quick its not usually a problem, but if it takes more than a second or so, then you get that GEAR turning ICON on the screen showing things are bogging down.

So, if the internet is offline, or the DNS request takes longer, or the internet is being slow, then things start looking clunky. The latest version uses the twisted libraries which does internet calls asynchronously. This means no busy gear icon, and things run smoothly no matter whether there is internet issues or not.

I actually kept both sets of code in there, so i can toggle a global variable whether to utilize async or non async. Very happy and this would be the final product if everything chugs along without incident. If no other issues pop-up Ill invest some time to make it cross-platform compatible, in another words, work on NON dreamOS systems - Other Enigma2 versions. If you think you might be interested in the Muzak plugin, send me a private message, and tell me what Enigma2 Hardware Box you own and what Firmware your using. If you don't know, there is usually a Information option in the menu. For me its : Menu / Information / About
 
Wish I still had a FTA setup. I would love this. The majority of my TV viewing is listening to music services. Lol.

PLEASE LOG IN TO GET RID OF THESE ADS!
 
  • Like
Reactions: iBoston
Hey iBoston,
Are you OK. I sent a PM a week ago to try the Muzak plugin. You have not responded. Hope everything is cool. Did you get the PM?
Hope all is GOOD!
Thanks,
Al

Yes, i got it. Sorry if you were not on the same train of thought as me. Its a waiting list so to speak.. I have to modify the software so it will work on non dreamOs systems. Do the base work, getting it to work on my Enigma2 STB that isn't dreamos. If i get that working, then ill be ready to let a few others test it to make sure it also works on their STBs.

I haven't gotten to it yet, because im still in testing phase. I haven't had any issues with it thus far, been listening to music on 2 different satellite boxes and they are working perfectly. So, i expect that ill be working on the tweaking in the next week or so.. I also have so many projects, i move from project to project and ill swing back around shortly.
 
  • Like
Reactions: voomvoom and FTA4PA

Kodi and Enigma2 (and icon program too)