Home Assistant Entity node sometimes errors

I'm using Node Red for to take a RESTful POST output and parse it out to various "edit entity nodes". I thought everything was working fine, but recently notices some "State must be defined" errors. They come and go as the inject post a REST query. Not sure why.

this a a small sample of the rest calls I'm making to bring the devices REST points into Node RED.

[{"id":"2d195db4.d2d9f2","type":"debug","z":"c168eaba.8d56f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":970,"y":3860,"wires":[]},{"id":"45d2ed6f.e15574","type":"ha-entity","z":"c168eaba.8d56f8","name":"Patio_Swamp_East_Fan","server":"19a64a55.0dbb76","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Swamp_Patio_East_Fan"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:fan"},{"property":"unit_of_measurement","value":"%"}],"state":"payload[2].value","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"block","x":1010,"y":3820,"wires":[[]]},{"id":"97df9d4e.8eca2","type":"ha-entity","z":"c168eaba.8d56f8","name":"Patio_Swamp_West_Fan","server":"19a64a55.0dbb76","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Swamp_Patio_West_Fan"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:fan"},{"property":"unit_of_measurement","value":"%"}],"state":"payload[3].value","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"block","x":1010,"y":3780,"wires":[[]]},{"id":"34428210.51debe","type":"ha-entity","z":"c168eaba.8d56f8","name":"Garage_Swamp_North_Fan","server":"19a64a55.0dbb76","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Swamp_Garage_North_Fan"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:fan"},{"property":"unit_of_measurement","value":"%"}],"state":"payload[0].value","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"block","x":1020,"y":3740,"wires":[[]]},{"id":"b2cb6d44.ed9bc","type":"ha-entity","z":"c168eaba.8d56f8","name":"Garage_Swamp_South_Fan","server":"19a64a55.0dbb76","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"Swamp_Garage_South_Fan"},{"property":"device_class","value":""},{"property":"icon","value":"mdi:fan"},{"property":"unit_of_measurement","value":"%"}],"state":"payload[1].value","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"block","x":1020,"y":3700,"wires":[[]]},{"id":"b4dfc61.d6eeb38","type":"www-request","z":"c168eaba.8d56f8","name":"ECY Rest AO","method":"use","ret":"obj","url":"http://192.168.50.27/api/rest/v1/protocols/bacnet/local/objects/read-property-multiple","follow-redirects":false,"persistent-http":true,"tls":"","x":440,"y":3740,"wires":[["2d195db4.d2d9f2","b2cb6d44.ed9bc","34428210.51debe","97df9d4e.8eca2","45d2ed6f.e15574"]]},{"id":"2f969e60.c88342","type":"change","z":"c168eaba.8d56f8","name":"switch","rules":[{"t":"set","p":"method","pt":"msg","to":"post","tot":"str"},{"t":"set","p":"rejectUnauthorized","pt":"msg","to":"rejectUnauthorized","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":3740,"wires":[["b4dfc61.d6eeb38"]]},{"id":"14aa61f6.0ff2fe","type":"inject","z":"c168eaba.8d56f8","name":"","topic":"","payload":"{\"encode\":\"text\",\"propertyReferences\":[{\"type\":\"analogOutput\",\"instance\":-1,\"property\":\"presentValue\",\"arrayIndex\":-1}]}","payloadType":"json","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":3740,"wires":[["2f969e60.c88342"]]},{"id":"19a64a55.0dbb76","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

We need a little more info about your environment

Is this NR that is integrated with HA through HACS or is it a standalone version ?

What version of HACS and HASSio and NR are you running ?

Craig

Thanks Craig,
I think the REST device was simply taking too long to respond for NodeRed's liking. I staggered some of the REST calls and haven't noticed the error since.

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