Jump to content


Photo

merge requests for PLi's git


  • Please log in to reply
1748 replies to this topic

Re: merge requests for PLi's git #1661 Dimitrij

  • PLi® Core member
  • 10,327 posts

+350
Excellent

Posted 19 September 2023 - 19:08

[epgimport] reorganize plugin


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: merge requests for PLi's git #1662 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 19 September 2023 - 19:11

Merged


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: merge requests for PLi's git #1663 Dimitrij

  • PLi® Core member
  • 10,327 posts

+350
Excellent

Posted 19 September 2023 - 19:12

Merged

thanks :) 


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: merge requests for PLi's git #1664 Dimitrij

  • PLi® Core member
  • 10,327 posts

+350
Excellent

Posted 19 September 2023 - 20:28

[epgimport] fix first append afterStandbyRunImport in standby


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: merge requests for PLi's git #1665 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 19 September 2023 - 20:43

Merged by @littlesat.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: merge requests for PLi's git #1666 littlesat

  • PLi® Core member
  • 57,166 posts

+698
Excellent

Posted 19 September 2023 - 20:50

You’re welcome

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: merge requests for PLi's git #1667 Dimitrij

  • PLi® Core member
  • 10,327 posts

+350
Excellent

Posted 20 September 2023 - 05:18

thanks :)


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: merge requests for PLi's git #1668 Dimitrij

  • PLi® Core member
  • 10,327 posts

+350
Excellent

Posted 23 October 2023 - 16:58

What enigma does is not relevant, it is completely handled at the network layer.

 

Do you have the /etc/network/if-up.d/ntpdate-sync symlink? Is it triggered when the network comes up, and what is the result (check dmesg or add some debugging to the script)?

 

Your plugin calls ntpdate too, the only difference is timing, or perhaps the IP of the NTP server used (see /etc/defaults/ntpdate).

 

If it sometimes works, sometimes not, I suggest you add a "sleep 1" at the top of the ntpdate-sync script, and see if that adresses the problem, as it suggests is may be fired when the interface is up but IP isn't yet (for example because of slow DHCP response).

I think the problem is here


	def timesyncChanged(configElement):
		if configElement.value == "dvb" or not GetIPsFromNetworkInterfaces():
			eDVBLocalTimeHandler.getInstance().setUseDVBTime(True)
			eEPGCache.getInstance().timeUpdated()
			if os.path.isfile('/var/spool/cron/crontabs/root'):
				Console().ePopen("sed -i '/ntpdate-sync/d' /var/spool/cron/crontabs/root;")
			if configElement.value == "dvb" and os.path.islink('/etc/network/if-up.d/ntpdate-sync'):
				Console().ePopen("unlink /etc/network/if-up.d/ntpdate-sync")
		else:
			eDVBLocalTimeHandler.getInstance().setUseDVBTime(False)
			eEPGCache.getInstance().timeUpdated()
			if not os.path.isfile('/var/spool/cron/crontabs/root') or not 'ntpdate-sync' in open('/var/spool/cron/crontabs/root').read():
				Console().ePopen("echo '30 * * * *    /usr/bin/ntpdate-sync silent' >> /var/spool/cron/crontabs/root")
			if not os.path.islink('/etc/network/if-up.d/ntpdate-sync'):
				Console().ePopen("ln -s /usr/bin/ntpdate-sync /etc/network/if-up.d/ntpdate-sync")
	config.ntp.timesync = ConfigSelection(default="auto", choices=[("auto", _("auto")), ("dvb", _("Transponder Time")), ("ntp", _("Internet (ntp)"))])
	config.ntp.timesync.addNotifier(timesyncChanged)
	config.ntp.server = ConfigText("pool.ntp.org", fixed_size=False)

Maybe

-		if configElement.value == "dvb" or not GetIPsFromNetworkInterfaces():
+               if configElement.value == "dvb" or (configElement.value == "auto" and not GetIPsFromNetworkInterfaces()):
			eDVBLocalTimeHandler.getInstance().setUseDVBTime(True)

Edited by Dimitrij, 23 October 2023 - 16:58.

GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: merge requests for PLi's git #1669 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 23 October 2023 - 17:35

Looking into it, I think the problem is elsewhere.

 

During startup, in startEnigma, it is called with a ConfigYesNo element called "useTransponderTime" set to true (this is now old, pre-NTP code). But passing that here causes the "else" to be excuted, NOT using transponder time.

 

So, this should be changed to using "auto" as that is the default for config.ntp.timesync.

 

Both "dvb" and "ntp" are settings that make permanent and prersistent changes to the filesystem, while "auto" is dynamic, meaning "use dvb if ntp is not available". With the fix to startEnigma in place, this code would do exactly that.

 

My guess is Littlesat forgot to update the start code when implementing this feature.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: merge requests for PLi's git #1670 Dimitrij

  • PLi® Core member
  • 10,327 posts

+350
Excellent

Posted 23 October 2023 - 18:27

My opinion, if the config.ntp.timesync is "ntp" not need check GetIPsFromNetworkInterfaces().

My new router only uses the mobile network and registering a local IP takes a very long time.


Edited by Dimitrij, 23 October 2023 - 18:28.

GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: merge requests for PLi's git #1671 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 23 October 2023 - 18:39

I think the idea behind that was that for "auto" and "ntp", if there is no network, both to fall back to "dvb". Which in itself should not be a problem.

 

Either way, it is not the reason your box doesn't get the time, if your observation is correct and the problem is not getting an IP before E2 starts, the "or" will make sure it will fall back to transponder time if the box doesn't have an IP at startup. No matter what the config setting is.

 

edit:

 

Oh, wait, your problem is you want "ntp", but don't have an IP in time. I guess in that case the swap from ntp to dvb due to the IP check isn't handy, no.

 

In that case I understand and agree with your proposed fix. But note that also startEnigma needs fixing.


Edited by WanWizard, 23 October 2023 - 18:44.

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: merge requests for PLi's git #1672 Huevos

  • PLi® Contributor
  • 4,661 posts

+163
Excellent

Posted 24 October 2023 - 00:18

The idea is to get the clock set correct before enigma starts. Otherwise any filenames that include dates created by enigma won't be correct.



Re: merge requests for PLi's git #1673 littlesat

  • PLi® Core member
  • 57,166 posts

+698
Excellent

Posted 24 October 2023 - 06:21

Isn’t the real issue triggered by that the router being too slow?

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: merge requests for PLi's git #1674 Dimitrij

  • PLi® Core member
  • 10,327 posts

+350
Excellent

Posted 24 October 2023 - 08:27

Isn’t the real issue triggered by that the router being too slow?

I have seen problems with obtaining NTP time on different receivers and with different routers.

Of course, these may be different problems, but they need to be solved.


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: merge requests for PLi's git #1675 mrvica

  • Senior Member
  • 1,259 posts

+86
Good

Posted 24 October 2023 - 10:01

rdate could be an alternative

https://forums.openp...dpost&p=1250414



Re: merge requests for PLi's git #1676 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 24 October 2023 - 12:37

The idea is to get the clock set correct before enigma starts. Otherwise any filenames that include dates created by enigma won't be correct.

 

That is not possible.

 

Either because the box uses transponder time (for which E2 needs to run and have a transponder tuned), or in case of NTP you have to wait with starting E2 until you have a time, which may never come in some cases.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: merge requests for PLi's git #1677 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 24 October 2023 - 12:41

rdate could be an alternative

https://forums.openp...dpost&p=1250414

 

Fetching the time is not the problem here.

 

The problem is that

  1. during startup in StartEnigma the new timesync variable isn't used ( code never updated by Littlesat ), causing E2 to fall back to transponder time if no IP is present, which fails if there is no transponder (for example with IPTV).
  2. the fallback still happens even if you have set the timesync to NTP ( which is what Dimitrij's suggested change fixes )

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: merge requests for PLi's git #1678 Huevos

  • PLi® Contributor
  • 4,661 posts

+163
Excellent

Posted 24 October 2023 - 13:45

 

The idea is to get the clock set correct before enigma starts. Otherwise any filenames that include dates created by enigma won't be correct.

 

That is not possible.

 

Either because the box uses transponder time (for which E2 needs to run and have a transponder tuned), or in case of NTP you have to wait with starting E2 until you have a time, which may never come in some cases.

 

In vix the clock is set before enigma starts. This is proved by the log files having the correct date. Obviously the network needs to be up.



Re: merge requests for PLi's git #1679 littlesat

  • PLi® Core member
  • 57,166 posts

+698
Excellent

Posted 24 October 2023 - 13:55


In vix the clock is set before enigma starts. This is proved by the log files having the correct date. Obviously the network needs to be up.


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: merge requests for PLi's git #1680 WanWizard

  • PLi® Core member
  • 70,528 posts

+1,811
Excellent

Posted 24 October 2023 - 14:25

In vix the clock is set before enigma starts. This is proved by the log files having the correct date. Obviously the network needs to be up.

 

And that is exactly the problem here, the long delay before the network is up...
 

But that isn't the root cause here, I've given that in my previous post. VIX doesn't have that problem, it has different code to handle NTP time, and doesn't have the startenigma bug either.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.



10 user(s) are reading this topic

0 members, 10 guests, 0 anonymous users