forked from FreekingDean/insteon-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
executable file
·68 lines (51 loc) · 1.46 KB
/
run.py
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env python3
###########################################
#
# Requirements
#
# A file named 'credentials' needs to exist with the API key, username and
# password. See credentials.sample
#
import insteon
import configparser
config = configparser.ConfigParser()
config.read('credentials')
username = config['credentials']['user']
password = config['credentials']['pass']
apikey = config['credentials']['key']
i = insteon.Insteon(username, password, apikey)
#for o in i.devices:
# print(o.DeviceName)
# print(o.DeviceID)
#print(i.devices[15].DeviceName)
#i.devices[15].send_command('on')
#print(i.devices[15].DeviceName)
#print(i.devices[15].HouseID)
#print(i.scenes[3].SceneName)
#print(i.scenes[3].DeviceList)
#for o in i.scenes:
# print(o.SceneName)
# print(o.DeviceList)
#print(i.scenes[3].SceneName)
#i.scenes[3].SceneName='TESTING'
#print(i.scenes[3].SceneName)
#i.scenes[3].save
#i.scenes[3].reload_details
#print(i.scenes[3].SceneName)
#print(i.devices[15].DeviceName)
#i.devices[15].DeviceName='testdevice'
#print(i.devices[15].DeviceName)
#i.devices[15].save
#for o in i.rooms:
#print(i.rooms[1].RoomName)
#i.rooms[1].RoomName='testroomname2'
#print(i.rooms[1].RoomName)
#i.rooms[1].save
#i.room.RoomName="TestRoom"
#print(i.devices[15].DeviceName)
#i.devices[15].DeviceName='testdevice'
#print(i.devices[15].DeviceName)
#print(i.devices[1].DeviceName)
#i.devices[1].DeviceName='testdevice1'
#print(i.devices[1].DeviceName)
#i.devices[1].save()