I'm using the next script p1-smart-metering for reading out my smart meter over P1 port. This is working fine.
I also want use this data on another server and want sent it over IP.
part of the script to show what i mean. *rule 9 and 16
This is the first time i use a IP command.
I hope someone can help me with how to do this.
I also want use this data on another server and want sent it over IP.
part of the script to show what i mean. *rule 9 and 16
Code:
if data then
--log(data)
-- Totaal verbruik tarief 1: nacht- of weekendtarief uitlezen kWh
tarief_1 = data:match'1.8.1%((%d+.%d+)'
tarief_1 = tonumber(tarief_1)
--log("Tarief 1 nacht- of weekendtarief: " .. tarief_1 .. " kWh")
grp.checkupdate('13/0/28', tarief_1)
sent this data over IP on port 19928 (if the value chanced)
-- Totaal verbruik tarief 2: dagtarief uitlezen kWh
tarief_2 = data:match'1.8.2%((%d+.%d+)'
tarief_2 = tonumber(tarief_2)
--log("Tarief 2 dagtarief: " .. tarief_2 .. " kWh")
grp.checkupdate('13/0/29', tarief_2)
sent this data over IP on port 19929 (if the value chanced)
This is the first time i use a IP command.
I hope someone can help me with how to do this.