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.
Get domoticz settings from script
Moderator: leecollings
- lonebaggie
- Posts: 86
- Joined: Tuesday 31 January 2017 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: England
- Contact:
Re: Get domoticz settings from script
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
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
-
- Posts: 19
- Joined: Monday 03 August 2015 22:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: Get domoticz settings from script
Thank you lonebaggie! Tried it and was able to get the info!
Who is online
Users browsing this forum: No registered users and 1 guest