iobroker-community-adapters / ioBroker.homepilot

Connect Rademacher Homepilot to ioBroker
http://www.iobroker.net
MIT License
8 stars 8 forks source link

Add support for Connect Aktor #18

Closed christofkac closed 4 years ago

christofkac commented 5 years ago

Hi, it would be great if support for the connect aktor could be added. Without this support, the shutter level is displayed in the temperature state with an odd scaling. See https://forum.iobroker.net/topic/25227/homepilot-fehler-bei-connect-aktor-kein-level for details. Thanks!

Pix--- commented 5 years ago

Hi, initially I developed this adapter for Rademacher shutter belt actors. From time to time other users contributed data and time to add more actors. As I still only use shutter belt actors I can not really develop further versions. But if you have pull requests I'd really appreciate it.

christofkac commented 5 years ago

Hi, after some search I have found the problem (I think). At the beginning I did not understand why my Aktor with the code 49 behaves differently than the Connect Aktor with the code 4B. After some checking I realized, that the following code in main.js has a bug: parseInt(duoferncode.substring(0,2)) < 20 is true for the input '4B' as in that case, parseInt results in '4' as partInt expects a decimal value as parameter.

As the code is in hexadecimal I expect that all lines containing that code have to be changed as following: parseInt(duoferncode.substring(0,2), 16) < 26 26 instead of 20 as 0x19 is 25.

I know the solution but I don't know how to build that adapter. Could you please create a new adapter version and I can test it with my configuration? Thanks Christof

christofkac commented 4 years ago

Hi, finally I realized that I can simply change the code in my local installation and try it out. This was successfull, so that I created a pull request with my changes. I hope those are acceptable. Thanks for the great adapter! Bye Christof