Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HKT - convert temperatures at sub-zero temperatures #52

Open
smash-666 opened this issue Jan 6, 2021 · 5 comments
Open

HKT - convert temperatures at sub-zero temperatures #52

smash-666 opened this issue Jan 6, 2021 · 5 comments

Comments

@smash-666
Copy link

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?

grafik

@LSH-Assistance
Copy link

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)

@Apollon77
Copy link
Collaborator

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)

@smash-666
Copy link
Author

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

@Apollon77
Copy link
Collaborator

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.

@smash-666
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants