Jump to content


Photo

EPGnow - Ability to set value.

EPGnow EPG

  • Please log in to reply
17 replies to this topic

#1 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted 17 March 2023 - 23:57

It seems like EPGnow and EPGnext are variables different from the main EPG.  Is there a way through python scripts or http call or telnet, to be able to SET the EPGnow value for the current service your tuned too.

 

I am working on a method to view the current song playing on a radio service.  I can get the information by decoding XML data from a website.  There is no timing information on the website.  It only contains the current song playing and the last 10 songs.  Currently, for testing purposes, i am detecting the service, and decoding the XML data, and then displaying it via a Enigma2 Message Box.

 

I've done exhaustive google searches, and there doesn't seem to be any information on how to SET the values, only to retrieve the values.

 

Any help or direction pointing to further clues would be appreciated.

 

Thank you.


Edited by LoveMyDish, 18 March 2023 - 00:00.


Re: EPGnow - Ability to set value. #2 scriptmelvin

  • PLi® Contributor
  • 624 posts

+40
Good

Posted 18 March 2023 - 01:13

Is the radio service a shoutcast/icecast stream (with song info embedded in the audio stream)? Then you can install the OpenPLi develop image, there it already works.

 

See also this post.


Vu+ Duo 4K SE DVB-S2X/DVB-C CD Triple LNB Quad Triax TDS64 OpenPLi NB 2023-02-14


Re: EPGnow - Ability to set value. #3 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted 18 March 2023 - 13:44

Ill take a look, but this is not a stream, it is a satellite signal.  Maybe there will be something i can use from it... Thank you.



Re: EPGnow - Ability to set value. #4 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted 18 March 2023 - 14:39

Is the radio service a shoutcast/icecast stream (with song info embedded in the audio stream)? Then you can install the OpenPLi develop image, there it already works.

 

See also this post.

Actually, this did point me in the right direction with the EventInfo.py file in the /usr/lib/enigma2/python/Components/Sources 

 

I successfully added a Class and put my own custom EventNow and EventNext!!!  Perfect.. Now, ill have to play with this to get it incorporated and utilize the way i need to...

 

Thank you scriptmelvin


Edited by LoveMyDish, 18 March 2023 - 14:39.


Re: EPGnow - Ability to set value. #5 scriptmelvin

  • PLi® Contributor
  • 624 posts

+40
Good

Posted 18 March 2023 - 17:43

Thanks for the feedback. Please let us know when (and how) you got it working :)


Vu+ Duo 4K SE DVB-S2X/DVB-C CD Triple LNB Quad Triax TDS64 OpenPLi NB 2023-02-14


Re: EPGnow - Ability to set value. #6 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted 18 March 2023 - 19:06

I successfully was able to Set the EPGnow and EPGnext variables... So, that is a step forward....  But......i ran into a snag.  It appears the EventInfo.py is only called when you change to a new service.  I need to trigger an update to the EPGnow and EPGnext when i initiate the infobar...  So, im back to the grind working on that step...

 

Any thoughts...



Re: EPGnow - Ability to set value. #7 DimitarCC

  • Senior Member
  • 511 posts

+8
Neutral

Posted 18 March 2023 - 20:58

Hi,
Currently the epg is update on channel info changed event that is triggered after you switch to a channel. The problem is that for iptv service for example that can delay several second. For that cases indeed the infobar should update itself immediately on show. That means source eventinfo and current service to be possible to be triggered on infobar show.

DM920UHD, Vu+Uno4KSE, Vu+Solo2, Dreambox DM500HD, Dreambox DM600PVR, AzBox Premium, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: EPGnow - Ability to set value. #8 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted Yesterday, 13:56

Hi,
Currently the epg is update on channel info changed event that is triggered after you switch to a channel. The problem is that for iptv service for example that can delay several second. For that cases indeed the infobar should update itself immediately on show. That means source eventinfo and current service to be possible to be triggered on infobar show.

I agree, and thats the same thing i ran into.  Do you have any thoughts on which python files would be best to hook this in?



Re: EPGnow - Ability to set value. #9 DimitarCC

  • Senior Member
  • 511 posts

+8
Neutral

Posted Yesterday, 14:35

Well you May look here
https://github.com/O...oBarGenerics.py
and
https://github.com/O...ssionGlobals.py

You have to make source in sessionglobal to refresh on infobar show.
For infobar show look in infobargenerics

DM920UHD, Vu+Uno4KSE, Vu+Solo2, Dreambox DM500HD, Dreambox DM600PVR, AzBox Premium, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: EPGnow - Ability to set value. #10 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted Yesterday, 17:14

Well you May look here
https://github.com/O...oBarGenerics.py
and
https://github.com/O...ssionGlobals.py

You have to make source in sessionglobal to refresh on infobar show.
For infobar show look in infobargenerics

Too funny, yea, i had already tracked back to the sessionglobals.py before reading this. in SessionGlobals.py I found the following :

        self["Event_Now"] = EventInfo(session.nav, EventInfo.NOW)
        self["Event_Next"] = EventInfo(session.nav, EventInfo.NEXT)

I utilized grep to see that is the ONLY place the self["Event_Now"] is utilized / set.

 

I had already deciphered, and modified the scripts within the EventInfo call to be able to modify the Epg information.  But, like i mentioned before, i am attempting to invoke a manual update of those two variables.  Event_Now and Event_Next

 

As a test, and i thought it would be neat if i could invoke an update of those two variables through the webAPI.

 

I attempted to utilize the same code above in an api call to get the following error : Object does not support item assignment error

I then attempted the following : (comment # was what i had before that yielded the Assignment Error)

I then attempted to use the setattr and that ran without error, but did NOT update the EPG info.  So, i don't believe the setattr is yielding the results i need.

            ei = EventInfo(self.session.nav, EventInfo.NOW)
            setattr(self,"Event_Now",ei)
            #self["Event_Now"] = EventInfo(self.session.nav, EventInfo.NOW)

I have been a programmer for 30+ years, however, I am not Python savy, so, that makes it more difficult for me.    Any thoughts on how i would go about being able to set the self["Event_Now"] outside of the sessionglobals.py

 

I was hoping to be able to update just those two variables, without having to re-invoke the whole sessionglobals as to not run processes that were not necessary.  But, i will in the meantime see if i can at least get an entire sessions globals update.


Thanks by the way... :)


Edited by LoveMyDish, Yesterday, 17:18.


Re: EPGnow - Ability to set value. #11 DimitarCC

  • Senior Member
  • 511 posts

+8
Neutral

Posted Yesterday, 17:35

You try to update them wrong. Look inside it sets current service variable. You have to preset that to the service that you are zapping to. Or update event object. I did that already on my side because of iptv service with imported epg. I will search for example and post it later.

DM920UHD, Vu+Uno4KSE, Vu+Solo2, Dreambox DM500HD, Dreambox DM600PVR, AzBox Premium, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: EPGnow - Ability to set value. #12 DimitarCC

  • Senior Member
  • 511 posts

+8
Neutral

Posted Yesterday, 17:36

P.S. I am also not a python guy but use it a lot lately.

DM920UHD, Vu+Uno4KSE, Vu+Solo2, Dreambox DM500HD, Dreambox DM600PVR, AzBox Premium, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: EPGnow - Ability to set value. #13 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted Yesterday, 17:48

You try to update them wrong. Look inside it sets current service variable. You have to preset that to the service that you are zapping to. Or update event object. I did that already on my side because of iptv service with imported epg. I will search for example and post it later.

Maybe i am not understanding correctly, but i want it to utilize the current service (currently tuned too) So, isn't that what i want??  I don't want it to be what i am zapping to in the future, but what service i am currently at...



Re: EPGnow - Ability to set value. #14 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted Yesterday, 18:10

And thank you, and example would be nice..



Re: EPGnow - Ability to set value. #15 DimitarCC

  • Senior Member
  • 511 posts

+8
Neutral

Posted Yesterday, 19:02

If i understood correct you switch the channel and expect epg info to update immediately. Right? Switching a channel dont immediately raise event info update event. You want to move the update to be raise immediately on infobar show. Isnt it that what you want?

DM920UHD, Vu+Uno4KSE, Vu+Solo2, Dreambox DM500HD, Dreambox DM600PVR, AzBox Premium, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: EPGnow - Ability to set value. #16 DimitarCC

  • Senior Member
  • 511 posts

+8
Neutral

Posted Yesterday, 19:11

In addition if you want to update the current epg info from internet... There are 2 ways in my opinion.
1. To set the data to the epg cache. That will make things to works like it is. You only have to get the service epg data from internet and write it in epg cache.
2. Make your own source like epgnow source and make it pollable so to get information on specific interval.

DM920UHD, Vu+Uno4KSE, Vu+Solo2, Dreambox DM500HD, Dreambox DM600PVR, AzBox Premium, Triax 78 (7E,9E,13E,19.2E,23.5E) & Triax 78 (39E)


Re: EPGnow - Ability to set value. #17 LoveMyDish

  • Member
  • 24 posts

0
Neutral

Posted Yesterday, 23:35

If i understood correct you switch the channel and expect epg info to update immediately. Right? Switching a channel dont immediately raise event info update event. You want to move the update to be raise immediately on infobar show. Isnt it that what you want?

Yes, you are correct that i would want it to update the EPGcache, or the EPGnow/EPGnext event when you pull up the infobar for the current channel you are on.  I already fetch and decode the song information from the web, I just need a means to update it to show on the infobar  EPG now and Next event....



Re: EPGnow - Ability to set value. #18 el bandido

  • Senior Member
  • 290 posts

+12
Neutral

Posted Today, 03:41

Have you looked at the InfoBar.py and InfoBarGenerics.py in /usr/lib/enigma2/python/Screens?  You might consider building your own image which would give more freedom in modifying files. Just depends on what you want to do.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users