apearson / insteon-plm

Insteon PLM is a TypeScript/JavaScript library for the Insteon PowerLinc Modem family of devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`linkDevice` issue

PaulWieland opened this issue · comments

The first issue is that if linkDevice doesn't seem to work with battery operated devices. I put the battery device in awake mode (press and hold the set button so the LED flashes), then tried to run await linkDevice. The modem LED begins flashing, but the program never progresses passed this point.

The second thing I noticed if an invalid address, or a device is otherwise unresponsive is given to the linkDevice command, the modem becomes stuck in this state and is unresponsive to any other commands. After a while the modem will give a long buzz, and then it seems to work again.

Attempting to link an invalid device address on my other home controller results in a message that says "Unable to determine insteon engine", so possibly we need to send a query message first before putting the modem into link mode?

I agree, we need to send a engine query first to determine how to start linking. This will also stop invalid addresses from putting the modem into a frozen state.

The modem's long buzz happens after 4 or 5 mins and is the modem's linking state timing out.

Third thing that is closely related - when unlinking a device, it should ping/query the device first to unlink it, but even if there is no response from the device the modem to remove it's own links.

Right now when I try and unlink a battery powered device which isn't awake, it fails with a timeout. If the device were physically broken or missing there would be no way to remove it from the PLM as it stands.