Hello,
as I didn’t find a working openHAB configuration to connect an Askoheat+ flange heater I figured out how to define things and items and to read 2 values. I’m posting how all is currently defined in order to help others to save some time.
Things file:
Bridge modbus:tcp:askomatcp "Heizstab" @ "Keller" [ host="<host ip>", port=502, id=1 ] {
Bridge poller AskInput "Heizstab Input-Register" @ "Keller" [ start=108, length=4, refresh=10000, type="input" ] {
Thing data AskNotbetrie…
Hi Community
Thank you Konfusius for sharing this information. I tried to get the values of the following registers:
> Register Description Datatype
> 108 Emergency Mode 1 word / byte / 0 = off, 255 = on
> 109 status 1 word / uint16
> 110 heaterload 1 word / uint16 / 250-30000 watt
> 325+326 temperature s0 2 words / float32 / floating point °celcius
> 510 legiotemp 1 word / byte / 50-65
> 612+613 relay1count 2 words / int32 / 0-100.000
> 614+615 relay2count 2 words / int32 / 0-100.000
> 616+617 relay3count 2 words / int32 / 0-100.000
> 618+619 relay4count 2 words / int32 / 0-100.000
> 620+621 relay5count 2 words / int32 / 0-100.000
> 627 legiostatus 1 word / byte
> 629 legiopasttime 2 words / array[4][5.17] / dd:hh:mm
> 631 Errorstatus 1 word / uint16
I think I understand the data type byte, uint16, int32.
I don’t understand float32 (register 325+326). I get the values 0x41b1 and 0x7a02 which is 16’817 and 31’234 in decimal. How do I calculate the temperature (22.18) from these two values?
{325} MODBUS_EMA_TEMPERATURE_FLOAT_SENSOR0 = 0x41b1 → 22.18
{326} = 0x7a02
Can somebody explain how to get the value of register 628+629 to dd:hh:mm?
{628} MODBUS_VAL_LEGIO_PAST_TIME = 0x000c → 12d 12h 39m
{629} = 0x0c27
Any help would be much appreciated.
BR Thomas
DarkoG
(Darko)
March 4, 2025, 6:26pm
2
check this
Single-precision floating-point format (sometimes called FP32 or float32) is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point.
A floating-point variable can represent a wider range of numbers than a fixed-point variable of the same bit width at the cost of precision. A signed 32-bit integer variable has a maximum value of 231 − 1 = 2,147,483,647, whereas an IEEE 754 32-bit base-2 floating-...
You need to look in the bits of the registers and get the number.
But sometimes the sequence of the bytes can be swapped
After reading more about the modbus binding I figured out how to do it.
Part of the Things file:
Bridge poller asko_ema "EMA" [ start=325, length=2, refresh=10000, type="input" ]
{
Thing data wassertemp "Wassertemperatur" [ readStart="325", readValueType="float32" ]
}
Part of the Items file:
Number Wassertemperatur "Wassertemperatur" <energy> {channel="modbus:data:askomatcp:asko_ema:wassertemp:number"}
This works fine.
Konfusius
(Reinhold Wagner)
March 9, 2025, 8:32am
4
Register 628 is defined as array according to the Askoma documentation:
But I think the modbus binding does no provide a proper item type.
Konfusius
(Reinhold Wagner)
March 19, 2025, 10:54pm
5
Register 628 (last legionella protection) needs a transformation. I created this script:
openhabian@openhab3:/etc/openhab/transform $ cat float2date.js
(function(inp) {
// input: the polled number as float
// output: string
// let log = require('openhab').log('my_logger');
// log.info("f2di in: " + inp);
var MperH = 60; // minutes per hour
var MperD = MperH * 24; // minutes per day
inp = inp * 100000000000000000000000000000000000000000;
inp = MperD * inp; // total minutes
inp = Math.round(inp) // make integer
var Days = Math.floor(inp / MperD);
var rest = inp % MperD;
var Hours = Math.floor(rest / MperH);
var Minutes = rest % MperH;
Hours = ("0" + Hours).slice (-2);
Minutes = ("0" + Minutes).slice (-2);
var Output = Days + ":" + Hours + ":" + Minutes + " (D:H:M)";
// log.info("f2d out: " + Output);
return Output;
})(input)
The transformation script must be added to the thing:
Thing data AskLegio "Heizstab Letzter Legionellenschutz" [ readStart="628", readValueType="float32", readTransform="JS(float2date.js)" ]
And the item is a string type item:
String AskLegio "Heizstab Letzter Legionellenschutz" {channel="modbus:data:askomatcp:AskInput3:AskLegio:string"}
The sitemap looks like this:
But for whatever reason it’s not very accurate. This is shown by the Askome web UI:
But I think it’s accurate enough.
Good luck
Reinhold