igdr / node-red-contrib-xiaomi-smart-devices

8 stars 4 forks source link

NodeRED is stopped with error "Error: bind EADDRINUSE 0.0.0.0:9898" #30

Closed quyetvk closed 5 years ago

quyetvk commented 5 years ago

Hi,

I used your node but I have got error "Error: bind EADDRINUSE 0.0.0.0:9898" and NodeRED is stopped unexpectedly. I found that when nodeRED is started, it listens in port 9898 so this error occurs. Do you have any suggestion?

Thank you!

igdr commented 5 years ago

Hi, do you have something else like openhab or home assistance installed with xiaomi bindings? It may use 0.0.0.0:9898

quyetvk commented 5 years ago

Hi, do you have something else like openhab or home assistance installed with xiaomi bindings? It may use 0.0.0.0:9898

Thank you @igdr for your reply. I just found that some other nodes in my flow are using it. Now, the above problem disappeared but I had new issue. It seems the node cannot connect to Xiaomi Gateway. Although I opened enable LAN functions but ports 9898 (even 4321) is in close at the Gateway ( I used "nmap" command).

I found a solution that uses UART to open port but have not yet tried (https://community.openhab.org/t/solved-openhab2-xiaomi-mi-gateway-does-not-respond/52963/114).

If you have more simply idea, please let me know. Again, thank you very much!

igdr commented 5 years ago

What firmware version do you use in the gateway?

Here is mine latest one: image

quyetvk commented 5 years ago

What firmware version do you use in the gateway? Here is mine latest one:

I have same version.

Someone said that this issue might occur in some devices that MAC address prefix is not: mac 1 28:6c:07 mac 2 34:CE:00 mac 3 28:6C:07 My MAC is 7C:49:EB.

quyetvk commented 5 years ago

Hi,

I followed https://community.openhab.org/t/solved-openhab2-xiaomi-mi-gateway-does-not-respond/52963/114 then issue is resolved.

As conclusion, it is due to firmware issue. I close the issue.