Add automatic trigger to get Peanut Plug OTA check to work #2027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Koen,
Here's a crack at fixing Koenkk/zigbee2mqtt#4846.
Note that I did not do what you suggested in that issue (add code to
toZigbee.js
and then manually trigger with an MQTT message); instead, I am automatically triggering the zigbee message whenever an OTA update is checked.While I think this is easier for the end user, I did have to export
zigbeeOTA.getImageMeta
so I could use it. I'm also not very familiar with Zigbee endpoints (or the z2m implementation thereof), so I just kinda guessed at how to write to thegenScenes
endpoint and it ended up working out.If you don't like this implementation, please let me know what you want changed. Alternatively, I can switch to your original suggestion if you'd still prefer that.
One more note: I haven't tested actually updating a Peanut Plug yet, as I only have one that needs an update. Once you approve this PR, I'll test the full update process and make sure everything works like we expect it to.