"timeout: [object Object]" error in Node-red

I’m getting a “timeout: [object Object]” error with in Node-red and wondering why this is. The payload is cumulative and instant power usage going to two emoncms uploads

Another issue is Bar Graph in emoncms didn’t update today I don’t know why - I don’t think I’ve done anything to change things. I can see the cumulative data in ‘Input’ and ‘Feeds’ I guess both issues could be related…

Dave.

Hi Dave - we need more information.

  • Are you running an emonPi, an emonBase, a homemade/homebrew device, or something else?
  • what node in Node-RED is sending this error?
     

I’m not sure I can help here… Have you tried rebooting your device?

Hi Dave, are you using the recent node-red node? I did add in a timeout feature but had not been able to really test it. It is designed such that if the http get does not respond, it ‘times out’.

Is it both nodes doing the same?

PR has not gone through, so I think you pulled it off my development repo.

Hi Dave, checked the code;

I return the msg and that is why you are getting the [object Object].

The timeout is 1000 which I must have picked up from somewhere and assumed (:frowning:) was seconds. This is actually milliseconds which (now) is obviously too short. I didn’t want it sitting there forever but did not think this through properly.

Try upping this value. I was thinking along the lines of 60 seconds

Hi Brian,

Yes both nodes at the same time, I’ll update 88-emoncms.js as you suggested on line 141 to 60000.

UPDATE : That appeared to fix the error problem - thanks.

1 Like

No emonPi, running Node-red on a Pi and uploading to emoncms the data comes from a esp32 collecting meter flashes and outputting cumulative and instant watts via mqtt to the pi

The nodes and flow are thus

[{"id":"90aa1dfd.ea093","type":"function","z":"dd71cd75.28d1","name":"parser two temps","func":" var msg1 = { payload: msg.payload[0].temp };\n var msg2 = { payload: msg.payload[1].temp };\n //var msg3 = { payload: msg.payload[2].temp };\n \n \n var msg3 = msg2 / msg1;\n //var msg3 = {payload: msg.payload[1].temp / msg.payload[0].temp };\n return [msg1,msg2,msg3];","outputs":"3","noerr":0,"x":182.5,"y":242,"wires":[["96cccef8.17de9"],[],[]]},{"id":"96cccef8.17de9","type":"smooth","z":"dd71cd75.28d1","name":"","action":"mean","count":"30","round":"3","x":114,"y":43,"wires":[["a66330c1.e0e22"]]},{"id":"a66330c1.e0e22","type":"delay","z":"dd71cd75.28d1","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"2","nbRateUnits":"30","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":280,"y":92,"wires":[["c8dca72a.096798","4fdbeea4.cf6cc"]]},{"id":"c8dca72a.096798","type":"emoncms","z":"dd71cd75.28d1","name":"Emoncms Push 7","emonServer":"914138e7.e0c9c","nodegroup":"7","datatype":"legacy","x":638,"y":58.75,"wires":[]},{"id":"4fdbeea4.cf6cc","type":"emoncms","z":"dd71cd75.28d1","name":"Emoncms Push 4","emonServer":"914138e7.e0c9c","nodegroup":"4","datatype":"legacy","x":638.25,"y":106.75,"wires":[]},{"id":"ac79f2b4.6f064","type":"mqtt in","z":"dd71cd75.28d1","name":"KwH","topic":"utilities/power/kwh","qos":"1","broker":"d3bddccc.2a918","x":75,"y":339,"wires":[["c3a2ffb9.f69fd"]]},{"id":"d03a34de.1f8ca8","type":"mqtt in","z":"dd71cd75.28d1","name":"wat","topic":"utilities/power/wat","qos":"1","broker":"d3bddccc.2a918","x":74.89582824707031,"y":386.8888854980469,"wires":[["994073ad.d19c6"]]},{"id":"c3a2ffb9.f69fd","type":"emoncms","z":"dd71cd75.28d1","name":"Emoncms Push kwh","emonServer":"914138e7.e0c9c","nodegroup":"kwh","datatype":"legacy","x":753.9999847412109,"y":193,"wires":[]},{"id":"994073ad.d19c6","type":"emoncms","z":"dd71cd75.28d1","name":"Emoncms Push power","emonServer":"914138e7.e0c9c","nodegroup":"power","datatype":"legacy","x":754.9999847412109,"y":234,"wires":[]},{"id":"914138e7.e0c9c","type":"emoncms-server","z":"","server":"https://emoncms.org","name":""},{"id":"d3bddccc.2a918","type":"mqtt-broker","z":"","broker":"192.168.1.40","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

node-red-node-emoncms version 0.1.0
Node-red version 0.18.4

The bargraph updated Saturday and today but missed Sunday, but today seems oddly high and not updating

Dave.

Ok, I’ll update the code for the node although it is good to know the timeout feature does work. Thanks.

The node has been updated to version 0.2.1