Hello,
I have a sonoff th10 temperature and relay board flashed with tasmota (9.3.1). The one with the SI7021 sensor. I guess it's a firmware thing and or hardware problem, the measurements (on the tasmota web interface) someties show "null", but not that often.
The problem is; this gets transmitted over mqtt and node red, which shows something like this in a debug node hooked to the tasmota sensor node; "TypeError: Cannot read property 'hasOwnProperty' of null".
Now I'm past the point of investigating this on tasmota level like a hw or fw issue because i lack the knowledge.
Is there a fancy js fuction or node which would ignore this error and substitute the value with the oldest healthy value to pass it on until the tasmota resumes from its "seisure"?
Thanks in advance.
[{"id":"5bce5d10.c72dc4","type":"Tasmota Sensor","z":"ae6391de.2859e","broker":"a36e2f8a.1c6a6","device":"Meteo","name":"Meteo","outputs":1,"uidisabler":false,"fullTopic":"","cmndPrefix":"","statPrefix":"","telePrefix":"","rules":[],"x":290,"y":40,"wires":[["2ea6696e.d36116","c26b3d62.dda0b","59b65171.29118"]]},{"id":"47bd8f42.be086","type":"ui_gauge","z":"ae6391de.2859e","name":"TempGauge","group":"c4b3876e.5da4c8","order":1,"width":0,"height":0,"gtype":"donut","title":"Hőmérséklet","label":"°C","format":"{{value}}","min":"-25","max":"45","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1070,"y":100,"wires":[]},{"id":"61a606e0.6fa538","type":"ui_chart","z":"ae6391de.2859e","name":"TempGraph","group":"c4b3876e.5da4c8","order":1,"width":"0","height":"0","label":"","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"N/A","dot":false,"ymin":"-25","ymax":"45","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":1070,"y":160,"wires":[[]]},{"id":"485e6d35.c190e4","type":"smooth","z":"ae6391de.2859e","name":"AvgFltTemp","property":"payload","action":"mean","count":"30","round":"1","mult":"multi","reduce":true,"x":870,"y":100,"wires":[["61a606e0.6fa538","47bd8f42.be086"]]},{"id":"3e1da494.88b2fc","type":"inject","z":"ae6391de.2859e","name":"TRUE 3s","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"3","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":40,"wires":[["5bce5d10.c72dc4"]]},{"id":"2ea6696e.d36116","type":"function","z":"ae6391de.2859e","name":"HumFunc","func":"var MeteoHum = { payload: msg.payload.SI7021.Humidity };\nreturn MeteoHum;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":460,"y":40,"wires":[["d91adacf.9f41e8"]]},{"id":"1b6a81e7.1d8a7e","type":"rbe","z":"ae6391de.2859e","name":"ErrorFltTemp","func":"rbei","gap":"0%","start":"","inout":"in","septopics":true,"property":"payload","x":670,"y":100,"wires":[["485e6d35.c190e4"]]},{"id":"59b65171.29118","type":"debug","z":"ae6391de.2859e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload.SI7021.Temperature","targetType":"msg","statusVal":"payload","statusType":"auto","x":540,"y":160,"wires":[]},{"id":"c26b3d62.dda0b","type":"function","z":"ae6391de.2859e","name":"HumTemp","func":"var MeteoTemp = { payload: msg.payload.SI7021.Temperature };\nreturn MeteoTemp;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":470,"y":100,"wires":[["1b6a81e7.1d8a7e"]]},{"id":"2b281dc3.d1c6c2","type":"ui_text","z":"ae6391de.2859e","group":"c4b3876e.5da4c8","order":2,"width":0,"height":0,"name":"HumText","label":"Páratartalom:","format":"{{value}}%","layout":"row-center","x":1060,"y":40,"wires":[]},{"id":"166106fd.ac5099","type":"smooth","z":"ae6391de.2859e","name":"MaxFltHum","property":"payload","action":"mean","count":"30","round":"1","mult":"multi","reduce":true,"x":870,"y":40,"wires":[["2b281dc3.d1c6c2"]]},{"id":"d91adacf.9f41e8","type":"rbe","z":"ae6391de.2859e","name":"ErrorFltHum","func":"rbei","gap":"0%","start":"","inout":"in","septopics":true,"property":"payload","x":670,"y":40,"wires":[["166106fd.ac5099"]]},{"id":"a36e2f8a.1c6a6","type":"mqtt-broker","name":"","broker":"192.168.101.3","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"c4b3876e.5da4c8","type":"ui_group","name":"Default","tab":"58b1cb11.885b84","order":1,"disp":false,"width":"7","collapse":false},{"id":"58b1cb11.885b84","type":"ui_tab","name":"Hőmérséklet","icon":"dashboard","disabled":false,"hidden":false}]