Openhabian4.3.5
Raspberry 3B 1GB ram
Hi everyone, I’m returning to using openHAB in a new installation after many years (I think 8-9). I have limited knowledge of the platform dating back to version 2.1, which I still happily use to manage the home automation of my small residence.
Now I find myself facing a new small “challenge”. Obviously, a lot (almost everything) has changed in terms of the interface in the new version 4.3 compared to the previous 2.1 I’m using.
Therefore, I would like to ask you for some suggestions on how to get reacquainted with openHAB.
The current “challenge” is to interface 28 thermostats via Modbus, extracting 14 registers from each one. As a test platform, I was thinking of using a Raspberry Pi 3B with 1 GB of RAM.
Do you think this will be sufficient?
The configuration of the 28 thermostats will be quite repetitive: for each one, I will always have to extract the same 14 registers. I was thinking of using text files to setup things and items.
Is this configuration method still supported?
I spent Sunday studying the Modbus documentation on the website, and since this is the first time I’m using this add-on, I have many doubts that I hope you can help me solve them.
The thermostat manufacturer’s documentation states that all parameters are managed as HOLDING REGISTERs, while it doesn’t provide much detail regarding Value Types.
305.things
Bridge modbus:serial:305Room [port="/dev/ttyUSB0",baud=9600,id=35,dataBits=8,parity="none",stopBits="1.0",encoding="rtu", receiveTimeoutMillis=3000] {
Bridge poller 305RoomSetup [ start=0, length=13, refresh=600, type="holding" ] {
Thing data 305RoomTemp [ readStart="2", readValueType="int16" ]
Thing data 305GuestSetpoint [ readStart="3", readValueType="int16" ]
Thing data 305ONOFF [ readStart="12.1", readValueType="bit", writeStart="12.1", writeValueType="bit", writeType="holding" ]
Thing data 305FancoilMode [ readStart="12.2", readValueType="bit", writeStart="12.2", writeValueType="bit", writeType="holding" ]
}
Bridge poller 305RoomStatus [ start=124, length=22, refresh=600, type="holding" ] {
Thing data 305WaterTemp [ readStart="124", readValueType="int16" ]
Thing data 305WindowsStatus [ readStart="144", readValueType="int16" ]
Thing data 305GuestStatus [ readStart="145", readValueType="int16" ]
}
Bridge poller 305RoomDiagnostic [ start=186, length=4, refresh=600, type="holding" ] {
Thing data 305CoolingValve [ readStart="186", readValueType="int16" ]
Thing data 305HeatingValve [ readStart="187", readValueType="int16" ]
Thing data 305FanONOFF [ readStart="188", readValueType="int16" ]
Thing data 305FanPower [ readStart="189", readValueType="int16" ]
}
/// write only modbus registry
Thing data 305MasterSetpoint [ writeStart="7", writeValueType="int16", writeType="holding" ]
Thing data 305CentroSetpoint [ writeStart="9", writeValueType="int16", writeType="holding" ]
Thing data 305RangeSetpoint [ writeStart="10", writeValueType="int16", writeType="holding" ]
305.items
Number Modbus_Temp_305 "Temperatura camera 305 [%.1f °C]" { channel="modbus:data:305Room:305RoomSetup:305RoomTemp:number", autoupdate="false"[ profile="modbus:gainOffset", gain="0.1", pre-gain-offset="0" ] }
Number Modbus_GuestSetpoint_305 "Setpoint camera 305 [%.1f °C]" { channel="modbus:data:305Room:305RoomSetup:305GuestSetpoint:number", autoupdate="false"[ profile="modbus:gainOffset", gain="0.1", pre-gain-offset="0" ] }
Switch Modbus_ONOFF_305 "Accensione fancoil 305 [%d]" { channel="modbus:data:305Room:305RoomSetup:305ONOFF:switch", autoupdate="false" }
Switch Modbus_FancoilMode_305 "Stagione fancoil 305 [%d]" { channel="modbus:data:305Room:305RoomSetup:305FancoilMode:switch", autoupdate="false" }
Number Modbus_WaterTemp_305 "Temp. batteria fancoil 305 [%.1f °C]" { channel="modbus:data:305Room:305RoomStatus:305WaterTemp:number", autoupdate="false"[ profile="modbus:gainOffset", gain="0.1", pre-gain-offset="0" ] }
Contact Modbus_WindowsStatus_305 "Finestra camera 305 [%d]" { channel="modbus:data:305Room:305RoomStatus:305WindowsStatus:contact", autoupdate="false" }
Contact Modbus_GuestStatus_305 "Presenza cliente camera 305 [%d]" { channel="modbus:data:305Room:305RoomStatus:305GuestStatus:contact", autoupdate="false" }
Contact Modbus_CoolingValve_305 "Valvola condizionamento fancoil 305 [%d]" { channel="modbus:data:305Room:305RoomDiagnostic:305CoolingValve:contact", autoupdate="false" }
Contact Modbus_HeatingValve_305 "Valvola riscaldamento fancoil 305 [%d]" { channel="modbus:data:305Room:305RoomDiagnostic:305HeatingValve:contact", autoupdate="false" }
Contact Modbus_FanONOFF_305 "Motore fancoil 305 [%d]" { channel="modbus:data:305Room:305RoomDiagnostic:305FanONOFF:contact", autoupdate="false" }
Number Modbus_FanPower_305 "Velocita fancoil 305 [%.1f V]" { channel="modbus:data:305Room:305RoomDiagnostic:305FanPower:number", autoupdate="false"[ profile="modbus:gainOffset", gain="0.1", pre-gain-offset="0" ] }
Number Modbus_MasterSetpoint_305 "Setpoint master camera 305 [%.1f °C]" { channel="modbus:data:305Room:305MasterSetpoint:number"[ profile="modbus:gainOffset", gain="0.1", pre-gain-offset="0" ] }
Number Modbus_CentroSetpoint_305 "CentroTemp master camera 305 [%.1f °C]" { channel="modbus:data:305Room:305CentroSetpoint:number"[ profile="modbus:gainOffset", gain="0.1", pre-gain-offset="0" ] }
Number Modbus_RangeSetpoint_305 "Range Temp. ammesso camera 305 [%.1f °C]" { channel="modbus:data:305Room:305RangeSetpoint:number"[ profile="modbus:gainOffset", gain="0.1", pre-gain-offset="0" ] }
- Can write-only registers be inserted directly as children of the Modbus Bridge, as in my configuration (things file)?
- Is the bridge poller necessary only to cyclically update the value of “read” registers? In that case, would you recommend disabling the autoupdate of the “automagically” polled values, in the items file?
- modbus:gainOffset.
The thermostats return the temperature without decimal notation, so for example, the number 200 is equivalent to 20.0 degrees Celsius. The documentation mentions the possibility of using the “modbus:gainOffset” profile to make these numbers “readable” correctly.
Does the profile also work automatically for writing back that values?
For example, if I wanted to change the setpoint temperature to 25.0 degrees, would it then be automatically converted to the raw value 250 before writing it back to the thermostat? - For some items, like the state of a valve, the thermostat will return a binary value 0 (OPEN) / 1 (CLOSED).
Bridge poller 305RoomDiagnostic [ start=186, length=4, refresh=600, type="holding" ] {
Thing data 305CoolingValve [ readStart="186", readValueType="int16" ]
Contact Modbus_CoolingValve_305 "Valvola condizionamento fancoil 305 [%d]" { channel="modbus:data:305Room:305RoomDiagnostic:305CoolingValve:contact", autoupdate="false" }
I read in the documentation that to manage these values inside a “Contact” item, I should perform a transformation by specifying the “readTransform” parameter in the things file. However, I didn’t understand if in my case, the “default” readTransform is sufficient and will be automatically applied, or if I still need to specify it inside the things file.
Maybe in my case a simple MAP transformation would be sufficient. Someone can point me out how to use it with modbus?
Thanks in advance for your help and sorry for the long post full of questions, but i would like to be sure to understand well the modbus logic of the openhab addons before to try everything “on the field”