Basic Usage - pfrommerd/insteon-terminal GitHub Wiki
Running
To run the terminal, type:
ant run
or run
ant jar
./insteon-terminal [-nw]
Note: you will have to run ant jar for every time you pull/update the terminal
Basic usage
then, once the terminal has started up, use either
connectToHub("hub-address", 25105, 1000, "MyHubLogin", "MyHubPassword")
to connect to an insteon hub (only tested for "2014" hub), or use
connectToSerial("/dev/insteon")
to use a serial port
for old hubs, use
connectToLegacyHub("hub-address", 9761)
Using init.py
init.py is a custom initialization file that is run/imported on startup. Here you can define custom functions, devices, and automatically run stuff on startup.
Automatically connecting on startup
To automatically connect on startup, see the comments in init.py.example
Defining devices
To define devices, create a new device object in init.py. Here are some example device definitions
# Define your modem so you can dump the database and such
modem = modem2413U("test_modem", "23.9b.65")
kp = keypad2487S("office_keypad", "30.0d.9f")
th = thermostat2441TH("kitchen_thermostat", "32.f7.2c")
closetLight = switch2477S("closetLight", "25.65.d6")
dimmer = dimmer2477D("dining_room_dinner", "20.ab.26")
For a list of supported devices, please see Supported Devices
Reloading python files (including init.py)
If you want to apply changes you've made to python files (init.py or any files in the python directory) without restarting the terminal, simply type
reload()