NODE RED: all kind of data but not from my Sonoff Pow R2

Moderator: leecollings

Post Reply
pedemo
Posts: 17
Joined: Saturday 04 May 2019 11:29
Target OS: Raspberry Pi / ODroid
Domoticz version: V 2020.2
Location: the Netherlands
Contact:

NODE RED: all kind of data but not from my Sonoff Pow R2

Post by pedemo »

I've Tasmota 8.1 @ Sonoff Pow R2 Module and the Power consumption is displayed in Domoticz and every 5 mins its getting updated.
In NODE RED I'm using a MQTT IN and a JSON component. I see all kinds of messages so it seems to me that's working correctly but I don't get any kind of data from my POW R2 module. What am I doing wrong?

Hereby my flow:
[{"id":"ad00fca7.41c0e","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ff73dc4a.5fb7","type":"mqtt in","z":"ad00fca7.41c0e","name":"","topic":"domoticz/out","qos":"2","datatype":"auto","broker":"3c5917e0.0d92d8","x":210,"y":300,"wires":[["ffa27d5b.a346e"]]},{"id":"ffa27d5b.a346e","type":"json","z":"ad00fca7.41c0e","name":"","property":"payload","action":"","pretty":false,"x":410,"y":300,"wires":[["4f849e9f.5afb1"]]},{"id":"4f849e9f.5afb1","type":"switch","z":"ad00fca7.41c0e","name":"Test","property":"payload.idx","propertyType":"msg","rules":[{"t":"eq","v":"102","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":590,"y":300,"wires":[["b90e1212.98459"]]},{"id":"b90e1212.98459","type":"debug","z":"ad00fca7.41c0e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":790,"y":300,"wires":[]},{"id":"3c5917e0.0d92d8","type":"mqtt-broker","z":"","name":"Domotics Master","broker":"192.168.1.232","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: NODE RED: all kind of data but not from my Sonoff Pow R2

Post by EddyG »

You should have something like this. It's hard to tell exactly, because I do not know the input.
But look at the function, and forget about (delete) the LINKQUAL part.

Code: Select all

[{"id":"e2ccf39.b96ee1","type":"mqtt in","z":"9e03aa60.7c3848","name":"","topic":"tele/MZH19/STATE","qos":"2","datatype":"auto","broker":"cdfdad81.5526e","x":130,"y":80,"wires":[["a508f047.28a46"]]},{"id":"a508f047.28a46","type":"json","z":"9e03aa60.7c3848","name":"","property":"payload","action":"","pretty":false,"x":330,"y":80,"wires":[["d83fdee6.5f286"]]},{"id":"d83fdee6.5f286","type":"function","z":"9e03aa60.7c3848","name":"LoadAvg","func":"var LINKQUAL=Math.floor( msg.payload.Wifi.RSSI/10 - 1 );\nmsg.payload = { \"command\": \"udevice\", \"idx\": 841, \"nvalue\": 0, \"svalue\" :msg.payload.LoadAvg.toString(), \"RSSI\": LINKQUAL};\n\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":80,"wires":[["78213a20.206234"]]},{"id":"78213a20.206234","type":"mqtt out","z":"9e03aa60.7c3848","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"cdfdad81.5526e","x":910,"y":420,"wires":[]},{"id":"cdfdad81.5526e","type":"mqtt-broker","z":"","name":"Domoticz","broker":"192.168.2.xxx","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
pedemo
Posts: 17
Joined: Saturday 04 May 2019 11:29
Target OS: Raspberry Pi / ODroid
Domoticz version: V 2020.2
Location: the Netherlands
Contact:

Re: NODE RED: all kind of data but not from my Sonoff Pow R2

Post by pedemo »

Okay my MQTT looks okay because it stated several data from other sources but not from my POW.
The POW is updated in Domoticz but not in NODE RED / MQTT. What am I missing?
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: NODE RED: all kind of data but not from my Sonoff Pow R2

Post by FireWizard »

Hi,

Are you expecting data FROM Domoticz, that has previously been received by Domoticz using MQTT in?

See: https://www.domoticz.com/forum/viewtopi ... hilit=mqtt

Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest