-
Notifications
You must be signed in to change notification settings - Fork 61
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
Implement a way to query a value (setter getter) #79
Comments
Well, you don't. The latest value is already in your MQTT server, since it's |
MQTT is not about Queries it's push system (although you can implement a query protocol over mqtt). The art is to produce data in a high enough frequency. |
Personally im not for this idea, i think as highlighted above, it goes again the core principle of mqtt and homie. That said if you really like the idea, there is nothing stopping you from implementing this your self in a custom node. We have to remember that Homie has a purpose, and we can't support every idea and every feature possible. We need to also keep homie simple and un bloated, it is designed for embedded systems in mind. If there is a demand for this feature then maybe we'll look into it more. @ThomDietrich thoughts? |
From #76:
Retained messages and the configured reporting interval should suffice. That said, of course it might be needed for your specific application to query a sensor at certain moments in time, e.g. to get the state of a light sensor this instance. Remember that the Homie convention dictates a basic topic structure! You are free to implement your own ideas on top. That means that you can either simply define the @marvinroger @timpur The idea is not far fetched and this is not the first time it was brought forth. How about an FAQ section at the end of the convention where we can also describe such design decisions shortly? @davidgraeff out of interest: How are you going to implement the REFRESH action (in ESH) |
Sure, you can add a FAQ. I don't think this makes sense for homie and it's purpose. How would magority of homie users use this feature and does it benifits them? IMHO, I don't see everyone using this but a few. Could be wrong so please discuss :) |
Is it possible that the retained data a client gets from the broker on connection are not representing the actual state of the device of interest? If so a "gimmy all" query could be use full. |
@ingoogni the "Last Will and Testament" concept of MQTT, which is represented by the I'd suggest to add an FAQ entry and mark this issue as settled. |
Maybe a |
@ThomDietrich : For ESH it works this way:
The Refresh command just looks up the respective property and returns the in-sync state value. |
Sorry guys is it possible for you guys to talk about ESH stuff in a different ticket? (Make your own?) I love implementation talk but also don't want to confuse context here for this ticket. |
Settled 👍 |
I should be able to query a propertyvalue or at least have a message that causes that all the initial data is sended back
How I can query the value of the temperature?
And the other properties?
For example
homie/super-car/engine/temperature/$name → "Engine temperature"
homie/super-car/engine/temperature/$settable → "false"
homie/super-car/engine/temperature/$unit → "°C"
homie/super-car/engine/temperature/$datatype → "float"
homie/super-car/engine/temperature/$format → "-20:120"
homie/super-car/engine/temperature → "21.5"
Can I have something like
send
homie/super-car/engine/temperature/$settable/get → "true"
receive back from the device
homie/super-car/engine/temperature/$settable → "false"
send
homie/super-car/engine/temperature/get → "true"
receive back from the device
homie/super-car/engine/temperature → "false"
The text was updated successfully, but these errors were encountered: