Transfer data from one VERA LITE (UI7) to VERA LITE (UI5)
I am running two vera lite at the same time (in the same network;
a) One veralite UI5 with standard apps (lighting etc) and a number of homemade applications
One application is the dutch smart meter with internet connection of the isk5meter
(fixed ip address with fixed gateway)
b) I have added a new vera lite running on UI7
With openterm gateway for the heating system (fixed ip address with fixed gateway)
All running smooth for a while separately.
Now i have moved the dutch smart meter to the UI7 unit and made connection to the iska meter with fixed ip and fixed gate.
I have two questions on which would like some advise;
after reading several posts on this forum i got the following;
xxx.xxx.x.xx:3480/data_request?id=variableget&DeviceNum=14&id=variableset&serviceId=urn:micasaverde-com:serviceId:EnergyMetering1&Variable=KHW
if i test i get the respond “OK”, so something happens
Your request specifies the “id” parameter twice, so it’s likely getting clobbered. Try:
local status, result = luup.inet.wget("http://xxx.xxx.x.xx/port_3480/data_request?id=variableget&DeviceNum=14&serviceId=urn:micasaverde-com:serviceId:EnergyMetering1&Variable=KHW " ,3)
Also note that using the “:3480” port specifier will likely stop working at some future date; the replacement form is to use the /port_3480/ path.
== running atUI5 (device 94 is dutchSmartMeterCounter)
Variable low is value to be taken from UI7 to UI5
== source running at UI7
Device 14 is dutchsmartmeter running at other vera
if i try the following if is working;
xxx.xxx.x.xx/port_3480/data_request?id=variableget&DeviceNum=14&output_format=text&serviceId=urn:micasaverde-com:serviceId:EnergyMetering1&Variable=KWH >> gives the correct value
if i enter in the url xxx.xxx.x.xx/port_3480/data_request?id=variableget&DeviceNum=14&serviceId=urn:micasaverde-com:serviceId:EnergyMetering1&Variable=KWH_frac i get direct the respond of the value
This reads the URL and returns 3 variables: the first is a numeric error code which is 0 if successful. The second variable is a string containing the contents of the page. The third variable is the HTTP status code. If Timeout is specified, the function will timeout after that many seconds. The default value for Timeout is 5 seconds. If Username and Password are specified, they will be used for HTTP Basic Authentication
it gives thee responds,
so should it not be
local operationStatus , LowMeter , httpStatus = luup.inet.wget ____
instead of
local Status, LowMeter = luup.inet.wget ____