This is the behaviour of domoticz. Cannot be modified by a plugin.
Python Plugin: Wan IP Checker
Moderator: leecollings
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Python Plugin: Wan IP Checker
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 31
- Joined: Monday 09 March 2015 7:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Wan IP Checker
I made a pull request that fix this issue https://github.com/ycahome/WAN-IP-CHECKER/pull/2
Check changes here : https://github.com/ycahome/WAN-IP-CHECKER/pull/2/files
or
Use my fork instead at https://github.com/gilmrt/Domoticz-WAN- ... ker-Plugin
or
Wait for pull request to be merged and update
The issue was the heartbeat run only at poll interval and must run less that every 30s
I applied recommandations
Check changes here : https://github.com/ycahome/WAN-IP-CHECKER/pull/2/files
or
Use my fork instead at https://github.com/gilmrt/Domoticz-WAN- ... ker-Plugin
or
Wait for pull request to be merged and update
The issue was the heartbeat run only at poll interval and must run less that every 30s
I applied recommandations
Warning: Setting this interval to greater than 30 seconds will cause a 'thread seems to have ended unexpectedly' message to be written to the log file every 30 seconds. The plugin will function correctly but this message can not be suppressed because it is a standard warning from Domoticz that a piece of hardware may have stopped responding.
If a plugin wants to heartbeat every 100 seconds it should be coded with the heartbeat interval set to 10, 20 or 25 seconds and only take action every 6th, 5th or 4th time the callback is invoked.
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Python Plugin: Wan IP Checker
Bob123bob wrote: ↑Saturday 02 May 2020 14:38 I made a pull request that fix this issue https://github.com/ycahome/WAN-IP-CHECKER/pull/2
........
Your Pull Request has been merged. regards.
Current version:
v.1.2.6 : Fix (by gilmrt) for "Error: IP WAN hardware (XX) thread seems to have ended unexpectedly"
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Plugin - Wan IP Checker
I didn't had the chance to test it but, I think that if you set telegram's settings at Setup/Settings/Notifications/Telegram and enable Notifications on th plugin, you will get a notification for every WAN ip change. I personally receive it by email.
Actually, plugin uses Domoticz's notification settings.
regards,
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 4
- Joined: Saturday 25 January 2020 12:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Wan IP Checker
First Thanks. That works but it will not sent the new WAN ip address only a change message.
I like to get the IP so I now how to get back into domoticz without the need for a DDNS.
Any chance?
I like to get the IP so I now how to get back into domoticz without the need for a DDNS.
Any chance?

- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Python Plugin: Wan IP Checker
Hello,
what this plugin is designed to do (with "notify" enabled) is to send an email with:
- subject "WAN-IP-Changed"
-body the new WAN IP address.
can you post here what you receive?
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 4
- Joined: Saturday 25 January 2020 12:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Wan IP Checker
I have personal reasons not to work with email on Domoticz, al do it works that way.
I love to receive a telegram with the new IP. If possible of coarse.
I love to receive a telegram with the new IP. If possible of coarse.
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Python Plugin: Wan IP Checker
You have sent 4 posts to this forum.
in 1 of them you mention that the message you get "not contains the WAN IP"
on another you say that you don't want to use email but telegram.
cannot imagine what are the other two posts






Maybe you can try to search awhile before you post.
Start with some tests to see how notification system of Domoticz really works (its only 4 posts above after all)
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 168
- Joined: Monday 22 June 2015 10:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Python Plugin: Wan IP Checker
Is there any way to force the checker to request only for ipv4?
I now get an ipv6 address from https://ifconfig.me/ip
I now get an ipv6 address from https://ifconfig.me/ip
-
- Posts: 168
- Joined: Monday 22 June 2015 10:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Python Plugin: Wan IP Checker
To answer my own question: https://ipv4.icanhazip.comHesmink wrote: ↑Friday 19 January 2024 20:42 Is there any way to force the checker to request only for ipv4?
I now get an ipv6 address from https://ifconfig.me/ip
-
- Posts: 659
- Joined: Thursday 10 November 2016 9:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: Wan IP Checker
Not using this plugin, but from a lua time script that checks for changes periodically (stores them in a user var & if changed sends a mail with info+access links or at least once a week) I use theses URLs to get both:
https://api.ipify.org
https://api64.ipify.org
IPv6 can also be retrieved direcly from machine interface /sbin/ifconfig or similar tool as this one is global, but using external URLs allows checking true connectivity is OK & make both checks the same. IPv6 should almost never change are providers prefixes are not.
IMO, that's useful to get both: Already being compelled to use some hot-spots AP that were not under my control (hotels etc, especially in foreign countries where mobile phone network could also not be used) with no more available DHCP leases for hours due to heavy use by many people: So no IPv4 connectivity. But ipV6, addressing being global, could be used and having the address needed as in such case DNS may also be affected by lack of IPv4 (external port filtered in AP configuration), so no domain usable.
=> My advice: Don't choose, get both & in a way that may be used offline if needed (mail client that keep already loaded messages locally)!
Re: Python Plugin: Wan IP Checker
Hi guys. This method does`t work anymore?
viewtopic.php?t=14489&sid=03c00c6ca0ceb ... 1dc0c1cc57
viewtopic.php?t=14489&sid=03c00c6ca0ceb ... 1dc0c1cc57
-
- Posts: 140
- Joined: Saturday 19 September 2020 21:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Krimpen aan den IJssel
- Contact:
Re: Python Plugin: Wan IP Checker
This wan works for me for years nowCdzn wrote: ↑Friday 22 November 2024 11:49 Hi guys. This method does`t work anymore?
viewtopic.php?t=14489&sid=03c00c6ca0ceb ... 1dc0c1cc57
Code: Select all
return {
on = {
timer = { 'every 1 minutes' }
},
logging = {
level = domoticz.LOG_FORCE,
marker = '[WAN IP]'
},
execute = function(dz, devNil)
local dzb = dz.LOG_FORCE
local getIp = 'curl -s http://whatismyip.akamai.com/'
local tmpFile = '/home/your name/domoticz/scripts/wanip.txt'
local actIp = ''
local devIp = dz.devices('WAN IP')
local currIp = devIp.text
os.execute(getIp..' > '..tmpFile)
actIp = io.open(tmpFile):read()
if actIp == nil then
actIp = 'Cannot retrieve WAN IP'
end
if actIp ~= currIp then
msgTxt = 'WAN IP has changed: '..currIp..' ==> '..actIp
dz.log(msgTxt, dzb)
dz.notify('WAN IP', msgTxt, dz.PRIORITY_EMERGENCY)
devIp.updateText(actIp)
os.execute('rm '..tmpFile)
else
dz.log('No change in WAN IP', dzb)
end
end
}
Yours sincerely,
Fred
Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
Fred
Rasberry Pi 3B+ - Debian Buster - Domoticz 2022.2
RFLink - RFXCom - Zigbee (CC2531)
P1 Smart Meter - KaKu
- dyter
- Posts: 42
- Joined: Thursday 08 February 2018 15:48
- Target OS: NAS (Synology & others)
- Domoticz version: 8841
- Location: Lyon
- Contact:
Re: Python Plugin: Wan IP Checker
I create a device "Ping Internet" for alert if internet down or wan changed
Code: Select all
commandArray = {}
if devicechanged['Ping Internet'] then
time = os.date("%H:%M")
if devicechanged['Ping Internet'] == 'On' then
commandArray['SendNotification']= 'Internet maison rétablit à '..time..'#####telegram'
local function get_ip(url)
local result = (io.popen('curl -m 1 -s ' .. url):read("*a")):match("%d+%.%d+%.%d+%.%d+")
return result
end
ipwan = get_ip('https://api.ipify.org') or get_ip('https://icanhazip.com') or get_ip('https://ifconfig.me')
print(ipwan or "Erreur")
if ipwan ~= uservariables["ipwan"] then
commandArray['Variable:ipwan']= ipwan
commandArray['SendNotification']= 'Attention adresse WAN changée: '..ipwan..'#####telegram'
end
if otherdevices['Escaliers'] == 'On' then
commandArray['Escaliers']='Off'
end
elseif devicechanged['Ping Internet'] == 'Off' then
if (time < '08:00' or time > '19:00') and otherdevices['Alarme'] == "En service" then
commandArray['Escaliers']='On'
end
end
end
return commandArray
Domoticz v2024.1 on Synology Docker host, RFLink, ESPEasy wemos D1, Ecodevices, relays x8, dahua doorbell, reolink cameras ....
- sincze
- Posts: 1300
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Python Plugin: Wan IP Checker
Thanks that helpedHesmink wrote: ↑Friday 19 January 2024 20:48To answer my own question: https://ipv4.icanhazip.comHesmink wrote: ↑Friday 19 January 2024 20:42 Is there any way to force the checker to request only for ipv4?
I now get an ipv6 address from https://ifconfig.me/ip


Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Who is online
Users browsing this forum: No registered users and 1 guest