Hello,
I am catching the string "null" from a msg and i am incrementing a counter every time it shows up (normally there is a number), at least i'm trying to.
But the output counts up until a random number, then it starts over.
Is something wrong with my flow? Maybe the node?
Is there a node-redish best practice for counting messages?
Thank you,
[{"id":"85923c47.f410a","type":"ui_text","z":"ae6391de.2859e","group":"f42bf895.3ba998","order":5,"width":0,"height":0,"name":"Error","label":"Errors:","format":"{{msg.count}}","layout":"row-spread","x":890,"y":280,"wires":[]},{"id":"5689035d.d0cc8c","type":"counter","z":"ae6391de.2859e","name":"TotalError","init":"0","step":"1","lower":"0","upper":"9999999","mode":"increment","outputs":"1","x":700,"y":280,"wires":[["85923c47.f410a"]]},{"id":"1dbe4955.f43227","type":"switch","z":"ae6391de.2859e","name":"NullTemp","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"null","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":500,"y":280,"wires":[["5689035d.d0cc8c"]]},{"id":"95536c53.0368f","type":"string","z":"ae6391de.2859e","name":"Temperature","methods":[{"name":"between","params":[{"type":"str","value":"Temperature\":"},{"type":"str","value":",\"Humidity"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":310,"y":160,"wires":[["ae95209c.e2466","1dbe4955.f43227"]]},{"id":"e450e73e.e84a28","type":"mqtt in","z":"ae6391de.2859e","name":"Sensors","topic":"Meteo/STATUS8","qos":"2","datatype":"utf8","broker":"a36e2f8a.1c6a6","x":100,"y":40,"wires":[["95536c53.0368f","bc8bf14c.cb43b","88cefe9d.3c3b3"]]},{"id":"f42bf895.3ba998","type":"ui_group","name":"Default","tab":"fcbe61ec.286c6","order":1,"disp":false,"width":"6","collapse":false},{"id":"a36e2f8a.1c6a6","type":"mqtt-broker","name":"","broker":"192.168.101.3","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"3","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"fcbe61ec.286c6","type":"ui_tab","name":"Info","icon":"dashboard","disabled":false,"hidden":false}]