Skip to content

Commit 36a61d6

Browse files
authored
1 parent 41449dd commit 36a61d6

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

kocom.conf

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
# socket_server (required when type=socket) : address of remote serial server (eg. 192.168.1.100)
99
# socket_port (required when type=socket) : port number of remote serial server (eg. 5050)
1010
#------------
11-
#type = serial
12-
#serial_port = /dev/ttyUSB0
13-
type = socket
14-
socket_server = 192.168.219.118
11+
type = serial
12+
serial_port = /dev/ttyUSB0
13+
#type = socket
14+
#socket_server = 192.168.219.118
1515
socket_port = 8899
1616

1717

@@ -25,11 +25,11 @@ socket_port = 8899
2525
# mqtt_username (required when mqtt_allow_anonymous=False) : mqtt username
2626
# mqtt_password (required when mqtt_allow_anonymous=False) : mqtt password
2727
#------------
28-
mqtt_server = 192.168.219.130
28+
mqtt_server = 172.30.32.1
2929
mqtt_port = 1883
3030
mqtt_allow_anonymous = False
31-
mqtt_username = admin
32-
mqtt_password = admin3844
31+
mqtt_username = id
32+
mqtt_password = pw
3333

3434

3535
[Device]
@@ -41,7 +41,8 @@ mqtt_password = admin3844
4141
# * supported devicetypes : light, gas, fan, thermo, elevator
4242
# * supported roomnames : myhome, livingroom, bedroom, room1, room2
4343
#------------
44-
enabled = light, fan, thermo_livingroom, thermo_bedroom, thermo_room1, thermo_room2, elevator
44+
#enabled = light, fan, thermo_livingroom, thermo_bedroom, thermo_room1, thermo_room2, elevator
45+
enabled = light_livingroom, fan, thermo_livingroom, thermo_bedroom, thermo_room1, thermo_room2, thermo_room3, elevator
4546

4647

4748
[Elevator]
@@ -89,5 +90,5 @@ show_mqtt_publish = True
8990
# init_fan_mode (required) : Low, Medium, High
9091
# light_count (required) : Light Count
9192
init_temp = 23
92-
init_fan_mode = Medium
93+
init_fan_mode = Low
9394
light_count = 2

kocom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
seq_t_dic = {'c':1, 'd':2, 'e':3, 'f':4}
4141
device_t_dic = {'01':'wallpad', '0e':'light', '2c':'gas', '36':'thermo', '3b': 'plug', '44':'elevator', '48':'fan'}
4242
cmd_t_dic = {'00':'state', '01':'on', '02':'off', '3a':'query'}
43-
room_t_dic = {'00':'livingroom', '01':'bedroom', '02':'room1', '03':'room2'}
43+
room_t_dic = {'00':'livingroom', '01':'bedroom', '02':'room1', '03':'room2', '04':'room3'}
4444

4545
type_h_dic = {v: k for k, v in type_t_dic.items()}
4646
seq_h_dic = {v: k for k, v in seq_t_dic.items()}
4747
device_h_dic = {v: k for k, v in device_t_dic.items()}
4848
cmd_h_dic = {v: k for k, v in cmd_t_dic.items()}
49-
room_h_dic = {'livingroom':'00', 'myhome':'00', 'bedroom':'01', 'room1':'02', 'room2':'03'}
49+
room_h_dic = {'livingroom':'00', 'myhome':'00', 'bedroom':'01', 'room1':'02', 'room2':'03', 'room3':'04'}
5050

5151
# mqtt functions ----------------------------
5252

0 commit comments

Comments
 (0)