Closed ndom91 closed 6 years ago
So just to be clear here- the issue is the monitor is turning off / on when it's not supposed to be?
If so- I suspect a mismatch between your devices
& residents
. With your current configuration, NetworkScanner will never realize any residents (Nico_7P
) are on the network, because you don't have a device configured with the name "Nico_7P".
Personally, I don't use the occupiedCMD
& vacantCMD
options, but I have several devices configured with spaces in their name, and I haven't had issues otherwise.
Ah sorry that was a typo after I copied and pasted and did some editing, the devices and residents are the same.
EDIT: Hmm okay nevermind, keepalive still isn't working for me in general, I guess I was mistaken before haha.
EDIT2: Well I think I've found the culprit.. when manually running arp-scan I get segfaults haha. I'm going to close this issue and focus on getting arp-scan to run manually first.. Btw im running this on regular ol Raspberry Pi 3 with Raspbian Stretch, nothing fancy and no major changes.
EDIT3: arp-scan works when run with sudo - looks like you guys are executing it with sudo as well, so idk whats going on here haha. I'll keep looking, but again I think this issue is still, well, a non-issue :P
So after https://github.com/ianperrin/MMM-NetworkScanner/commit/6d5d1b198875bc298304d7624cbec08f90413f90 keepalive works as intended, but only when I name the device without a space in it, for example
Nexus6P
vsNexus 6P
When I name the device
Nexus 6P
as soon as android does its sleep wifi business where MMM-NetworkScanner no longer finds it for a bit the screen turns off.If I name it
Nexus_6P
this behavior is no longer seen. In fact, I see when android drops the wifi connection temporarily, because MMM-NetworkScanner now saysNO DEVICES ONLINE
, however because of the working keepalive is long enough it stays on until android decides to refresh some feed or pull emails or what have you where it needs an active wifi connection againBtw - I've found 5min (300s) is an adequate time for Android phones to keep MMM-NetworkScanner to keep the screen on and not have intermittent screen off time due to Androids erratic wifi behavior.
Config:
Now I do not have a degree in CS or anything, but my little experience with programming leads me to believe the variable for the device name just simply wasn't wrapped in quotes somewhere. Therefore the space breaks out of the variable too early and therefore breaks the keepalive functionality. Just my guess though. Thought it might at least lead someone onto the correct track..