Page 6 of 6

Re: Online Sensor plugin

Posted: Tue Aug 01, 2023 8:03 pm
by whmoorejr
Running the latest version... 0.1.0....

Skipped the instructions, I installed the plugin first, then added

Code: Select all

pip3 install speedtest-cli
Had errors (speedtest.py not installed) or something like that.
Reloaded plugin and every Online Sensor plugin device is functioning flawlessly.

Thank's for updating this!

Re: Online Sensor plugin

Posted: Fri Dec 22, 2023 12:05 pm
by mintzps
Hi,

I am trying to obtain my IPV4 wan address.
Using ipecho I am am getting my IPV6 address: 2601:985:4680:4880:61bf:36a5:462e:a9d5
This doesn't write correctly into a variable in Indigo.

Can you provide a different web address ton get the IPV4 address?

Re: Online Sensor plugin

Posted: Fri Dec 22, 2023 12:18 pm
by whmoorejr
My online sensor points to

Code: Select all

https://api.ipify.org
it retuns an IPV4 address in the custom state ipAddress on my setup.

I created a new device with ipecho and it also returned an IPV4 address. So I don't know if changing the URL for the IP Echo Service is the solution.... but maybe?

Re: Online Sensor plugin

Posted: Fri Dec 22, 2023 1:31 pm
by mintzps
I eventually found the same one
https://api.ipify.org?format=json

Re: Online Sensor plugin

Posted: Sun Jan 21, 2024 3:27 pm
by whmoorejr
I'd like to know if my home internet is down, even when Indigo is still online (via separate connection)

Can this plugin (I'm thinking not) determine which network indigo is on?
Main home internet is on the Indigo MacMini LAN. There is a dedicated cellular connection via wifi. The mac (I think) only uses the wifi if it can't get traffic through LAN. I was getting notifications (triggers made possible by your plugin) to let me know that the network is back online with data (time/date stamp, duration, network speed).

I previously had a network down notification which was pointless, because obviously I wouldn't get the notification until the network was back up.

Since I have redundancy on that computer now, I think your plugin will always say that it is online?

I thought about a LAN Ping to another always-on device (Like a POE Camera), but that won't work because they don't need internet to see each other.

Any thoughts / pointers?

Re: Online Sensor plugin

Posted: Mon Jan 22, 2024 6:36 am
by ryanbuckner
Can you try specifying the gateway on your ping call? https://www.cyberciti.biz/faq/ping-usin ... p-address/

Re: Online Sensor plugin

Posted: Mon Jan 22, 2024 11:59 am
by whmoorejr
ryanbuckner wrote:Can you try specifying the gateway on your ping call? https://www.cyberciti.biz/faq/ping-usin ... p-address/
I don't think so? Both the house router and the cellular hotspot have the same IP address. They are both connected to the indigo machine, so I'm not sure which one is replying. My indigo machine had different addresses depending on which one it's using. 192.168.1.10 on the home network. 192.168.1.2 on wifi(cellular).

I'm currently trying to figure out if I can Ping via MAC address since the router and hotspot have different mac addresses (but same LAN address).

From terminal, when I "arp -a" I see both 192.168.1.1 entries. I see the MAC address for the hotspot, the MAC address for the Router is (Incomplete).

In my head, this may not be doable. If home internet is down, the router is still up, so I should still be able to successfully ping everything on my home network.

Edit: I'm trying to see If I can change the LAN settings of the hotspot to 192.168.2.1 to better differentiate the networks. However, online or offline, I think I'll still have the same issue, both devices will still be connected to the Indigo machine regardless of their connection to the rest of the world.

I'm still tinkering as I'm typing this. Hopefully it won't do anything horrible. (I'm always nervous when I start entering random stuff from google searches in terminal) So if there is a global internet blackout.... sorry about that.

Edit2: Tried a different approach, instead of a hotspot device, I tried an extra cell phone connected via USB, It connected with the IP address 172.20.10.4. This gives me an option over the wifi route.... "Disable unless needed" So maybe use a successful ping to the 172.20.10.4 address = ethernet down.

Another alternative is to maybe use network speed as an online sensor to determine where my internet is coming from. Both the hotspot device and the cell phone are 4G LTE with a weak signal running about 2-10 Mbps download versus home network average at 180-200 Mbps.

Re: Online Sensor plugin

Posted: Fri Feb 02, 2024 12:01 pm
by whmoorejr
Sorry, I think the speed test part of the plugin may have died with the latest version of Indigo (2023.2).

I'm getting the error "Speedtest library not installed". Not sure if it's better to add this to my machine from terminal or does the library need to be included with the plugin now.

Re: Online Sensor plugin

Posted: Fri Feb 02, 2024 1:24 pm
by jay (support)
No, you just need to rerun the install:

Code: Select all

pip3.11 install speedtest-cli
The plugin developer could add this to a requirements.txt file and it would get installed automatically.