forked from pfrommerd/insteon-terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.py.example
53 lines (41 loc) · 1.69 KB
/
init.py.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from console_commands import *
from keypad2487S import *
from thermostat2441TH import *
from modem2413U import *
from switch2477S import *
from dimmer2477D import *
from ledBulb2672 import *
#
# if you are using a hub, replace login and password below with your
# hub login and password. Note: this is not the email address and password to
# the insteon web site, but the login/password on the back of the hub
#
def connectToMyHub():
"""connects to my insteon hub modem at pre-defined address"""
connectToHub("insteonhub", 25105, 1000, "MyHubLogin", "MyHubPassword")
#If you are using a legacy hub (pre-2014 hub)
def connectToMyLegacyHub():
"""connects to my insteon hub modem at pre-defined address"""
connectToLegacyHub("insteonhub", 9761) # syntax is address, port (generally 9761)
def connectToMySerial():
"""connects to my modem on pre-defined serial port"""
connectToSerial("/dev/insteon")
#
# uncomment correct line, depending on if you have a PLM modem or a hub (or a legacy hub)
# to automatically connect on startup. You will also have to change the info in the corresponding connectToMy...() function
#
#connectToMySerial()
#connectToMyHub()
#connectToMyLegacyHub()
#
# Now define the devices you want to work with. For a list of
# available devices, look at the source code in the "python" directory
#
#
# Example device definitions
# kp = Keypad2487S("office_keypad", "30.0d.9f")
# th = Thermostat2441TH("kitchen_thermostat", "32.f7.2c")
# modem = Modem2413U("test_modem", "23.9b.65")
# closetLight = Switch2477S("closetLight", "25.65.d6")
# dimmer = Dimmer2477D("dining_room_dinner", "20.ab.26")
# ledBulb = LEDBulb2672("ledBulb", "21.EB.DD");