stason325 / node-red-contrib-miio-localdevices

Nodes for controlling MIIO devices via node-mihome lib. List of devices and commands to be extended.
GNU General Public License v3.0
17 stars 7 forks source link

Air Purifier Call to device Timeout #3

Closed drschnalli closed 2 years ago

drschnalli commented 2 years ago

Hey there, i just installed node red and also installed this very nice plugin!

I set up my Air Purifier 3H got the Token as described and also entered the ip (by the way what to enter for mi_id ??)

When i click deploy the Get Data Node says connection okay but when i try to send the power command via the command i see following information in the debug console:

Mihome Exception. IP: 192.168.178.2xx-> request to https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-mb3:2 failed, reason: getaddrinfo EBUSY miot-spec.org

and

Mihome Exception. IP: 192.168.178.2xx -> Call to device timed out

By the way i just found out when i use the Cloud Option... then it works fine.. but would be nice to get it working without cloud :(

stason325 commented 2 years ago

Hello there. It's nice you are using my nodes.

Concerning mi_id you can put there a random 3-digit number.

Concerning the error I need to say that I haven't faced it before. It looks like there are some problems with connection to miot-spec cloud without your credentials. Quick Googling told me that this could be an issue with Nodejs and DNS: https://github.com/nodejs/help/issues/2390 Maybe you need to check your firewall options ...whether there are some limitations in there.

By the way the whole idea of miot-devices (your Air Purifier 3H is miot) is that they are all cloud anyway. If you use "cloud auth" option you fetch properties from cloud with your own credentials (like in mihome app). If don't use it, you fetch properties from cloud with randomly generated credentials each time. This is how node-mihome, miio and python-miio libraries work.

drschnalli commented 2 years ago

A friendly guy from the symcon forum told me to just restart node-red again after doing changes... i dont know why ( i did it before) but now it works... i disabled the Cloud button and i also rescricted internet access for the air purifier -> AND IT WORKS <3 ... so its not an issue of your perfect node! Thank you and sorry for taking your time!

stason325 commented 2 years ago

A friendly guy from the symcon forum told me to just restart node-red again after doing changes... i dont know why ( i did it before) but now it works... i disabled the Cloud button and i also rescricted internet access for the air purifier -> AND IT WORKS <3 ... so its not an issue of your perfect node! Thank you and sorry for taking your time!

I'm glad that everything works for you :) Sometimes simple reboot could cure things.