AVS Forum banner
361 - 380 of 1250 Posts

·
Registered
Joined
·
1,828 Posts
STROKE OF GENIUS

How about this for another test. Leave the DNS pointing at pigs so that it can get a response to that but point the router address to nowhere on the DVR static screen so it can't get out to the internet. It will be able to resolve addresses but not be able to go anywhere. That might tell us if it's happy just getting valid DNS addresses but doesn't actually fetch any data?
OMG Timothee, this is a STROKE OF GENIUS!!!

I tried it and:
NOT ONLY is the DVR+ happy and convinced that the Internet is connected, since it can get correct IPs for the 4 sites (from dnsmasq through the Pi's access to the real gateway) but doesn't actually try to access them;​
BUT ALSO it refreshes the guide just fine, since it gets the Pi's IP from dnsmasq and can access it without the gateway because its on the same network.​

So as long as you don't care about YouTube, Pandora, or Vudu, this is the IDEAL setup for the DVR+. It literally can't go anywhere except as directed by
3030731
on the Pi!!! No need to block anything anywhere.
 

·
Registered
Joined
·
1,828 Posts
"DVR Status List": "------------------------",
"192.168.1.202": {
"ListIndex": 15946,
"RequstNum": 90,
"FirstRqst": "2020-08-22 22:27:26(CDT)",
"Last_Rqst": "2020-08-22 22:31:50(CDT)",
"__Elapsed": "04:24s"
}
I'm not seeing that RequestNum in pigstatus using V1.00
 

·
Registered
Joined
·
432 Posts
Discussion Starter · #363 ·
I'm not seeing that RequestNum in pigstatus using V1.00
Yeah... it's kind of in the next version!

And nothing can be that great... The DVR wouldn't be able to access the NTP time servers. And it requires that icons are cached on pigs. If the dvr tries to access them live it won't work :-( so it's pretty close, just not perfect.

But it's an interesting test and reveals a little more about how DVR plus works!
 

·
Registered
Joined
·
1,828 Posts
Unusual network behavior on Pi Zero W

I've been trying for about a week to track down a weird problem with my Pi Zero W (Pi0), on which I happen to be running PiGS. This is NOT a PiGS problem.

I also run PiGS on an old Pi3 Model B (Pi3), and it does not have this problem, and never has in the almost 3 years I've been using it for other things.

The problem is this: after I boot up Pi0 and it connects to my network via WiFi (to same wireless access point that Pi3 connects to), any other device on my network can access it by its IP address 192.168.1.188 (for example, ping it). As time marches on over the course of a day or two, various devices become unable to connect to Pi0; in particular either or both of my DVR+ units will eventually show Internet status: Disconnected and will totally stop querying dnsmasq every 21 seconds. Needless to say, their guides will no longer refresh on a daily basis (or manually). Also, I have VNC on an iPad and once the iPad becomes unable to access 192.168.1.188, VNC will (obviously) not be able to connect to Pi0's desktop. Also, Pi3 will become unable to ping Pi0 or access it in any way. And lastly, if I don't keep a remote desktop open to Pi0 from my Windows machine and a day or two goes by, I can no longer connect via remote desktop. Not all of these go out at once, it's just sort of random, but I can be sure that at least one will be unable to connect 12 hours or so after rebooting Pi0.

What I've found that cures this once it happens to a particular device is to ping or attempt an ssh connection outbound from Pi0 to the device (I use ping for devices that respond to ping like the iPad, Windows machine, and Pi3; while I use ssh for the DVR+ units because they don't respond to ping). The ssh connection never succeeds of course (connection refused), but it's enough to re-establish communications with the DVR+. Obviously, rebooting Pi0 also cures this problem for a short time.

What I've found does NOT cure this is:
Rebooting the DVR+​
Rebooting either of the wireless access points to which the DVR+ units and Pi0 connect.​
Rebooting my main router​
Rebooting the wireless bridge that one of my DVR+ units uses to bridge its ethernet to the WiFi network​

The differences between the two systems are:
1. The OS version:
Pi3 is running Raspbian GNU/Linux 9 (stretch) with kernel Linux 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017
Pi0 is running Raspbian GNU/Linux 10 (buster) with kernel Linux 5.4.51+ #1327 Thu Jul 23 10:53:06 BST 2020
2. The hardware:
Pi3 is on a Pi3 Model B (with a camera module plugged in)​
Pi0 is on a Pi Zero W​
Otherwise they're pretty much configured the same way (Pi3 can run a live streaming camera application, but it is disabled).

My current solution to the problem is simply running this script in the background on Pi0:
#!/bin/sh​
# Periodically touch all the important devices on my network.​
while true​
do​
ssh 192.168.1.194 >/tmp/keepalive.log 2>&1​
ssh 192.168.1.189 >>/tmp/keepalive.log 2>&1​
ping -c5 -i0.2 192.168.1.191 >>/tmp/keepalive.log 2>&1​
ping -c5 -i0.2 192.168.1.16 >>/tmp/keepalive.log 2>&1​
ping -c5 -i0.2 192.168.1.2 >>/tmp/keepalive.log 2>&1​
sleep 60​
done​

But I wish I knew what is causing the problem in the first place rather than use this as a band aid. The other Raspberry Pi (Pi3) does not and never did exhibit this bad behavior. I should probably go find a Raspberry Pi forum somewhere and ask this, but I thought maybe it would ring a bell with one of the members here. Does anybody have a clue?
 

·
Registered
Joined
·
2,345 Posts
Just wanted to report in that I have been running for 5 days now with PiGSv1.0 and it has been flawless for me. Great job Timothee, Frank70 and everyone else that has worked on and tested PiGS.

PiGs can now run on 2 Linux laptops and 2 WIN10 desktops. However I am now just running it on my main WIN10 64 bit system to update both my DVR+ boxes.
 

·
Registered
Joined
·
8,141 Posts
So as long as you don't care about YouTube, Pandora, or Vudu, this is the IDEAL setup for the DVR+. It literally can't go anywhere except [to devices on the local network] as directed by
3030731
on the Pi!!! No need to block anything anywhere.
Somebody needs to tell @Greasemonkey !
And nothing can be that great... The DVR wouldn't be able to access the NTP time servers. And it requires that icons are cached on pigs. If the dvr tries to access them live it won't work :(
Presumably the DVR+ will fall back to the PSIP average for a time reference, which might be good enough. If not, couldn't you run an NTP server on the Pi itself?

The logos don't strike me as a big deal; they don't change often, so you could maintain them on the Pi manually.
 

·
Registered
Joined
·
1,828 Posts
The logos don't strike me as a big deal; they don't change often, so you could maintain them on the Pi manually.
I don't understand... the icons are fetched from CM or SD by PiGS, not the DVR+; having the DVR+ blocked from internet access would have no effect on the icons because PiGS is not blocked from internet access and it's what fetches them.
 

·
Registered
Joined
·
1,828 Posts
PiGS for Windows
Just wanted to report in that I have been running for 5 days now with PiGSv1.0 and it has been flawless for me. Great job Timothee, Frank70 and everyone else that has worked on and tested PiGS.

PiGs can now run on 2 Linux laptops and 2 WIN10 desktops. However I am now just running it on my main WIN10 64 bit system to update both my DVR+ boxes.
So now that several folks here (including @LenL) have tried my draft set of instructions for running PiGS on Windows, and they have been generally successful, and my draft has evolved a bit, and @timothee has released V1.0 of PiGS, it seems to be the opportune time to post the instructions here in the PiGS forum. Though I agree with @timothee that PiGS is best run on a dedicated Raspberry Pi that you can "set and forget", the Windows approach gives users a chance to try PiGS out without investing in anything other than the SD membership (sorry Mac folks).

I'd like to thank @FitMark for the suggestion to use the Technitium DNS Server and @JHBrandt for explaining how to compile PiGS to a portable Windows binary that does not require installation of Python3. Using their suggestions, I was relatively quickly able to get PiGS running on my Windows desktop system, complete with the requisite DNS redirection. There were a few gotchas along the way, so this draft points out a few things that could derail your own attempt to get it running on Windows. The draft specifically applies to Windows 10, but I can't imagine they wouldn't apply equally well to Windows 7 or 8, with a little creative interpretation.

So without further ado, here is my draft 1.1. Suggestions for improvement are invited.

EDIT 8/25/2020: REPLACED DRAFT 1.1 WITH DRAFT 1.2 BECAUSE OF GOOGLE DRIVE ISSUES!!!

EDIT#2 8/26/2020: REPLACED DRAFT 1.2 WITH DRAFT 1.3 BECAUSE OF WD CLOUD ISSUES!!!

EDIT#3 9/22/2020: REPLACED DRAFT 1.3 WITH DRAFT 1.4 FOR NEW PiGS VERSION 1.01.

EDIT#4 10/3/2020: REPLACED DRAFT 1.4 WITH DRAFT 1.6 FOR NEW PiGS VERSION 1.11.

EDIT#5 10/6/2020: REPLACED DRAFT 1.6 WITH DRAFT 1.7 SUITABLE FOR ANY PiGS VERSION.
 

Attachments

·
Registered
Joined
·
432 Posts
Discussion Starter · #369 ·
Somebody needs to tell @Greasemonkey !Presumably the DVR+ will fall back to the PSIP average for a time reference, which might be good enough. If not, couldn't you run an NTP server on the Pi itself?
I found this link about NTP servers and Pi's. It might be possible to provide time for the local subnet. NTP client and server
 

·
Registered
Joined
·
432 Posts
Discussion Starter · #370 ·
I don't understand... the icons are fetched from CM or SD by PiGS, not the DVR+; having the DVR+ blocked from internet access would have no effect on the icons because PiGS is not blocked from internet access and it's what fetches them.
As long as the caching flags are on (and they are by default), it should work. If the Pillow lib is not available on the Pi, PiGS would provide direct links to SD images which might break stuff.
 

·
Registered
Joined
·
1,828 Posts
As long as the caching flags are on (and they are by default), it should work. If the Pillow lib is not available on the Pi, PiGS would provide direct links to SD images which might break stuff.
Wow, I hadn't realized that - good info to know, though I can't imagine why one would want to run PiGS with the cache capability disabled.
 

·
Registered
Joined
·
1,828 Posts
I found this link about NTP servers and Pi's. It might be possible to provide time for the local subnet. NTP client and server
I found another good link: install-and-configure-ntp-server-client-in-debian. If I get a chance, I'll play around trying to get the Pi to serve NTP to the DVR+.

Since I put in a bogus IP for network gateway on one of my DVR+ units yesterday morning, I am now seeing the DVR+ run about 10 seconds slow, so it is drifting, and having NTP would be a good thing. I also can see the DVR+ making a DNS request for pool.ntp.org and getting back good IP addresses that it won't be able to connect to (by temporarily turning on dnsmasq log-queries). So it is trying.
 

·
Registered
Joined
·
432 Posts
Discussion Starter · #373 ·
Wow, I hadn't realized that - good info to know, though I can't imagine why one would want to run PiGS with the cache capability disabled.
One 'bad' thing about the Cache flags is once it gets the icons it never looks again for the ones it already has. So if some icon were to change pigs would never know.
And if there wasn't an icon at rovi and you put one in my icons and then it did appear at channel Master Rovi or SD, pigs doesn't look. as soon as it finds a good one it stops looking for an icon.
These are all of course very minor operational things
 

·
Registered
Joined
·
1,828 Posts
I found another good link: install-and-configure-ntp-server-client-in-debian. If I get a chance, I'll play around trying to get the Pi to serve NTP to the DVR+.

Since I put in a bogus IP for network gateway on one of my DVR+ units yesterday morning, I am now seeing the DVR+ run about 10 seconds slow, so it is drifting, and having NTP would be a good thing. I also can see the DVR+ making a DNS request for pool.ntp.org and getting back good IP addresses that it won't be able to connect to (by temporarily turning on dnsmasq log-queries). So it is trying.
Easy-peasy! On the Pi, I just did:
sudo apt install ntp
then copied this config file in place of /etc/ntp.conf (only 5 lines are changed from the default):
Code:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

# Leap seconds definition provided by tzdata
leapfile /usr/share/zoneinfo/leap-seconds.list

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable


# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example
server time.nist.gov iburst

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#pool 0.debian.pool.ntp.org iburst
#pool 1.debian.pool.ntp.org iburst
#pool 2.debian.pool.ntp.org iburst
#pool 3.debian.pool.ntp.org iburst


# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Needed for adding pool entries
restrict source notrap nomodify noquery

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
Then I did a:
sudo service ntp restart
Then I added:
192.168.1.188 pool.ntp.org [where 192.168.1.188 is the static IP of my Raspberry Pi]​
to
3031134

Then I did a:
sudo systemctl restart dnsmasq
And finally rebooted the DVR+. When it came back up, the time had miraculously snapped back into sync with the real time (no longer 10 seconds slow)!

NTP problem solved.
 

·
Registered
Joined
·
1,828 Posts
The most crazy thing of all with posting in this forum is that you're allowed to type
/etc/ntp.conf​
But you're not allowed to type
3031136
Just beyond comprehension!
 

·
Registered
Joined
·
87 Posts
PiGS for WindowsSo now that several folks here (including @LenL) have tried my draft set of instructions for running PiGS on Windows, and they have been generally successful, and my draft has evolved a bit, and @timothee has released V1.0 of PiGS, it seems to be the opportune time to post the instructions here in the PiGS forum. Though I agree with @timothee that PiGS is best run on a dedicated Raspberry Pi that you can "set and forget", the Windows approach gives users a chance to try PiGS out without investing in anything other than the SD membership (sorry Mac folks).

I'd like to thank @FitMark for the suggestion to use the Technitium DNS Server and @JHBrandt for explaining how to compile PiGS to a portable Windows binary that does not require installation of Python3. Using their suggestions, I was relatively quickly able to get PiGS running on my Windows desktop system, complete with the requisite DNS redirection. There were a few gotchas along the way, so this draft points out a few things that could derail your own attempt to get it running on Windows. The draft specifically applies to Windows 10, but I can't imagine they wouldn't apply equally well to Windows 7 or 8, with a little creative interpretation.

So without further ado, here is my draft 1.1. Suggestions for improvement are invited.
First off I want to Thank you for the alternate version of PiGS. However, I've found I can't find all the details needed. For example item 5. "Follow step 5a" because I can't find the spreadsheet.
There are other "find it here" items that I don't seem to have. Possibly because of the "home" version of win10 I have. Which is also why I bought a DVR in a box not from IKEA.
Maybe I can learn more with a helpful note from you away from this area so as not to load up folks who have already moved on to the "logo isn't right" important.
 

·
Registered
Joined
·
1,828 Posts
First off I want to Thank you for the alternate version of PiGS. However, I've found I can't find all the details needed. For example item 5. "Follow step 5a" because I can't find the spreadsheet.
There are other "find it here" items that I don't seem to have. Possibly because of the "home" version of win10 I have. Which is also why I bought a DVR in a box not from IKEA.
Maybe I can learn more with a helpful note from you away from this area so as not to load up folks who have already moved on to the "logo isn't right" important.
You need to read the very first post on page 1 of this topic - the link to the spreadsheet is there as well as almost everything you might want to know about PiGS. The Windows instructions should work fine for Windows 10 Home, but if you have specific questions, just PM me in Conversations.
 

·
Registered
Joined
·
779 Posts
PiGS for WindowsSo now that several folks here (including @LenL) have tried my draft set
...
So without further ado, here is my draft 1.1. Suggestions for improvement are invited.
Google is reporting that the zip download is infected with a virus and can't be downloaded. Tried in various browsers on both WIndows and macOS.

3031263
 

·
Registered
Joined
·
1,828 Posts
Google is reporting that the zip download is infected with a virus and can't be downloaded. Tried in various browsers on both WIndows and macOS.
Google drive has apparently gone a little nuts. I know people have downloaded these files over the past few weeks without issue - this virus stuff is new. I scanned the file with McAfee and it says it's fine. I'll investigate in the morning!
 
361 - 380 of 1250 Posts
Top