-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add "get" next to "set" #23
Comments
Given the |
I don't think this makes sense for MQTT since you have to expect multiple consumers. With multiple consumers, it will "reply" to all of them when ever any one of them sends the "get" command. If you need request/response, then try COAP or HTTP. |
Let's say a temperature sensor is publishing every 5 minutes. For troubleshooting reasons I want to have it every minute. My possibilities are:
I was looking at my KNX installation and saw that a sensor was programmed to publish a value every 60s. But in addition I also could read the value on request, if allowed to do so. Hence the idea. |
What about changing @bertmelis requirement a little bit, while achieving the same: |
@bertmelis , I would say that the "correct" solution is
on the grounds that hard-coded numbers are bad. You could even make it a node, like |
As for the homie-esp8266: I don't like implementing it in a custom property as it requires my server to speak JSON which it doesn't for the moment and I don't like rebooting (however it's the no 1 solution from my former IT helpdesk 😆). I'll figure something out with configuration-nodes. But I do find that this limits the framework to create active IoT devices but not interactive. |
I don't feel like "hacking" how MQTT works is a good idea. You said so, your use-case would be debugging. As @nzbuu said, you can create a If a newer version of MQTT comes with RPC, I'd be happy to reconsider. 😃 |
OK, no hard feelings 😃 It will work with an extra configuration-node. For the MQTT standard: it's only for ver.5 As we're only on V3x it could take a while. |
What do you think of a "get" topic extension?
For interacting devices it's not really an issue, but for sensors it would make sense to request a measurement externally.
In the Arduino/ESP8266 framework, the sensor examples are all working on a fixed hardcoded time base. A workaround could be to put the interval into the config json and update this via MQTT. But imho it would be simpeler if a property state can be requested by a ".../topic/property/get"-command (void payload).
The text was updated successfully, but these errors were encountered: