Any way to retrieve the current color temperature by another program?
-
I was looking to making a plugin for the Elgato Stream Deck+ to work with Flux. Currently I can make due with the hotkey functionality assigned to the dials on the device and it works, but I'd like the to be able to show the current color temperature on the little display screen.
The closest I could come to was the registry key values that get set by flux for "Outdoor", "Indoor", and "Late". That does seem to get updated in real time, but even if I had the program get those values, there's no way to know which one is currently being used, because Flux chooses which based on sunset and the wake time setting. Theoretically I could apparently have the plugin get the sunset time itself through the Windows API, but that would assume the user even has their location set in Windows and might not be fully reliably synced with Flux.
So unless I'm missing something there's no direct or indirect way to get the current set color temperature from flux.
If it wouldn't be too much trouble, could a future update add a new registry key that says whether the day/night/late/disabled temperature is in effect?
-
@ClearCase hi - currently the easiest way to do this is via the "LAN API" which can POST to a localhost server with this information in real time. (There is not currently a registry/file/COM equivalent.)
-
I've got a webhook working with my Home Assistant server, but this feature seems to only work with non-SSL connections, is that right? It works with http:// but not https://. Unfortunately Home Assistant just rejects non-ssl connections if you have ssl enabled.
-
@ClearCase it should work with SSL too but it might fail if it's not in the windows certificate store - is it self-signed or something like that?
-
@herf Well it is self signed but I do have the certificate in the trusted store. I used WireShark to see the activity going on, and I'm not an expert on this but it seems like it could be sending regular http instead of https despite the URL in the setting being an https address.
Here's what the packet exchange looks like when HTTPS is disabled in Home Assistant, and the address in the Flux settings is just http://
It returns an OK message as expected since this works.And here it is when HTTPS is enabled in Home Assistant and the address is https://
It looks to me like Flux is sending the packet as http. Because actually encrypted traffic shows up as the protocol being "TLSv1.2" or "TLSv1.3", not HTTP. And looking at the packet details below, it seems to even show the "Full Request URI" as starting with http://, even though it's set as https
-
@ClearCase you are right - our code is insisting on "port 443" to use SSL, so it decides 8123 is regular http - it was some pretty old code there ;) Will be fixed in next version.
-
@herf Awesome appreciate it! 👍