windkh / node-red-contrib-shelly

Shelly control nodes for node red.
MIT License
33 stars 21 forks source link

Shelly HT ERROR: connect EHOSTUNREACH after update #152

Closed ht38f closed 4 months ago

ht38f commented 6 months ago

ShellyHT.json

Screenshot 2024-04-01 213130

Shelly HT ERROR: connect EHOSTUNREACH after update. see attached photo and flow

ht38f commented 6 months ago

This Shelly HT https://www.shelly.com/en/products/shop/shelly-plus-h-and-t

ht38f commented 5 months ago

It is still the same issue with 10.21.0

windkh commented 5 months ago

@ht38f I tested your flow and it works here... can you make sure that the shelly's IP is reachable from where you run node-red?

ht38f commented 5 months ago

Shelly should be reachable. I did a factory reset, gave it a new static ip based on MAC address in the router. The sensor is mostly disconnected but shows up a few seconds in the router and disappears again. I assume this is to preserve battery

windkh commented 5 months ago

So why do you get an error if it works here? Hm strange

windkh commented 5 months ago

Did you press the inject node while the shelly is sleeping?

ht38f commented 5 months ago

I tried. Same issue. I now watched the app and waited for it to update.23.19:25 it updated the Shelly app. IMG_0228 IMG_0227

windkh commented 5 months ago

@ht38f the AxiosError occurs when you inject while the shelly is sleeping. That is ok, as the node can not talk to the shelly in this state. Devices that sleep should be run in "callback" mode. Nevertheless the connect EHOSTUNREACH is strange. Is something logged to the node-red console?

ht38f commented 5 months ago

Shelly firmware is 20240223-141926/1.2.2-g7c39781

ht38f commented 5 months ago

I am running node red on a Victron Cerbo and have no access to the files :(

windkh commented 5 months ago

Shelly firmware is 20240223-141926/1.2.2-g7c39781

0240223-141926/1.2.2-g7c39781 is installed on mine

ht38f commented 5 months ago

So it’s the same. I just received a debug showing data from the sensor! IMG_0229

windkh commented 5 months ago

Did you set a password?

ht38f commented 5 months ago

No password

windkh commented 5 months ago

@ht38f what node-red version and what nodejs version do you use?

ht38f commented 5 months ago

3.1.5

windkh commented 5 months ago

do you use different IP Address ranges in your home? what is the IP of the victron device?

ht38f commented 5 months ago

Think js is v18

ht38f commented 5 months ago

Victron is 192.168.1.138

ht38f commented 5 months ago

Shelly sensor is also in cloud. That’s how I see it updates.

windkh commented 5 months ago

what happens if you enter the following into the browser http://192.168.1.207/rpc/Shelly.GetStatus

ht38f commented 5 months ago

I need to check. I am not at the install but working remotely from victron VRM. I tried to connect to 192.168.1.207 earlier today. I did not manage to connect. I believe the device turns on and connects to the router and then goes back to sleep so it is not more visible

windkh commented 5 months ago

will go to bed now... maybe we should do a teams meeting where you can show it to me.

ht38f commented 5 months ago

I have been watching the flow and suddenly it says connected and is green. A few seconds after it goes back to ehostunreach

ht38f commented 5 months ago

Have a good night! Thanks for the help!

windkh commented 5 months ago

@ht38f hi... sorry I forgot to ask if the error is still there or not?

ht38f commented 5 months ago

Hi. The error is still there. When I try to get the status http://192.168.1.207/rpc/Shelly.GetStatus I get this: The server at 192.168.1.207 is taking too long to respond.

This makes sense as the H&T is only connected to the router a few seconds before it goes back to sleep. All other Shelly devices work normal.

windkh commented 5 months ago

The shellies that normally sleep like HT or smoke or door/window should not be polled. Instead you should use callback mode.