Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in executeCommand1 #168

Open
I-am-a-node opened this issue Jul 23, 2024 · 24 comments
Open

Error in executeCommand1 #168

I-am-a-node opened this issue Jul 23, 2024 · 24 comments

Comments

@I-am-a-node
Copy link

I-am-a-node commented Jul 23, 2024

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"

@reini12345
Copy link

reini12345 commented Jul 30, 2024

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

@windkh
Copy link
Owner

windkh commented Jul 30, 2024

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

@reini12345
Copy link

reini12345 commented Jul 30, 2024

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

@windkh
Copy link
Owner

windkh commented Jul 30, 2024

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

@I-am-a-node
Copy link
Author

I-am-a-node commented Jul 30, 2024

@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

@reini12345
Copy link

@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

@I-am-a-node
Copy link
Author

@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
Copy link
Author

@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.

@windkh
Copy link
Owner

windkh commented Jul 31, 2024

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

@reini12345
Copy link

@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"]]}]

@windkh
Copy link
Owner

windkh commented Aug 7, 2024

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)

@I-am-a-node
Copy link
Author

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

@I-am-a-node
Copy link
Author

@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.

@windkh
Copy link
Owner

windkh commented Aug 17, 2024

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

@I-am-a-node
Copy link
Author

I-am-a-node commented Aug 17, 2024

@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.

@reini12345
Copy link

reini12345 commented Aug 19, 2024

@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

@windkh
Copy link
Owner

windkh commented Sep 8, 2024

@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?

@reini12345
Copy link

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

@windkh
Copy link
Owner

windkh commented Sep 15, 2024

@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?

@reini12345
Copy link

reini12345 commented Sep 16, 2024

@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]

@windkh
Copy link
Owner

windkh commented Sep 16, 2024

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

@windkh
Copy link
Owner

windkh commented Sep 29, 2024

Please update to 11.3 and let me know if something improved

@reini12345
Copy link

5gDHCYfe1h

no change here. Gen1 and Gen2 devices are affected.

@Subnum12
Copy link
Contributor

Subnum12 commented Dec 8, 2024

...same with 11.5.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants