react-homie-devices #312
nstadigs
started this conversation in
Show and tell
Replies: 1 comment 6 replies
-
I don't understand what this is supposed to do? Will it render a UI for Homie devices in a react component? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Custom React renderer to "render" homie devices on your network.
Some might say "BUT WHY 😭". Others (like me) might think that this is a good idea.
Anyway, I've built a custom react renderer and here's the POC: https://github.com/nstadigs/homie-js/blob/main/packages/react-homie-devices/README.md
This is a POC. Many essential things, like setting and receiving values, aren't working yet. But you can render and update your components and the renderer will send messages in the correct order (I think) to add, update and remove homie devices via an MqttAdapter.
Here's an example:
A Device to control LG Tvs on your network could be implemented something like
this (very simplified):
Beta Was this translation helpful? Give feedback.
All reactions