Page 1 of 1
Get domoticz settings from script
Posted: Saturday 25 March 2017 15:18
by digdug3
Is it possible to read the Domoticz settings from a script? (Longitude, Latitude maybe even the Domoticz ip/port)
As these are used in many scripts.
Re: Get domoticz settings from script
Posted: Wednesday 29 March 2017 19:50
by lonebaggie
Yes
you can get the settings by using a json call to Domoticz. Unfortunately to use json you need to know the IP address ( if using script on same box you can use 127.0.0.1)
use json call
http://ip:port/json.htm?type=settings
if using lua you can use json.lua to parse results into tables
https://www.domoticz.com/wiki/Lua_-_json.lua
hope this helps
Re: Get domoticz settings from script
Posted: Thursday 30 March 2017 17:06
by digdug3
Thank you lonebaggie! Tried it and was able to get the info!