PDA

View Full Version : Insteon serial port rename?



rickerdo
May 20th, 2015, 05:24 PM
I spent about an hour or so renaming all of my Insteon devices and placing them into locations. Since that time, I have setup udev rules to retain USB naming conventions across reboots. Now I need to change the serial port from 'ttyUSB1' to 'serialgear1'. I don't see any provisions in the device manager to make such a change and since it looks like the setting is stored in .local/share/Promixis/Girder\ 6/girder.db (a binary file), I can't safely hack my change either.

So, is there a quick way to change a serial port for the Insteon plugin after it's been configured without having to recreate everything?

FWIW - If all of the Insteon plugin settings were stored in a JSON formatted file like other plugins do, this would be a no brainer. ;)

Ron
May 20th, 2015, 06:01 PM
Sorry about that. The file, you'll be happy to know, is a sqlite database. Just get sqlitebrowser: http://sqlitebrowser.org/ and edit away. You'll find JSON inside the database :D

rickerdo
May 20th, 2015, 06:02 PM
I'm sure this is a non supported method,but using the sqlite3 CLI, I was able to update the settings. A G6 native way of making such a change would still be nice though.

Steps...


apt-get install sqlite3
/etc/init.d/girder stop
sqlite3 /root/.local/share/Promixis/Girder\ 6/girder.db
sqlite> .headers on
sqlite> .mode column
sqlite> select * from components;
id internal_id master_component_id name config enabled
---------- ----------- ------------------- ---------------------- ------------------------ ----------
8 ttyUSB1 70 Insteon PLM on ttyUSB1 AAAAAAAAAQQAAAAAAAAAAA== 1
9 104 New GlobalCache compon 1
10 130 New IR Devices Plugin 1

Note the id of the 'Insteon PLM on ...' line. For me, this was id: 8


sqlite> update components set internal_id = 'serialgear1', name = 'Insteon PLM on serialgear1' where id = 8;
sqlite> select * from components;
id internal_id master_component_id name config enabled
---------- ----------- ------------------- -------------------------- ------------------------ ----------
8 serialgear1 70 Insteon PLM on serialgear1 AAAAAAAAAQQAAAAAAAAAAA== 1
9 104 New GlobalCache component 1
10 130 New IR Devices Plugin comp 1
sqlite> .exit
/etc/init.d/girder start

rickerdo
May 20th, 2015, 06:03 PM
Looks like you beat me to the reply button. ;)