node-red-contrib-shelly icon indicating copy to clipboard operation
node-red-contrib-shelly copied to clipboard

Error in executeCommand1

Open I-am-a-node opened this issue 1 year ago • 24 comments

Hi, I don't know if this error message has a connection to any of the latest versions released. I have never seen this before and suddenly it pops up after the upgrading to v 10.28.1.

Versions: I've seen there has been a few updates lately so might have missed one and cant say exactly the exact version that might have brought this. At the same time I am looking at others reasons what that might be.

The error message is random in blocks, meaning I have 6 nodes in a flow on one computer. All 6 produces the error message at the same time. Also have 1 test flow with 2 nodes installed in a testing environment on another linux computer, same thing there. Could be random or when deploying after another change. However have been using "Modified Nodes" .

Question. Do I have to open all previously added nodes and close with DONE and DEPLOY to catch a new setting? As if I made a new change to a setting? Meaning the settings has to be kind of updated with something new that you've added to the node?

I'll keep an eye on this and see if I can see a pattern.

Edit/update 23rd July 2024. There seem to be plenty more of those error messages. Listing them below. Never seen these before. All from the different kinds of units. EM, Plug, Plus 1 PM, 1PM Mini, Dimmer 2.

Edit/update 24th July 2024. Did a check on my network thinking there was a connectivity issue. However, nothing has changed with the network lately. Did a restart to see if there as a change in behaviour and how they stay connected. Created a setup up with testing during the night but could not find any fault. Also no firmware has been changed on any of they Shellys. The only thing that has changed is the update of the Shelly nodes in Node-Red.

I'll have to create my own setup with config using the a flow with api to avoid using the Shelly node so and hope I wont get these errors as they are causing issues to my system.

Error message:

"Error in executeCommand1: /status --> AxiosError: timeout of 5012ms exceeded"

"Error in executeCommand2: /rpc/Shelly.GetStatus --> AxiosError: timeout of 5022ms exceeded"

I-am-a-node avatar Jul 23 '24 05:07 I-am-a-node

same for me. Additionally i get "Error: read ECONNRESET" for some gen2 device nodes e.g. after sending an on or off command to the node

reini12345 avatar Jul 30 '24 09:07 reini12345

@reini12345 can you test one of the examples if it works then?

windkh avatar Jul 30 '24 10:07 windkh

i use this code in a function node to switch a shelly1plus off:

msg.payload = {
    method: "Switch.Set",
    parameters: {
        id: 0,
        on: false,
    }
};
return msg;

the code itself is working fine and the shelly is switching off. But i get the error message and no output of the shelly node

reini12345 avatar Jul 30 '24 10:07 reini12345

I am currently not at home. Will check it out when I am back.

windkh avatar Jul 30 '24 10:07 windkh

@reini12345 I will untick both "status output" options to get rid of all the error messages (hoping this works). Not ideal but don't think I have a choice if I don't want to get flooded with errors. I'm pretty sure I've unticked them before and when updated the pervious setting has gone back to default.

If you have the time. Please let me know if it works when sending your commands? I will run with this for about 24 hours to see if it helps.

UPDATE 17th Aug 2024 Unticking the "status" wasn't a solution. Still getting flooded with error messages.

Untick

I-am-a-node avatar Jul 30 '24 14:07 I-am-a-node

@I-am-a-node deactivate these options is not a valid option for me, because i need it to save the status in an influxdb and sending the status with pushover

image

reini12345 avatar Jul 31 '24 08:07 reini12345

@reini12345 Thanks for your reply. Yea, kind if figured that you're using the status in your function. Think it might be the users who does need it for propose that get annoyed by these errors.

Curious if this is down to a programming structure, a change in the Axios libraries, or if it's only down to poor connection within the home network. If that is the case it would be good to have the option to set/change the timeout. Now I am trying to figure out if this issue has any other implication on my functions. To see how I can capture an error and implement this into the function to re-do a manual action to repair, ensure the event/action gets the data/push the action when an error occurs.

I-am-a-node avatar Jul 31 '24 09:07 I-am-a-node

@windkh let me know if you need any additional information from us regarding experiences from using the node. Or if you want help with testing. My programming skills are limited so... hope I can help with providing info and/or testing.

I-am-a-node avatar Jul 31 '24 14:07 I-am-a-node

A sample flow would be useful so that I can reproduce it. Will fix it after my vacation

windkh avatar Jul 31 '24 17:07 windkh

@windkh no problem:

[{"id":"d7b3ff9c5ae8cffd","type":"function","z":"7947c8eb71b89e19","g":"de33c669c2e86fc3","name":"","func":"msg.payload = msg.payload.switch0.output;\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":4600,"wires":[["1718314b51346f2d","87695cbacdf4750e"]]},{"id":"0a4878cb293c140b","type":"debug","z":"7947c8eb71b89e19","g":"de33c669c2e86fc3","name":"debug 150","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":430,"y":4640,"wires":[]},{"id":"2fb57078ce6ffbfe","type":"function","z":"7947c8eb71b89e19","g":"de33c669c2e86fc3","name":"UG.Keller.Aussen.Lampe off","func":"msg.payload = {\n method: \"Switch.Set\",\n parameters: {\n id: 0,\n on: false,\n }\n};\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":4540,"wires":[["a76ba26b08a34d69"]]},{"id":"0d502437e6d4a08e","type":"inject","z":"7947c8eb71b89e19","g":"de33c669c2e86fc3","name":"UG.Keller.Aussen.Lampe.AutoAus.Uhrzeit","props":[{"p":"payload"}],"repeat":"","crontab":"00 02 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":4540,"wires":[["2fb57078ce6ffbfe"]]},{"id":"a76ba26b08a34d69","type":"shelly-gen2","z":"7947c8eb71b89e19","g":"de33c669c2e86fc3","hostname":"192.168.178.128","description":"UG.Keller.Aussen.Lampe ","mode":"polling","verbose":false,"server":"","outputmode":"event","uploadretryinterval":5000,"pollinginterval":"3600000","pollstatus":true,"getstatusoncommand":true,"devicetype":"Relay","devicetypemustmatchexactly":false,"outputs":1,"x":190,"y":4600,"wires":[["d7b3ff9c5ae8cffd","0a4878cb293c140b"]]}]

reini12345 avatar Aug 01 '24 06:08 reini12345

same for me. Additionally i get "Error: read ECONNRESET" for some gen2 device nodes e.g. after sending an on or off command to the node

this is fixed in 10.28.2 (see #172)

windkh avatar Aug 07 '24 19:08 windkh

@reini12345 Did this get solved for you? I still get get flooded with the error messages.

I-am-a-node avatar Aug 17 '24 15:08 I-am-a-node

@windkh Hi, I wonder if mange to find anything on the matter of the "AxiosError: timeout" error messages?

Would like to continue using your node. However I still get flooded and am drowning in these error messages. Have tried different ways of not getting them. Stopped using the "pull" function + unticked the status messages and tried to request data by an inject node. However that doesn't help.

I-am-a-node avatar Aug 17 '24 15:08 I-am-a-node

I did some changes, but I still need some testing... did nothing change with the last release?

windkh avatar Aug 17 '24 15:08 windkh

@windkh Oki. Thank you for getting back on this. Appreciate that you're taking your time looking into this. Let me know if you need any help.

I-am-a-node avatar Aug 17 '24 15:08 I-am-a-node

@reini12345 Did this get solved for you? I still get get flooded with the error messages.

Yes, this error has been fixed. But I still have Axios Errors with restarting NodeRed and EHOSTUNREACH Errors, although the devices can be reached normally. image

reini12345 avatar Aug 19 '24 13:08 reini12345

@reini12345 Hi, as it is raining today I found some time for fixing issues. I assume that the error is still there? How can I reproduce it? Any ideas?

windkh avatar Sep 08 '24 16:09 windkh

I haven't seen the error recently. If I see it again then I'll try to log it

reini12345 avatar Sep 14 '24 07:09 reini12345

@I-am-a-node as the errors disappeared we should focus on your specific problems: can you send me your flow so that I can reproduce it?

windkh avatar Sep 15 '24 16:09 windkh

@windkh got this error some minutes ago which led to a restart of Node-RED:

16 Sep 09:21:43 - [red] Uncaught Exception: 16 Sep 09:21:43 - [error] AxiosError: timeout of 5022ms exceeded at RedirectableRequest.handleRequestTimeout (/data/node_modules/node-red-contrib-shelly/node_modules/axios/lib/adapters/http.js:647:16) at RedirectableRequest.emit (node:events:519:28) at Timeout. (/data/node_modules/follow-redirects/index.js:210:12) at listOnTimeout (node:internal/timers:581:17) at processTimers (node:internal/timers:519:7) at Axios.request (/data/node_modules/node-red-contrib-shelly/node_modules/axios/lib/core/Axios.js:45:41) 16 Sep 09:21:44 - [info] Welcome to Node-RED 16 Sep 09:21:44 - [info] Node-RED version: v4.0.2 16 Sep 09:21:44 - [info] Node.js version: v20.17.0 16 Sep 09:21:44 - [info] Linux 6.2.16-4-pve x64 LE 16 Sep 09:21:44 - [info] Loading palette nodes 16 Sep 09:21:46 - [info] node-red-contrib-ccu version: 3.4.2 16 Sep 09:21:46 - [info] Dashboard version 3.4.0 started at /ui 16 Sep 09:21:47 - [warn]

reini12345 avatar Sep 16 '24 07:09 reini12345

@reini12345 please upgrade to 11.0.1 and let me know if something changed.

windkh avatar Sep 16 '24 19:09 windkh

Please update to 11.3 and let me know if something improved

windkh avatar Sep 29 '24 18:09 windkh

5gDHCYfe1h

no change here. Gen1 and Gen2 devices are affected.

reini12345 avatar Sep 30 '24 12:09 reini12345

...same with 11.5.3

Subnum12 avatar Dec 08 '24 20:12 Subnum12

...same here with 11.5.7

tossa-fan avatar Apr 02 '25 08:04 tossa-fan

Is this still a problem?

windkh avatar Jun 27 '25 19:06 windkh

closed to no activity

windkh avatar Oct 05 '25 14:10 windkh