It basically corresponds to Nibe Uplink, but fits several brands and is significantly cheaper if you own an old Nibe. It communicates via Wifi and the api is really simple to use. The price of the module is 1495 SEK which corresponds to 140 euro.
Usage:
Create a number of virtual sensors such as 'T_RadiatorReturn' In the code below. Some of them are temperature sensors, some are custom sensors and some are switches, see in the code. Different manufactures has different subset of the sensors. In this case it fits an old Nibe f1230. The temperatures are in signed 16 format multiplied with 10 and has to be converted to the actual value
Change the 'API_ENABLED' in the configuration panel of the H60 to 1 (or 2 if you want to change parameters in the heat pump)
Further more, change the IP-address in the example to what you are using.
The code in dzVents to read the parameters from the heat pump:
Code: Select all
local function Signed(Value)
if Value > 32768 then
Value = Value - 65536
end
return Value
end
return {
on = {
timer = {
'every 1 minutes'
},
httpResponses = {
'trigger'
}
},
execute = function(domoticz, item)
if (item.isTimer) then
domoticz.openURL({
url = 'http://192.168.8.120/api/alldata',
method = 'GET',
callback = 'trigger',
})
end
if (item.isHTTPResponse) then
domoticz.log(item.data)
if (item.statusCode == 200) then
local data = domoticz.utils.fromJSON(item.data)
domoticz.devices('T_RadiatorReturn').updateTemperature(data["0001"]/10)
domoticz.devices('T_HeatCarrierForward').updateTemperature(data["0004"]/10)
domoticz.devices('T_BrineIn').updateTemperature(Signed(data["0005"])/10)
domoticz.devices('T_BrineOut').updateTemperature(Signed(data["0006"])/10)
domoticz.devices('T_Outdoor').updateTemperature(Signed(data["0007"])/10)
domoticz.devices('T_HotWaterTop').updateTemperature(data["0009"]/10)
domoticz.devices('T_HotWaterMid').updateTemperature(data["000A"]/10)
domoticz.devices('T_HotGas').updateTemperature(data["000B"]/10)
domoticz.devices('T_SuctionGas').updateTemperature(data["000C"]/10)
domoticz.devices('T_LiquidFlow').updateTemperature(data["000D"]/10)
domoticz.devices('T_HeatingSetpoint').updateTemperature(data["0107"]/10)
domoticz.devices('t_DegreeMinutes').updateCustomSensor(Signed(data["8105"]))
domoticz.devices('Curve').updateCustomSensor(Signed(data["2205"])/10)
domoticz.devices('Parallel').updateCustomSensor(Signed(data["2207"])/10)
-- Special handling to avoid massive amount of data stored
if (domoticz.devices('b_Compressor').state == 'On' and data["1A01"] == 0) then
domoticz.devices('b_Compressor').switchOff()
elseif (domoticz.devices('b_Compressor').state == 'Off' and data["1A01"] == 1) then
domoticz.devices('b_Compressor').switchOn()
end
if (domoticz.devices('b_PumpColdCircuit').state == 'On' and data["1A04"] == 0) then
domoticz.devices('b_PumpColdCircuit').switchOff()
elseif (domoticz.devices('b_PumpColdCircuit').state == 'Off' and data["1A04"] == 1) then
domoticz.devices('b_PumpColdCircuit').switchOn()
end
if (domoticz.devices('b_PumpHeatCircuit').state == 'On' and data["1A05"] == 0) then
domoticz.devices('b_PumpHeatCircuit').switchOff()
elseif (domoticz.devices('b_PumpHeatCircuit').state == 'Off' and data["1A05"] == 1) then
domoticz.devices('b_PumpHeatCircuit').switchOn()
end
if (domoticz.devices('b_WaterHeating').state == 'On' and data["1A07"] == 0) then
domoticz.devices('b_WaterHeating').switchOff()
elseif (domoticz.devices('b_WaterHeating').state == 'Off' and data["1A07"] == 1) then
domoticz.devices('b_WaterHeating').switchOn()
end
else
domoticz.log('There was a problem handling the request', domoticz.LOG_ERROR)
domoticz.log(item, domoticz.LOG_ERROR)
end
end
end
}
Code: Select all
return {
on = {
devices = { 'Termostat' },
timer = { 'on every 5 minutes' }
},
execute = function(domoticz, device)
local setpoint = domoticz.devices('Termostat').setPoint
local NewParallel = (setpoint-21)*10
local ActualParallel = tonumber(domoticz.devices('Parallel').state)
if NewParallel/10 ~= ActualParallel then
domoticz.openURL('http://192.168.8.120/api/set?idx=2207&val=' .. NewParallel)
end
end
}