-
Notifications
You must be signed in to change notification settings - Fork 639
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
Was support for HomeAssistants MQTT_Json implemented? #630
Comments
There are no plans to support MQTT_JSON atm. I will flag this issue as an enhancement. If anyone wants to contribute it will be welcomed. |
I'll take a look since I need transitions as well. |
@xoseperez I'm somewhat lost. The MQTT Topic is similar to Moving the data from To be more specific I need this value for relay X: in I don't even know which relay I should use. Here is the current implementation (also check the whole MQTT_JSON branch): Currently missing:
|
I guess the trouble is caused by trying to use the relay module with a light device. It's not your problem, is inherited by ESPurna architecture but I feel this is wrong. The relay module is a first class citizen since everything started with a relay, wifi and MQTT. But there is no reason there should be a relay here. At the same time the relay is very useful since there are a lot of features on top of it (pulse, scheduling,...). But maybe the light module should have it's own on/off routines... |
Would be a good point to directly support multiple light switches, maybe even dual RGB or dual CCT strips. Modifying the MQTT command topics to include a switch id - eg.: - {root topic}/mired/set
+ {root topic}/0/mired/set
- {root topic}/rgb/set
+ {root topic}/0/rgb/set So we could set the color temperature of the first CCT strip with Would be cool to configure the channels directly from the Webinterface (or while compiling). For example:
or dual RGB strip over 6 channels (if there is a device? or somebody build its own) |
I've updated the code in my fork. The - red is the old topic
+ green the new topic
- H801-201/relay/0/set
+ H801-201/switch/0/set
- H801-201/brightness/set
+ H801-201/brightness/0/set
- H801-201/rgb/set
+ H801-201/rgb/0/set
- H801-201/mired/set
+ H801-201/mired/0/set MQTT_JSON support works. The topic is
Code is in the MQTT_JSON branch: https://github.com/Skaronator/espurna/commits/MQTT_JSON Known Issue:
What do you think @xoseperez? |
I'm worried about the topic naming change since it breaks backwards compatibility. Maybe it should only change if there is indeed more than one light switch. Also we should be aware than detaching the relay module from the light module we are losing some features, like pulses or MQTT sync... |
I can see this was brought up in #235
But from what ive read the auto discover was fixed with no mention of the comparability to use home assistants MQTT_Json (https://home-assistant.io/components/light.mqtt_json/)
I'd live to see the transition feature be implemented over the current ON/OFF functionality
The text was updated successfully, but these errors were encountered: