-
Notifications
You must be signed in to change notification settings - Fork 97
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
support setting lightingTheme via MQTT #618
base: master
Are you sure you want to change the base?
Conversation
also publish the proper metadata for it to work via Home Assistant. note that this requires publishing an additional state topic that includes both the on/off state and the theme in a single topic (HASS can't deal with a single topic for commands and separated topics for state - it either needs to be a single topic for all attributes on both state and command, or it needs to be separate topics for each attribute on both state and command).
I'm not sure if this is ready yet. The MQTT topic structure is correct, and the command goes through. But I have an IntelliBrite light on an EasyTouch panel, and AFAICT the code doesn't actually send a "theme" command to the system, it manages the on/off timing itself. So the lightingTheme state never updates. I haven't actually opened my pool cover yet to watch and see if lights are going to the correct color. What's weird is that if I use the ScreenLogic app to set a color style, njsPC does pick up on that and quickly updates the lighting state. |
We manage the timing for the themes... You shouldn't do that via MQTT. It will never be guaranteed to be the right intervals. The api call for setting the theme is like this:
You can get the themes for a given circuit (eg 3) with this |
I think you're misunderstanding. I'm not trying to replicate the timing for themes via MQTT. I'm exposing the same API you just referenced, via MQTT. And I've been testing using the dash panel. But either way, when I use njsPC to set the theme, it doesn't know what theme is set. But when I use Screenlogic, njsPC does know what theme was set. I'm curious why that is. |
Ok, gotcha.
We should know the theme. Can you tell me the steps to reproduce? Or do a packet capture (even better) so I can see what you mean? |
Did you get this one working? Or still having the issues mentioned above? |
I have not yet. It's a bit of a lower priory for me, since the core on/off functionality works. It's definitely on my list to look at at some point though. |
also publish the proper metadata for it to work via Home Assistant. note that this requires publishing an additional state topic that includes both the on/off state and the theme in a single topic (HASS can't deal with a single topic for commands and separated topics for state - it either needs to be a single topic for all attributes on both state and command, or it needs to be separate topics for each attribute on both state and command).