-
Notifications
You must be signed in to change notification settings - Fork 41
"mqtt_json" platform no longer supported by Home Assistant #51
Comments
@donkawechico Thanks for letting me know about this. I haven't upgraded HA myself so, haven't seen it yet. Let me have a look. |
Correct about change in HomeAssistant but your bulbs should still work (mine do). The mqtt_json platform is deprecated but still accepted. All that is needed in AiLight is a quick change in the discovery message sent. IIRC, the platform is changed from mqtt_json to mqtt and a new key schema=json is added.
… On Jan 25, 2019, at 1:53 AM, Sacha Telgenhof ***@***.***> wrote:
@donkawechico Thanks for letting me know about this. I haven't upgraded HA myself so, haven't seen it yet. Let me have a look.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
From what I can tell from reading the HA PR in question, indeed the mqtt_json is still accepted. So the change should be straightforward. It will only mean that the AiLight firmware with this change will not work with earlier versions of HA (before 0.84). |
I just did the same change it just needs new documentation. So in home assistant instead of putting ......
you put.....
|
@SurfingSpider The documentation needs to be changed, but also the firmware. For the HA auto discovery to work, the payload structure needs adjusting. |
Correct. It's the auto-discovery feature that seems to break with the latest. And all my bulbs are auto-discovered. I could add them all manually, but I have 12 bulbs and, well, I'd just really rather not :P Thanks for looking into it @stelgenhof! |
@donkawechico As said, the change is simple but it will be a breaking change for those not running HA 0.84 yet with this update. |
Just curious -- does it necessarily need to break older versions? I'm envisioning something like I could try putting up a PR that makes that change, if that'd help. But if you already have a solution in the works, maybe not worth it? |
@stelgenhof Went ahead and whipped up a PR that (maybe) would resolve this issue with new discovery syntax without breaking lights for users of older HA versions. It builds locally, but I haven't had a chance to push it to an actual bulb for testing so I'm marking it as "explorational" only. Could totally be a bad approach, but figured I'd at least give it a shot and see if it helps! |
@donkawechico Thanks! See my comment on the PR |
@stelgenhof See what we are doing here https://github.com/toblum/McLighting/blob/1578cafbf0aee2cbec9e5e1b76be3a6754072837/Arduino/McLighting/request_handlers.h#L1099 We have an issue open toblum/McLighting#327 to address |
@debsahu Thanks for the update. Seems to me you are not following the specs :) |
@donkawechico Just made changes that enable the new syntax for Home Assistant 0.84 (or later) and an option for users that are still on Home Assistant 0.84 (or older). Compiled/tested the code successfully on my side. I only don't have HA < 0.84 so wasn't able to test that. However, the code changes are pretty minimal so the chances of any issues are very slim. Cheers! Sacha |
Awesome! Thanks @stelgenhof! Unrelated side-note, I work at a company under Microsoft, and at our recent hackathon, I presented a light-effects platform I've started that uses MQTT to generate effects on the bulb without having to store in flash. Presented to 100 or so folks and spoke a lot about your firmware -- even brought in a flashed bulb to show it off. Just thought you might get a kick out of that :) Love these bulbs! |
@donkawechico Thanks! That's so nice to hear :) Hope the audience enjoyed it. Cheers! Sacha |
@donkawechico Would you perhaps mind sharing an example of the light effects you demonstrated at that hackathon? It maybe makes a good practical example for others to see how to use this firmware :) Cheers! Sacha |
Fixed in the just released version 0.6.0. |
Happy to, but the code is reeeeally bad :P I was trying too hard to architect something extensible and ended up with a structural mess. I'm going to get back to the project soon, but not sure I'm ready to put my name to it yet ;) That said, the mess is located here: https://github.com/donkawechico/mqtt-light-effects. Feel free to dig around (and even make suggestions if you like), but please ask before linking it in the wiki. |
@donkawechico Thanks for sharing! Don't worry it is messy, still we can learn from it :) (No worries, I am not linking it anywhere). |
AI-Light version: 0.4.1-dev
HA version: 0.86.2
As of HA 0.84, "mqtt_json" is no longer a valid platform:
home-assistant/core#18227
Since upgrading, I've been unable to use AILight via Home Assistant, and see tons of spam in my logs saying:
Since the error doesn't explicitly suggest AILight is the source of the error, I did a recursive grep for "mqtt_json" in my HA directory and found nothing. Looking through AILight code, however, I see this line, which suggests the platfprm is being set to mqtt_json for discovery purposes:
https://github.com/stelgenhof/AiLight/blob/80666ddca444b8eb529b02ea17770ff10ff5b5b3/src/light.ino
It's certainly possible that I'm misinterpreting things here, but it feels to me like AILight firmware isn't accommodating the new APi for mqtt lights.
Let me know if I can provide additional details.
The text was updated successfully, but these errors were encountered: