Topic for object with both On/Off and Open/Close states

18 views
Skip to first unread message

Chad Smith

unread,
Feb 4, 2018, 10:01:06 PM2/4/18
to MQTT
I'm new to MQTT, and after getting everything integrated and running I'm starting to map out my topic structure.
I have a very general question for anyone with some input.

I was planning on having a topic path of something like ../../state in which I could record devices states like on/off, open/closed, essentially anything binary in nature.
But then I started thinking about what if a device can both be on/off and open/closed, like a fridge, microwave, etc.

Am I simply looking for naming convention examples and ideas to handle multiple binary states for a single device?
Some that come to mind are to name them like on-off, or on|off. Or maybe to just on. ../../device/on, ../../device/open
Thank you.
Reply all
Reply to author
Forward
0 new messages