Client IP into a variable

Posted on
Wed Oct 18, 2017 3:47 pm
lalisingh offline
Posts: 166
Joined: Mar 27, 2007

Client IP into a variable

When I click on a object/button on a control page I see the following in theIndigo log file:

request to execute "Living Room Main" control #2 from 192.168.1.19

I would like to capture the from IP to a variable.

Anyway to do this?

[url]https://www.VillageWorker.com[/url]
Extreme data analytics, Sensing, Control integration work.
Indigo • Barix • Kentix • Mobotix • Mikrotik • Apple

Posted on
Thu Oct 19, 2017 5:43 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Client IP into a variable

Not easily. You'd need to either parse the log file or turn on the SQL logger and watch for those events, parse out the data, and insert into a variable.

As I said, not easily...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Oct 19, 2017 6:19 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Client IP into a variable

Or (ducking head) hack IndigoWebServer/indigopy/indigodb.py.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Oct 19, 2017 8:59 pm
lalisingh offline
Posts: 166
Joined: Mar 27, 2007

Re: Client IP into a variable

Thanks for both suggestions, parse log file and hack the indigodb.py.

I have done the latter to suppress 'request to update variable...' messages as the log file was filling up and not recording any log message after 12 hours.

What I am really after is to make the ipad control page room aware.

So the use case is walk into a zone/room , hit a button on the control page and it advances to the most relevant control page for the room.

Assume here that there are multiple ipads/ screens throughout the house each statically assigned an IP.

Not unlike a home button on mobile phones.

[url]https://www.VillageWorker.com[/url]
Extreme data analytics, Sensing, Control integration work.
Indigo • Barix • Kentix • Mobotix • Mikrotik • Apple

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests

cron