icanos / hassio-plejd

Hass.io add-on for Plejd home automation devices
Apache License 2.0
126 stars 37 forks source link

Add experimental parsing for color temp support from Plejd API #298

Open SweVictor opened 9 months ago

SweVictor commented 9 months ago

Plejd supports color temperature setting on top of dimming.

This PR is an experimental first step to try to implement support.

Expected functionality

Help needed

I don't personally own any color temperature capable Plejd devices, so I will need logs from the silly level minimally showing

Remaining steps

seagri commented 2 months ago

Hi @SweVictor , did you get any logs?

I have DWN-01 now and dimming doesnt work. Would be super nice if we could fix that?

seagri commented 3 weeks ago

Hej! @SweVictor

I would love to help you with this as I own some. But not sure how to get these.

Could you guide me some more?

seagri commented 3 weeks ago

I hope this is what you need. plejd.log

SweVictor commented 3 weeks ago

I hope this is what you need. plejd.log

Seems like you found the log at least!

Just to double-check - are you running the code from the branch with the try to implement support? If you run the main release I don't think it's supposed to work.

https://github.com/icanos/hassio-plejd/tree/feature/experimental-color-temp

If yes, please clarify when you did what that didn't work (preferably with timestamps in the log). As in

At 2024-08-16 09:20:39 I clicked on and then off in HA Nothing/something/xyz happened to the light At 2024-08-16 09:21:41 I changed dim level to xyz YYZ happened to the light (or similar, basically trying to show what's working and not and if it's matching "expected functionality" in this PR)

seagri commented 3 weeks ago

I hope this is what you need. plejd.log

Seems like you found the log at least!

Just to double-check - are you running the code from the branch with the try to implement support? If you run the main release I don't think it's supposed to work.

https://github.com/icanos/hassio-plejd/tree/feature/experimental-color-temp

If yes, please clarify when you did what that didn't work (preferably with timestamps in the log). As in

At 2024-08-16 09:20:39 I clicked on and then off in HA Nothing/something/xyz happened to the light At 2024-08-16 09:21:41 I changed dim level to xyz YYZ happened to the light (or similar, basically trying to show what's working and not and if it's matching "expected functionality" in this PR)

aaah, yeah I was running the main release.

I was fiddling with this today and managed to install hassio-plejd-feature-DWN-dimmable-fix and testing that out. Dimming seem to work for DWN-01 now which is good. I can install the hassio-plejd-feature-experimental-color-temp and test during the weekend.

seagri commented 2 weeks ago

Turned ON Kökgång at 2024-08-22 09:42:14 DBG [plejd-ble] Kökgång and lights turned on

turned OFF at 2024-08-22 09:50:11 and it turned OFF

changed dim level to 100% for Köksö at 2024-08-22 09:52:07 and it dimmed

plejd_logs_color.txt

seagri commented 2 weeks ago

tried to change color in HA tried_to_change_color.txt

irisityvictorhagelback commented 2 weeks ago

Thanks @seagri! So... Is it working as expected in the "expected functionality" section in the first post? If not, what's not working as you expect it to?

seagri commented 2 weeks ago

The dimming works but not changing the color.

seagri commented 3 days ago

Is the logs OK or should I do something else?

I trying to click 1 of the 4 color buttons in HA and getting this ` 2024-09-05 13:27:47 VRB [plejd-mqtt] Received mqtt message on homeassistant/light/plejd/D4DBAE3BA354_0/set

2024-09-05 13:27:47 VRB [plejd-mqtt] Getting device D4DBAE3BA354_0 from registry 2024-09-05 13:27:47 VRB [plejd-mqtt] Got mqtt SET command for light, Entré (D4DBAE3BA354_0): {"state":"ON","color_temp":454} 2024-09-05 13:27:47 INF [device-comm] Plejd got turn on command for Entré (D4DBAE3BA354_0), brightness undefined 2024-09-05 13:27:47 DBG [device-comm] Queueing turn on Entré (D4DBAE3BA354_0). No brightness specified, setting DIM to previous. 2024-09-05 13:27:48 DBG [device-comm] Write queue: Processing Entré (D4DBAE3BA354_0). Command Turn on. Total queue length: 0 2024-09-05 13:27:48 VRB [plejd-ble] Sending 6 byte(s) of data to Plejd. 130110009701 `

But nothing happens with the light.

image