jangxx / node-magichome

An incomplete implementation of the functionality of the "Magic Home" app. Partially a port of https://github.com/Danielhiversen/flux_led to Node.js
ISC License
124 stars 26 forks source link

Failed to repair #12

Closed seegersnl closed 5 years ago

seegersnl commented 5 years ago

After i reboot homey or my router, al my devices are unreachable. The magic home app can find the device, maybe because a new ip adres or something. Can you lock the device on a mac adress?

jangxx commented 5 years ago

No, but you can use the unique 12 character id (which might very well be MAC addresses, idk) each controller has. Simply call Discovery.scan() to find all devices in your network. You'll get IP addresses and device ids for each of them, so you can simply store the ids and then match the addresses to them. Be warned however, that the controllers tend to not reply to the discovery on the first or even the second try. This is an issue internal to the controllers however, so you have to work around it yourself.

jghaanstra commented 5 years ago

This should have been posted in the Magic Home Homey app repo which uses this library. I'll add some sort of support for discovery for devices with changed IP addresses due to DHCP. This can be closed.

jangxx commented 5 years ago

Okay, thanks for the heads up.