I am creating the clock part for my roomthermostat. I have a database with times and temp's.
I have a flow where a mysql query gives back one row with the temp that should be sent to the thermostat at a certain time. This comes out of the mysql block:
I fed that through a json node as proposed in an other thread but then I have this:
How do I get the 19.8 out there so I can feed that value in a mqtt-out that sets my roomthermostat (I know how to do that).
Java is not my strongest point...
You have fed an object into JSON node and it has turned it into a string.
Delete that and simply access the properties of the array mysql returns.
Read the documentation on working with messages, it shows you how to inspect objects in the debug window (even tells you if the payload is a string or object etc). Better still, it tells you how to select an item of interest and copy it's path.
I promise if you absorb that info, you won't find yourself asking questions like this.
I found the solution.
With a Change node: set msg.payload to msg.payload.tk_temp
Now for the next challenge... (graphs...)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.