-
Notifications
You must be signed in to change notification settings - Fork 767
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
About the command "String msg ="{xxxx}"; #1916
Comments
tempc is the key used by OMG to understand that this is a temperature in Celsius All the properties used in the Theengs decoder could be used, example: In your case it could be: String msg = "{"model":"ESP32WGHT","id":"" + NodeId + "","weight":" + String(weight) + "}"; |
Many thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello and thank you for your often quick and helpful responses.
I need to better understand a command you use in the "temperature" example on a DIY sensor.
This is the one I would like to adapt to other sensors:
String msg = "{"model":"ESP32TEMP","id":"" + NodeId + "","tempc":" + String(temp) + "}";
1- I understand that this line sends a message to OMG so that it translates the sensor data into MQTT.
But where does “tempc” come from?
Is this a “topic” that OMG can recognize?
If so, what other topics could we use?
For example to send a weight collected by HX711.
2- More generally, could you direct me to a doc so that I can learn how to form a "String msg" by myself without disturbing you.
A big thank you from France.
Jean Marc.
The text was updated successfully, but these errors were encountered: