homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 308 forks source link

Report switches status in timely manner #459

Closed dvv closed 6 years ago

dvv commented 6 years ago

Hello!

I would like the device to report its switches et al. status along with heartbeat telemetry. How do I do that?

TIA, --Vladimir

timpur commented 6 years ago

you should have a look at the examples first https://github.com/marvinroger/homie-esp8266/tree/develop/examples

and also the docs http://marvinroger.github.io/homie-esp8266/docs/develop/quickstart/getting-started/

dvv commented 6 years ago

@timpur the point was in "along with heartbeat telemetry", i.e. without explicit coding that.

bertmelis commented 6 years ago

You can't. You have to explicitely send the property values.

dvv commented 6 years ago

I see. Thank you, @bertmelis!

timpur commented 6 years ago

@dvv my mad, but ive been thinking of building nodes and components which arnt part of the core Homie, but come with the lib that you can add on to homie, like a heartbeat node. I can share you my lib for such a component if you like.

My heartbeat node allows the users to send a true statement to the device, and the device responds with false a second later, like turning on and off a switch, thus you can tell the device is working properly when ever you feel like.

Tell me your toughts on this idea.

@marvinroger @bertmelis
@euphi @ThomDietrich