Hi, Love the app. I am having some issues with using host names as the IP address which keeps coming back as offline even though I ping it manually fine (no issues when using actual IP addresses).
Does the app support the use of host names instead of IP address? Attached screenshot, log extract and shell cmd ping
Not an expert with this plugin, but is it expecting a dotted quad IPv4 adress (like you ping and all the devices that are showing online) as opposed to hostname?
yes it does, as long as your name is correct and resolved by the DNS it will work
in your example the names are not matching you have b6e99c.home that succeeds and epson3bce2d.home in the log which fails. if the command line ""ping -c 1 -w 3 ā¦nameā¦ " works then the plugin will work
Iām also looking into this as a more intelligent method for resetting the router when one home is vacated. Working through some kinks, and might just do 3-4 ping sensors. Or maybe ping lua from reactorā¦?
Hi, I have finally noticed that my Inverted sensors still dont work either. I have just had a look at the code and spotted there is a logic error in the inverting line:
local inverted = device_def.inverted or 0
local value = (inverted>0) and (not success) or success
Whatever the value is for āinvertedā, the āor successā term will return true if success is true. Looking on github at version 0.10, (app store version above is at 0.7); the names have changed, but the logic is still wrongā¦
local value = (inverted>0) and (not device_def.success) or device_def.success
I have changed my code to XOR the inverted and success flags. This seems to correct the issue:
local value = (inverted>0) ~= device_def.success
Regards
Octoplayer
(I also changed the log entry from
luup_log:319: NETMON: warning: Device 192.168.1.72 did not respond properly toā¦
to
luup_log:319: NETMON: warning: Device 192.168.1.72 did not respond to
Hi amg,
I had already pulled v.10 from github to fix the issue, but it had the same behaviour as the version that I had previously been using from the app store. The other possibility is that I have got the wrong files from github, but I have checked against your link above and it looks like the latest version of L_netmon.lua
The issue is that the code says:
local value = (inverted>0) and (not device_def.success) or device_def.success
That is pretty much: (inverted and not success) OR success
So if a ping is received, success is true, but (Anything) OR (True) is always True.
hence āinvertedā is ignored if a ping is received.
Using Inverted ~= success gives an exclusive-or function, so that if inverted ==false, value
= success, but if inverted is true, then value = not success.
So, yes, I had tried v0.10, and the fix I posted makes invert work the way I would expect, i.e. I have some devices that I monitor and want to be tripped when they go offline, (webcams, NAS etc). Others are normally off and I want to know when they go on (PC / TV) so I set those to inverted.
(Thatās why I also changed the log wording; for a device that is turned off or is out of range, āno pingā is the proper response, sorry - just being pedantic )
understood. can you please try v11 on github/ I used a less sophisticated version than your code just for my simple brain to understand it laterā¦ but it should be the same I hope
let me know, thx for reporting the issue
I donāt know why, but I noticed recently the icons are not changing when devices are detected. I just upgraded to v10 and that didnāt resolve the issue.
ALL devices on the status tab say āOfflineā however if i click ātestā the expected ones do get a pop-up which says āOnlineā. Nothing happens if they are actually offline.
Any thoughts on what may have changed?
Edit: just realized IPs showing unchanged since April 21.
Ok, just installed 0.12, so far so good. But I have a question.
After I added 2 IPās I got 2 new devices. Looks good. But is it the way that when you remove an IP,
you have to manually remove the device that was created?