maxinminax / node-mihome

Control Mi Home devices, such as Mi Robot Vacuums, Mi Air Purifiers, Mi Smart Home Gateway (Aqara) and more
MIT License
125 stars 34 forks source link

Node-RED crashes right after node-mihome install #57

Open Tazintosh opened 2 months ago

Tazintosh commented 2 months ago

Hi,

I've got node-mihome installed via node-red-contrib-miio-localdevices and right after the palette install, Node-RED crashed. Here's the last log:

[error] Error: getsockname EBADF
    at Socket.address (node:dgram:777:11)
    at Socket.<anonymous> (/Users/tazministrator/.node-red/node_modules/node-mihome/lib/protocol-miio.js:34:36)
    at Socket.emit (node:events:531:35)
    at startListening (node:dgram:184:10)
    at node:dgram:372:7
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Line 34 of protocol-miio.js is const address = this._socket.address();

I'm usually running Node-RED without issues with this config:

Node-RED version: v4.0.2
Node.js  version: v20.13.1
Darwin 23.4.0 arm64 LE

Any idea? Thanks a lot in advance, kind regards.

kspgithub commented 2 months ago

Hi! Did you find any solution? Faced a similar problem when adding yeelink.light.colorc

Previously added viomi.aircondition.y116 and had no problems, although both have miot-local support.

https://home.miot-spec.com/s/yeelink.light.colorc https://home.miot-spec.com/s/viomi.aircondition.y116

Tazintosh commented 2 months ago

Nothing new sorry.

smarthomenow commented 1 month ago

Same problem. Current solution is to use node-red version 3.0.2. Newer versions crash with EBADF error