-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add enter link mode command for all devices #7
Comments
Oh this would be nice as I have two micro sensors that I can't get to without remove light fixture! |
Another option if 0x09 doesn't work is to send 0x25 0x01 which looks like it simulates pressing the set button once. |
Insteon dev guide is wrong - it shows 0x09 as as a standard message for doing this but that doesn't work for any device that I have. Found a forum post that says after 2012, it requires an extended command. This does work:
which is the same as pushing the set button on the device. Found another forum post that says you can link a device not seen before by doing this:
This should link the new device to the modem. Then the device.pair() command can be sent to add the device->modem pairings. This could lead to a new command line command for adding a new device to the system I think would be:
|
FYI - I've been working on getting this to work. This is pretty crucial to automatically pairing up devices. I've added a "linking" command to the command line tool (and mqtt cmd dictionary) which trips the devices set button for linking. It works fine, but sometimes the links don't actually work. I was trying to get a new device set up by doing: 1) start modem linking (controller), 2) start device linking (responder), 3) call device pair command (to set the device->modem link and any other links for multi-button devices). That fails because the pair command gets a NAK. The link is there, but the device won't respond to the commands from the modem. It turns out that the 3 byte data fields are important for some devices. I used 0,0,0 for the smoke bridge and it works perfectly. But, a dimmer fails completely. I've been hunting through the misterhouse code and found several explanations (though reading perl is giving me a headache).
I don't have a hard plan for these yet, here are the values from the devices I have (and have paired manually to the modem) and they seem to follow the issue 327 comment above - at least on the modem.
|
the set button for 3 sec and allows pairing of new devices. Fixes #7. Also updated the db modem delete commands so individual entries can be removed and added a 3 byte data input and better defaults for those values when creating device db links.
This works now. There is new command 'linking' which works for the modem and devices to put them in linking mode. The message format is:
I factory reset a lamp module and did this from the command line. This is basically the software procedure to add a new device without ever touch any of the devices.
I don't know how to automate this step at this point but I'll think about that for another enhancement. I tried just linking the modem->device and then running db-add to make the reverse link by hand but that fails for unknown reasons. I also updated the db-del-ctrl- and db-del-resp so that individual links on the modem can be removed. So now the devices and modem have the same api for database management. I added a link_data() method to return the "correct" link data for each device to use when building links. In theory this will avoid issues with links that are there but don't work. I haven't done extensive testing with this yet though. I also updated all the mqtt inputs so that "nice" names from the config file can be used for all inputs (including the mqtt topic). "modem" will work to reference the modem. |
One more note for future doc regarding multi group linking. D3 on the responder must be the group on the local device. So the if I link a remote button 6 to a keypadlinc button 3, the following is created:
So link group is the controller group number (and the group number in the broadcast messages). D3 on the responder is the local group number to map that message to. So a broadcast group 6 gets mapped to local button 3 on the keypadlinc. |
The Data1-3 fields on modem controller links that are paired manually with the modem are generally the DevCat, SubCat, and Firmware bytes of the responding device. But my experience is that having these wrong doesn't seem to cause any issues. |
Standard command with cmd1=0x09, cmd2=GROUP will put device in all-link mode (same as touching set button). For some devices (leak sensor at least), 0x08 will cancel the mode.
The text was updated successfully, but these errors were encountered: