IamMeter Integrate with Domoticz
1. Introduction
Domoticz is a Home Automation System that lets you monitor and configure various devices like: Lights, Switches, various sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water and much more. Notifications/Alerts can be sent to any mobile device. Our Wi-Fi energy meter (WEM3080/WEM3080T) can be integrated with Domoticz system.
2. Domoticz settings
Step 1, open /domoticz/scripts/lua_parsers, then add the flowing code to iammeter.lua flow(WEM3080):
-- Retrieve the request content
s = request['content'];
-- Update some devices (index are here for this example)
local voltage = domoticz_applyJsonPath(s, '.Data[0]')
local current = domoticz_applyJsonPath(s, '.Data[1]')
local power = domoticz_applyJsonPath(s, '.Data[2]')
local importenergy = domoticz_applyJsonPath(s, '.Data[3]')
local exportgrid = domoticz_applyJsonPath(s, '.Data[4]')
domoticz_updateDevice(1, 0, voltage)
domoticz_updateDevice(2, 0, current)
domoticz_updateDevice(3, 0, power)
domoticz_updateDevice(4, 0, importenergy)
domoticz_updateDevice(5, 0, exportgrid)
add the flowing code to iammetert.lua flow (WEM3080T):
-- Retrieve the request content
s = request['content'];
-- Update some devices (index are here for this example)
local voltage_a = domoticz_applyJsonPath(s, '.Datas[0][0]')
local current_a = domoticz_applyJsonPath(s, '.Datas[0][1]')
local power_a = domoticz_applyJsonPath(s, '.Datas[0][2]')
local importenergy_a = domoticz_applyJsonPath(s, '.Datas[0][3]')
local exportgrid_a = domoticz_applyJsonPath(s, '.Datas[0][4]')
local voltage_b = domoticz_applyJsonPath(s, '.Datas[1][0]')
local current_b = domoticz_applyJsonPath(s, '.Datas[1][1]')
local power_b = domoticz_applyJsonPath(s, '.Datas[1][2]')
local importenergy_b = domoticz_applyJsonPath(s, '.Datas[1][3]')
local exportgrid_b = domoticz_applyJsonPath(s, '.Datas[1][4]')
local voltage_c = domoticz_applyJsonPath(s, '.Datas[2][0]')
local current_c = domoticz_applyJsonPath(s, '.Datas[2][1]')
local power_c = domoticz_applyJsonPath(s, '.Datas[2][2]')
local importenergy_c = domoticz_applyJsonPath(s, '.Datas[2][3]')
local exportgrid_c = domoticz_applyJsonPath(s, '.Datas[2][4]')
domoticz_updateDevice(6, 0, voltage_a)
domoticz_updateDevice(7, 0, current_a)
domoticz_updateDevice(8, 0, power_a)
domoticz_updateDevice(9, 0, importenergy_a)
domoticz_updateDevice(10, 0, exportgrid_a)
domoticz_updateDevice(11, 0, voltage_b)
domoticz_updateDevice(12, 0, current_b)
domoticz_updateDevice(13, 0, power_b)
domoticz_updateDevice(14, 0, importenergy_b)
domoticz_updateDevice(15, 0, exportgrid_b)
domoticz_updateDevice(16, 0, voltage_c)
domoticz_updateDevice(17, 0, current_c)
domoticz_updateDevice(18, 0, power_c)
domoticz_updateDevice(19, 0, importenergy_c)
domoticz_updateDevice(20, 0, exportgrid_c)
Step 2, open domoticz -- Setup -- Hardware:
Set by the flow picture ,then Click Add (WEM3080):
if your meter is WEM3080T:
Click Create Virtual Sensors (WEM3080)
Click Create Virtual Sensors (WEM3080T):
Step 3,then click Setup -- Devices , you can see the datas (WEM3080):
Step 4, notes, iammeter.lua/iammetert.lua domoticz_updateDevice first number must Corresponding to Idx:
3.Domoticz display
Open the Utility:
4.Reference
Demo user/password: iammeter/iammeter