Vera UI7 humidity data to Domoticz
Posted: Sunday 31 January 2021 22:44
I am trying to transfer humidity data from Vera UI7 to Domoticz using the command "os.execute('curl "http://192.168.1.95:3480/data_request?i ... rrentLevel"')" in ~/domoticz/scripts/lua_parsers under Linux Debian 18.04. The command "http://192.168.1.95:3480/data_request?i ... rrentLevel" when put into a web programme gives the correct result. I've looked at examples but am struggling.
How do I programme LUA to put the humidity data into a Virtual Sensor?
HTTP Poller settings
ContentType: application/xmp
The lua script below
os.execute('curl "http://192.168.1.95:3480/data_request?i ... rrentLevel"')
local deviceId = 281
s = request['content'];
local id = domoticz_applyXPath(s,'//id/text()')
local s = domoticz_applyXPath(s,'//value/text()')
domoticz_updateDevice(id,'',s)
How do I programme LUA to put the humidity data into a Virtual Sensor?
HTTP Poller settings
ContentType: application/xmp
The lua script below
os.execute('curl "http://192.168.1.95:3480/data_request?i ... rrentLevel"')
local deviceId = 281
s = request['content'];
local id = domoticz_applyXPath(s,'//id/text()')
local s = domoticz_applyXPath(s,'//value/text()')
domoticz_updateDevice(id,'',s)