please set "Debug" to "True" and PM me the results.manjh wrote: ↑Thursday 01 February 2018 12:41 Hmmm. replaced the code in the plugin.py, restarted Domoticz, and enabled the plugin.
Code: Select all
2018-02-01 12:40:01.517 Error: (WAN IP checker) 'onHeartbeat' failed 'ValueError'. 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 151 in /home/pi/domoticz/plugins/WAN-IP-CHECKER/plugin.py, function onHeartbeat 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 102 in /home/pi/domoticz/plugins/WAN-IP-CHECKER/plugin.py, function onHeartbeat 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 153 in /usr/lib/python3.4/urllib/request.py, function urlopen 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 440 in /usr/lib/python3.4/urllib/request.py, function open 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 258 in /usr/lib/python3.4/urllib/request.py, function __init__ 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 284 in /usr/lib/python3.4/urllib/request.py, function full_url 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 313 in /usr/lib/python3.4/urllib/request.py, function _parse 2018-02-01 12:40:03.075 dzVents: Warning! WAN IP has changed!
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: Plugin - Wan IP Checker
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
Doneycahome wrote: ↑Thursday 01 February 2018 13:20please set "Debug" to "True" and PM me the results.manjh wrote: ↑Thursday 01 February 2018 12:41 Hmmm. replaced the code in the plugin.py, restarted Domoticz, and enabled the plugin.
Code: Select all
2018-02-01 12:40:01.517 Error: (WAN IP checker) 'onHeartbeat' failed 'ValueError'. 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 151 in /home/pi/domoticz/plugins/WAN-IP-CHECKER/plugin.py, function onHeartbeat 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 102 in /home/pi/domoticz/plugins/WAN-IP-CHECKER/plugin.py, function onHeartbeat 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 153 in /usr/lib/python3.4/urllib/request.py, function urlopen 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 440 in /usr/lib/python3.4/urllib/request.py, function open 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 258 in /usr/lib/python3.4/urllib/request.py, function __init__ 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 284 in /usr/lib/python3.4/urllib/request.py, function full_url 2018-02-01 12:40:01.517 Error: (WAN IP checker) ----> Line 313 in /usr/lib/python3.4/urllib/request.py, function _parse 2018-02-01 12:40:03.075 dzVents: Warning! WAN IP has changed!
Hans
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Plugin - Wan IP Checker
you forgot the "https://" prefix on the Check My IP URL.
Seems that "except" cannot catch "ValueError"
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
Yes, that did it!
I think it would be useful to add a check on this. People are so used to typing the URL without the prefix.
For instance, when I type "hashemian.com/whoami/" in my browser address line, it will automatically add the
prefix "https://www." to create the full URL.
Alternatively, add a text on the window to make sure people type the complete, full URL...
Hans
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
Last question on testing: in order to test the whole string of actions, I would like to see a mail coming into my mailbox from the plugin.
Is there a way to force this? Can I manually change the "kept" URL to trigger this? Where is it stored?
Is there a way to force this? Can I manually change the "kept" URL to trigger this? Where is it stored?
Hans
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Plugin - Wan IP Checker
You put me on a close pressing,
Ok, update it once more. You are going to find some interesting features.
Enable notifications and Debug mode, put check interval at "60". Notifications are triggered on every 5 minutes (1st and 5th minute)
I hope you like it,
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
Yes, I hear that a lot. I have worked several years as professional SW tester for a worldclass IT company, so I guess it's in my blood...
Hans
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
changed and restarted...
Also found that after restart there were suddenly two entries in the HW overview, different IDX's.
After a bit of thought removed both and added a new line.
Code: Select all
2018-02-01 16:52:12.526 (WAN IP checker) Initialized version 1.2.1, author 'ycahome'
2018-02-01 16:52:12.581 (WAN IP checker) Debug log level set to: 'false'.
2018-02-01 16:52:16.845 (P1 meter) P1 Smart Meter (Power)
2018-02-01 16:52:18.303 (RFLink De Meern) Temp + Humidity (Alecto V4)
2018-02-01 16:52:24.864 (WAN IP checker) WAN IP Updated to:145.129.114.127
2018-02-01 16:52:24.866 (WAN IP checker) Running WAN IP Notifications
2018-02-01 16:52:24.870 Incoming connection from: ::1
2018-02-01 16:52:24.873 Error: (WAN IP checker) HTTP Request error: HTTP Error 401: Unauthorized URL: http://localhost:8080/json.htm?type=command¶m=sendnotification&subject=WAN-IP-Changed&body=145.129.114.127
After a bit of thought removed both and added a new line.
Last edited by manjh on Thursday 01 February 2018 16:59, edited 1 time in total.
Hans
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Plugin - Wan IP Checker
Lets not talk about Testing and troubleshooting, will overrun this forum.manjh wrote: ↑Thursday 01 February 2018 16:53 changed and restarted...
Code: Select all
2018-02-01 16:52:12.526 (WAN IP checker) Initialized version 1.2.1, author 'ycahome' 2018-02-01 16:52:12.581 (WAN IP checker) Debug log level set to: 'false'. 2018-02-01 16:52:16.845 (P1 meter) P1 Smart Meter (Power) 2018-02-01 16:52:18.303 (RFLink De Meern) Temp + Humidity (Alecto V4) 2018-02-01 16:52:24.864 (WAN IP checker) WAN IP Updated to:145.129.114.127 2018-02-01 16:52:24.866 (WAN IP checker) Running WAN IP Notifications 2018-02-01 16:52:24.870 Incoming connection from: ::1 2018-02-01 16:52:24.873 Error: (WAN IP checker) HTTP Request error: HTTP Error 401: Unauthorized URL: http://localhost:8080/json.htm?type=command¶m=sendnotification&subject=WAN-IP-Changed&body=145.129.114.127
what is your Domoticz Http port? obviously not 8080
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
Could it be caused by that duplicate HW line? The same plugin was defined twice somehow. I removed them and re-installed, and now it doesn't crash. But I don't see any new options, and no mail getting into my mail box...ycahome wrote: ↑Thursday 01 February 2018 16:58It is 8080.manjh wrote: ↑Thursday 01 February 2018 16:53 changed and restarted...
Code: Select all
2018-02-01 16:52:12.526 (WAN IP checker) Initialized version 1.2.1, author 'ycahome' 2018-02-01 16:52:12.581 (WAN IP checker) Debug log level set to: 'false'. 2018-02-01 16:52:16.845 (P1 meter) P1 Smart Meter (Power) 2018-02-01 16:52:18.303 (RFLink De Meern) Temp + Humidity (Alecto V4) 2018-02-01 16:52:24.864 (WAN IP checker) WAN IP Updated to:145.129.114.127 2018-02-01 16:52:24.866 (WAN IP checker) Running WAN IP Notifications 2018-02-01 16:52:24.870 Incoming connection from: ::1 2018-02-01 16:52:24.873 Error: (WAN IP checker) HTTP Request error: HTTP Error 401: Unauthorized URL: http://localhost:8080/json.htm?type=command¶m=sendnotification&subject=WAN-IP-Changed&body=145.129.114.127
Lets not talk about Testing and troubleshooting, will overrun this forum.
what is your Domoticz Http port? obviously not 8080
Hans
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Plugin - Wan IP Checker
Did you set :
- plugin "Notifications" = Notify?
- plugin "Debug" = True?
- Domoticz Email Settings?
- Waited 5 minutes?
Have you got any new errors on your log?
I think that you should leave your Testing Hat and work on your troubleshooting skills
- plugin "Notifications" = Notify?
- plugin "Debug" = True?
- Domoticz Email Settings?
- Waited 5 minutes?
Have you got any new errors on your log?
I think that you should leave your Testing Hat and work on your troubleshooting skills
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
ycahome wrote: ↑Thursday 01 February 2018 17:18 Did you set :
- plugin "Notifications" = Notify? YES
- plugin "Debug" = True? YES
- Domoticz Email Settings? checked, all is correct
- Waited 5 minutes? YES
Have you got any new errors on your log? NO
I think that you should leave your Testing Hat and work on your troubleshooting skills
mailsettings.JPG
Hans
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
got this again:
Code: Select all
2018-02-01 17:25:47.455 (WAN IP Checker) WAN IP retrieved:145.129.114.127
2018-02-01 17:25:47.455 (WAN IP Checker) Previous WAN IP:145.129.114.127
2018-02-01 17:25:47.455 Error: (WAN IP Checker) Debug is on. Trigering IP Change:
2018-02-01 17:25:47.456 (WAN IP Checker) WAN IP Updated to:145.129.114.127
2018-02-01 17:25:47.456 (WAN IP) Updating device from 1:'145.129.114.127' to have values 1:'145.129.114.127'.
2018-02-01 17:25:47.817 (WAN IP Checker) Running WAN IP Notifications
2018-02-01 17:25:47.823 Error: (WAN IP Checker) HTTP Request error: HTTP Error 401: Unauthorized URL: http://localhost:8080/json.htm?type=command¶m=sendnotification&subject=WAN-IP-Changed&body=145.129.114.127
2018-02-01 17:26:44.980 (WAN IP Checker) Calling message handler 'onHeartbeat'.
2018-02-01 17:26:44.980 (WAN IP Checker) onHeartbeat called
2018-02-01 17:26:46.427 (WAN IP Checker) IP Discovery Site's response len is:15
2018-02-01 17:26:46.427 (WAN IP Checker) WAN IP retrieved:145.129.114.127
2018-02-01 17:26:46.427 (WAN IP Checker) Previous WAN IP:145.129.114.127
2018-02-01 17:26:46.427 (WAN IP Checker) WAN IP the same. Skipping
Hans
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
Yeah, testers can be a real pain-in-the-youknowwhat...
Are you sure this is a valid URL on a Raspberry-Pi : http://localhost:8080
Hans
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Plugin - Wan IP Checker
Is it a Raspbian jessie? or something different?manjh wrote: ↑Thursday 01 February 2018 17:34 Are you sure this is a valid URL on a Raspberry-Pi : http://localhost:8080
Also, you have set your Domoticz for "http"? "https"? or both?
Do you have authentication (password) set on your Domoticz?
P.S.: try to run from your PC by replacing <domoticz ip> with your server's IP:
http://<domoticz ip>:8080/json.htm?type=command¶m=sendnotification&subject=WAN-IP-Changed&body=145.129.114.127
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
When done from my Win10 laptop,it comes back with this:ycahome wrote: ↑Thursday 01 February 2018 18:01Is it a Raspbian jessie? or something different?manjh wrote: ↑Thursday 01 February 2018 17:34 Are you sure this is a valid URL on a Raspberry-Pi : http://localhost:8080
Also, you have set your Domoticz for "http"? "https"? or both?
Do you have authentication (password) set on your Domoticz?
P.S.: try to run from your PC by replacing <domoticz ip> with your server's IP:
http://<domoticz ip>:8080/json.htm?type=command¶m=sendnotification&subject=WAN-IP-Changed&body=145.129.114.127
{
status: "OK",
title: "SendNotification"
}
I use Jessie. On the settings, I have this in local networks: 10.0.0.*; 127.0.0.*; 10.8.0.*
10.0.0 is my lan IP range. 127.0.0 for local, and 10.8.0 for access via VPN.
The good news is that I now see an email in my inbox! So if we tackle the triggering, we're all done!
Hans
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Plugin - Wan IP Checker
Do you have password protection on your domoticz?
--------
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
Check a new minor version 1.2.2
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
-
- Posts: 708
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Plugin - Wan IP Checker
Yes I do. But anything coming from within my network (10.0.0.*) comes in free. As wel as 127.0.0.*, and 10.0.8.*.
Hans
- ycahome
- Posts: 248
- Joined: Sunday 12 February 2017 10:55
- Target OS: Linux
- Domoticz version: lat Beta
- Contact:
Re: Plugin - Wan IP Checker
try to add "::1", I saw that connections from localhost logged as "Incoming connection from: ::1"
Don't forget to use version 1.2.2. Contains some corrections.
--------
https://www.youtube.com/siakavelisgr
https://www.youtube.com/siakavelisgr
Who is online
Users browsing this forum: No registered users and 1 guest