Converting hex to decimal

This is also incorrect, the example Dick presented must be a typo as the bat and Ok have no quotes.

Yup just another example of why you should copy/paste instead of typing it in by hand :upside_down_face:

E1cid and Colin
thanks for the help till now
this (Temp/Hum) is all right now.
ID gives a unique number that indicates what sensor is used
(There a Cresta in two variations, Prologue, Oregon end and Auriool).
gr
Dick

Zenofmud
Another problem for me:
with converting this :
My dht11 gives 17.5 as variable value.
with function

msg.payload = {"command":"udevice", "idx":1558, "svalue":"temp"}
return msg;

OR with Json -Convert between Json to Json string -
With MQTT is it for me not possible to get the value 17.5 Ā° in the command line
MQTT gives in debug

object  command: "udevice", idx: 1558  svalue: "temp"

And i would have idx: 1558 , 17.5
Can you give me advise
Dick

If you wnt it to look like:

{ "command":"udevice", 
  "idx":1558, 
  "svalue": 17.5
}

Try

msg.payload = {"command":"udevice", "idx":1558};
msg.payload.svalue = temp;
return msg;

this assumes you have assigned the variable temp with the dht11 reading

zenofmud
thanks for the help/info but those advice til now is not helping me for a useful result.
I try another solution
node-red rflink
buying/soldering using rfload gives as example with rflink:
20;09;Cresta;ID=3A01;TEMP=00ed;HUM=66;

In the above example, the device has 2 values, TEMP and HUM. The msg.payload will have msg.payload.temp and msg.payload.hum

How should i do that?
Can you help me?
Dick

You need to attach a debug node - set to display the complete msg object - to the output of the node providing that data. Then open all the tabs for the debug in the sidebar and copy the results and paste it to a reply so I can see the actual data.

[{"id":"c564433d.73ac3","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ab899847.35ba08","type":"rflink in","z":"c564433d.73ac3","device":"","name":"","x":190,"y":160,"wires":[["c206fdab.72953"]]},{"id":"c206fdab.72953","type":"debug","z":"c564433d.73ac3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":440,"y":160,"wires":[]},{"id":"cb7c81b6.5e4a9","type":"comment","z":"c564433d.73ac3","name":"20;09;Cresta;ID=3A01;TEMP=00ed;HUM=66","info":"rf load gives the data","x":310,"y":100,"wires":[]},{"id":"e1e28cae.1645b","type":"comment","z":"c564433d.73ac3","name":"rf load gives the data","info":"","x":230,"y":60,"wires":[]},{"id":"21ecc030.341aa","type":"comment","z":"c564433d.73ac3","name":"internet gives: ","info":"https://flows.nodered.org/node/node-red-contrib-rflink\n\nIn the above example, the device has 2 values, TEMP and HUM. The msg.payload will have msg.payload.temp and msg.payload.hum","x":220,"y":240,"wires":[]}]

Paul the problem is how do i get the data with rflink?
rflink: node-red-contrib-rflink (node) - Node-RED and the conversion? but there is no data!

or should i use a serial in node? that is another problem i think

Dick

I can't help you with the node-red-contrib-rflink node since I've never used it.

In addition, it hasn't been updated in over two years and the owner hasn't been responding to issues opened, This might not be the best choice.

What was wrong with the way you were doing it?

Paul,

Thanks

As earlier mentioned: i am trying to use all my (sensor) data -in and extern in a node-red flow.

With your (and from others) help came it to a succes

Eg

1 A splitting way of the data

2 var hum1= msg.payload[0]; var hum2= msg.payload[1]; etc the payload number increases til 46 but it works for me

3 inpute with the serial method wth two arduinos (different comports)

4 and at this moment i try another manner RFLINK (WITH the var hum1= msg.payload[0]; goes it well) this is serial in.

But i would try RFLINK NODE. (With https://flows.nodered.org/node/node-red-contrib-rflink) and that stops till now.

So i am experimenting further.

As i said It is all working, but i like the experimental manner

Gr

Dick

But

Verzonden vanuit Mail voor Windows

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.