Open smash-666 opened 3 years ago
The temperatures are stored as binary and there seems to be an issue with negative numbers. Let me quote from another discussion on the openhab community: "_Here’s a clue - 4096 happens to be a magic number in binary = 0001000000000000 I’ll make an assumption that temp 0.5 is actually sent as 05 and the binding has to divide by ten. binary = 0000000000000101 So when you log 409.5 the binary would be 4095 = 0000111111111111 which can also be interpreted as a 12-bit negative binary number with value -1 (-0.1 when scaled)
I’d be fairly confident that you can make your own correction here with something as simple as if myvalue > 300 then myvalue = myvalue - 409.6_" (see https://community.openhab.org/t/innogy-room-thermostat-at-400-c/104156/2)
Please providde a debug log with sch a "wrong" value based oin v1.0.0 (https://forum.iobroker.net/topic/61351/livisi-innogy-smarthome-adapter-1-0-0-breaking)
Why is a debug log needed?
The solution is already in jhassler's contribution (if myvalue > 300 then myvalue = myvalue - 409.6_).
I can confirm that, the values count down 0.2; 0.1; 0.0; 409.5 (-0.1); 409.4 (-0.2);...
Could you remove this formula internally in the code? A lternatively, I would have to solve this using Java Script and a new object.
Thanks very much!
Greetings Micha
Why is a debug log needed?
Honestly, because I say so. I'm the developer which currently tries to maintain this adapter without even having the hardware. So if you want my support, then please deliver what I ask for. Thank you.
And because I'm nice I also tell you the reason: All information above do not contain a detailed information which state is affected, which Capability and which Channel and I will not start to guess. So I would not even know where to do any change. The debug log will show me which data come in in which field and when you then tell me what the actual valueof the timepoint of the log is, I can make changes based on the data I see.
So in the end it is your decision. Decide what you want.
Here is the interesting part of the debug log. Is that enough or do you need more information?
Regards Michael
2023-02-06 16:11:47.215 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.9 (ack = true) 2023-02-06 16:17:33.197 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.8 (ack = true) 2023-02-06 16:22:21.702 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.7 (ack = true) 2023-02-06 16:22:21.788 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.7 (ack = true) 2023-02-06 16:24:24.216 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.6 (ack = true) 2023-02-06 16:29:53.943 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.5 (ack = true) 2023-02-06 16:32:17.227 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.4 (ack = true) 2023-02-06 16:34:26.003 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.3 (ack = true) 2023-02-06 16:40:08.495 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.2 (ack = true) 2023-02-06 16:44:53.222 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0.1 (ack = true) 2023-02-06 16:49:24.761 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 0 (ack = true) 2023-02-06 16:53:42.774 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.5 (ack = true) 2023-02-06 16:53:42.867 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.5 (ack = true) 2023-02-06 16:53:42.913 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.5 (ack = true) 2023-02-06 16:55:22.155 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.5 (ack = true) 2023-02-06 16:55:22.161 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.5 (ack = true) 2023-02-06 16:55:22.165 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.5 (ack = true) 2023-02-06 16:56:34.235 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.5 (ack = true) 2023-02-06 16:59:11.278 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.4 (ack = true) 2023-02-06 16:59:11.329 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.4 (ack = true) 2023-02-06 17:01:33.896 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.3 (ack = true) 2023-02-06 17:01:33.990 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.3 (ack = true) 2023-02-06 17:03:42.032 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.2 (ack = true) 2023-02-06 17:03:42.131 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.2 (ack = true) 2023-02-06 17:06:39.809 - debug: innogy-smarthome.0 (21455) state innogy-smarthome.0.Aussen.HT_Aussen.Temperatur-(Heizkörper)-1.Temperature changed: 409.1 (ack = true)
If the temperature of the HKT goes into the minus range, then no negative values are displayed, but temperatures above 400 degrees. I believe that it is not a BUG in the adapter, but the innogy API really delivers these values. I had already seen this on a smartphone app (mySmarthome) and wrote it to the developer. It converts these values so that correct temperature values in the nagative range result from the incorrect values of the API. Is it possible to program this for this adapter too, so that the values are correctly displayed in the ioBroker?