This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Dinamic IP
#1
Hi everybody,
is it possible using my LM know my actual public IP and show it?
Best regards Cristian
Reply
#2
Create a scheduled script that runs every 5 minutes:
Code:
ip = require('ssl.https').request('https://openrb.com/ip/')
if ip then
  grp.checkupdate('0/0/1', ip:trim())
end

Change 0/0/1 as needed, make sure that data type is set to "250 byte string".
Reply
#3
(05.10.2020, 06:23)admin Wrote: Create a scheduled script that runs every 5 minutes:
Code:
ip = require('ssl.https').request('https://openrb.com/ip/')
if ip then
  grp.checkupdate('0/0/1', ip:trim())
end

Change 0/0/1 as needed, make sure that data type is set to "250 byte string".
Thank you so much
Reply
#4
Hello guys!
A little bit of a help on how to set schedule. The help of w4k and the manual doesn't seems to be helpful for me.
The goal was to run every 5 minutes but it doesn't work.

Attached Files Thumbnail(s)
   
Reply
#5
Does the script work when run manually? Check that you have valid gateway and DNS settings in System Config > Network > Interfaces > eth0.
Reply
#6
grp.checkupdate will send anything only when the value changes. You can add log(ip) at the end of the script to check if it works as it should.
Reply
#7
Yes manually works fine.
I assume that it doesn't work because it doesn't update the value in the objects sector at the "Updated at" tab.

(23.09.2021, 10:03)admin Wrote: grp.checkupdate will send anything only when the value changes. You can add log(ip) at the end of the script to check if it works as it should.

Thank you!

Attached Files Thumbnail(s)
   
Reply


Forum Jump: