![]() |
|
AP Systems EZ1-M integration - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: AP Systems EZ1-M integration (/showthread.php?tid=5881) |
AP Systems EZ1-M integration - Sral1987 - 10.02.2025 Hi, has somebody done the Integration of an AP Systems EZ1-M Micro Inverter ? Since 10/2023 there is an local API AP Systems EZ1-M API. Could someone help me to integrade the Values ( Current, Power, Error Messages) to KNX ? RE: AP Systems EZ1-M integration - RomansP - 10.02.2025 Hi Here is a code Code: json = require('json')
http = require('socket.http')
local ip = "192.168.1.100" -- Replace with the actual IP
local url = "http://" .. ip .. ":8050/getOutputData"
local resp = http.request(url)
--log(resp)
resp = json.pdecode(resp)
--log(resp)
if( type(resp) == 'table' ) then
log(resp.data)
grp.checkwrite('1/1/1', resp.data.p1) -- power channel 1
grp.checkwrite('1/1/2', resp.data.p2) -- power channel 2
grp.checkwrite('1/1/3', resp.data.e1) -- Energy generation after startup - Channel 1 . Unit kWh
grp.checkwrite('1/1/4', resp.data.e2) -- Energy generation after startup - Channel 2 . Unit kWh
grp.checkwrite('1/1/5', resp.data.te1) -- Energy generation lifetime - Channel 1 . Unit kWh.
grp.checkwrite('1/1/6', resp.data.te2) -- Energy generation lifetime - Channel 2 . Unit kWh.
end |