klein0r / ioBroker.awtrix-light

Integrate your Awtrix Light device (e.g. Ulanzi TC001) via HTTP
https://haus-automatisierung.com
MIT License
62 stars 4 forks source link

Color Conversion didn´t work correctly #81

Closed itwegner72 closed 11 months ago

itwegner72 commented 11 months ago

The problem

When i write a color like this one #FF0000 into one of the Datapoints (awtrix-light.0.settings.weekdayColorActive, awtrix-light.0.settings.weekdayColorInactive or awtrix-light.0.settings.textColor), the color is converted to something other. In this case the Return Value in the Datapoint is: #000000 When you write the same Value who is shown in the Datapoint, again in the Datapoint, the Color is changing again. Is this a Bug ? Or do i something wrong. I think that the Value is a #RRGGBB Value or not ?

(Sorry for my bad English)

Version of nodejs

18.17.1

Version of ioBroker js-controller

4.0.24

Version of Adapter

0.8.0

Version of awtrix-light firmware

0.88

Operating system running ioBroker

Linux (RPi4)

Checklist of files to include below

Additional information & file uploads

No response

github-actions[bot] commented 11 months ago

Thanks for reporting @itwegner72!

  1. Check if this topic is not covered in the documentation
  2. Ensure that you use the latest beta version: NPM version
  3. Attach all necessary log files in debug mode, screenshots and other information to reproduce this issue
  4. Search for the issue topic in other/closed issues to avoid duplicates!
klein0r commented 11 months ago

Thanks for reporting. I was able to reproduce this issue.

2023-10-02 16:42:02.803  - debug: awtrix-light.0 (660334) changing setting settings.weekdayColorActive power to #FF0000
2023-10-02 16:42:02.804  - debug: awtrix-light.0 (660334) sending "POST" request to "settings" with data: {"WDCA":"#FF0000"}
2023-10-02 16:42:02.876  - debug: awtrix-light.0 (660334) received 200 response from "settings" with content: "OK"

(and the color changed to red)

The new setting returned

2023-10-02 16:42:02.959  - debug: awtrix-light.0 (660334) [refreshSettings] updating settings value "settings.weekdayColorActive" to #000000 (converted from 16711680)

16711680 is the RGB656 value. Conversion is not working correctly.

klein0r commented 11 months ago

Will be fixed in 0.9.1

itwegner72 commented 11 months ago

Thx. I don´t know if it helps, but look at this Link:

https://docs.google.com/spreadsheets/d/1PppX8FJpddauAPasHwlNgIPGIuPGPNvRbhilIQ8w-7g/edit?pli=1#gid=0

He had the same Problem with another Projekt.

itwegner72 commented 11 months ago

Thx. With Version 0.9.1 it works. :-)