Advertisement
Guest User

Untitled

a guest
May 15th, 2019
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.67 KB | None | 0 0
  1. #==========================================================================
  2. #
  3. # Insteon <-> MQTT bridge configuration file.
  4. #
  5. # NOTE: the loader supports using a !include tag to load other as a
  6. # item entry so you can do things like this:
  7. #
  8. # insteon:
  9. # devices: !include devices.yaml
  10. #
  11. #==========================================================================
  12.  
  13. #==========================================================================
  14. #
  15. # Optional logging configuration (can also be set via the command line)
  16. #
  17. #==========================================================================
  18. logging:
  19. # 10=DEBUG, 20=INFO, 30=WARNING, 40=ERROR
  20. level: 10
  21.  
  22. # Print messages to the screen.
  23. #screen: False
  24.  
  25. # Print messages to a file.
  26. #file: /var/log/insteon_mqtt.log
  27.  
  28. #==========================================================================
  29. #
  30. # Insteon configuration
  31. #
  32. #==========================================================================
  33. insteon:
  34. Serial device:
  35. # USB PLM modem
  36. port: '/dev/ttyUSB0'
  37. baudrate: 19200
  38.  
  39. # Network socket:
  40. # Insteon HUB PLM network
  41. #port: 'socket://192.168.1.5:9761'
  42.  
  43. # PLM modem Insteon hex address
  44. address: 44.87.0E
  45.  
  46. # Device database file storage location.
  47. #storage: '/var/lib/insteon-mqtt'
  48. storage: 'data'
  49.  
  50. # Automatically refresh device states and databases (if needed) at
  51. # startup. This may be slow depending on the number of devices.
  52. startup_refresh: False
  53.  
  54. #------------------------------------------------------------------------
  55. # Devices require the Insteon hex address and an optional name. Note
  56. # that MQTT address topics are always the lower case hex address or
  57. # the input name depending on how they are configured below.
  58. devices:
  59. # On/off switch devices (outlets, wall switches, appliance modules, etc).
  60. switch:
  61.  
  62.  
  63.  
  64. # Dimming devices (outlets, wall switches, lamp modules, etc).
  65. dimmer:
  66. - 4A.EE.6B: 'Kitchen Dinner'
  67. - 4D.AB.F4: 'Kitchen Main'
  68.  
  69. # Battery powered sensors (door, hidden door, window).
  70. battery_sensor:
  71.  
  72.  
  73. # Battery powered motion sensors.
  74. motion:
  75.  
  76.  
  77. # Battery powered mini remotes.
  78. mini_remote4:
  79.  
  80. mini_remote8:
  81.  
  82.  
  83. # Smoke bridge module.
  84. smoke_bridge:
  85.  
  86.  
  87. # FanLinc fan controller (dimmer+fan).
  88. #fan_linc:
  89. # - 9a.a1.b3
  90.  
  91. # KeypadLinc dimmers (dimmer+scene controller).
  92. keypad_linc:
  93.  
  94.  
  95. # KeypadLinc switches (on/off+scene controller).
  96. keypad_linc_sw:
  97.  
  98.  
  99. # Leak sensors.
  100. #leak:
  101. # - 21.d6.d9: 'bathroom'
  102.  
  103. # IOLinc relay controllers
  104. io_linc:
  105.  
  106.  
  107. # On/off ouetlets
  108. #outlet:
  109. # - aa.bb.cc: 'outlet'
  110.  
  111. # Thermostatus
  112. thermostat:
  113. # - aa.bb.cc: 'downstairs'
  114.  
  115. #------------------------------------------------------------------------
  116. # FUTURE: Insteon scene definitions.
  117. #scenes:
  118. # - scene_01:
  119.  
  120.  
  121. #==========================================================================
  122. #
  123. # MQTT configuration
  124. #
  125. #==========================================================================
  126. mqtt:
  127. broker: !secret mqtt_broker
  128. username: !secret mqtt_username
  129. password: !secret mqtt_password
  130.  
  131. # Keep alive time in seconds. This should be smaller than the
  132. # server setting (which is usually ~60 seconds) to insure that
  133. # connections aren't dropped.
  134. keep_alive: 30
  135.  
  136. # Outbound messages configuration. Retain should generally be 1
  137. # so that the current state is available when someone subscribes.
  138. qos: 1
  139. retain: 1
  140.  
  141. # Input commands topic to allow changes to a device. See the device
  142. # documentation for details. NOTE: This is usually not needed for
  143. # home automation - it's used by the command line tool to modify the
  144. # Insteon devices, network, and scenes. The address or name of the
  145. # device will follow the command topic (insteon/command/aa.bb.cc) to
  146. # send these low level commands.
  147. cmd_topic: 'insteon/command'
  148.  
  149.  
  150. # Trigger modem virtual scenes. Modem scenes are where the modem is a
  151. # controller and emits a scene broadcast with the specified group number.
  152. # There is no state topic since the scene doesn't have an on/off state.
  153. #
  154. # In Home Assistant use MQTT switch with a configuration like this to trigger
  155. # modem scene 10:
  156. # switch:
  157. # - platform: mqtt
  158. # name: "scene #10"
  159. # command_topic: "insteon/modem/scene"
  160. # payload_on: { "cmd" : "on", "group" : 10 }
  161. # payload_off: { "cmd" : "off", "group" : 10 }
  162. modem:
  163. # The output of passing the payload through the template must match the
  164. # following where group is in the range 1-255.
  165. # { "cmd" : 'on'/'off', "group" : GROUP }
  166. # Available variables for templating are:
  167. # value = the input payload
  168. # json = the input payload converted to json. Use json.VAR to extract
  169. # a variable from a json payload.
  170. scene_topic: 'insteon/modem/scene'
  171. scene_payload: '{{value}}'
  172.  
  173.  
  174. # IMPORTANT: all devices must have the pair() command run one time to make
  175. # sure that the all the necessary controller/responder links are defined
  176. # between the device and the modem. If these links are there, the commands
  177. # and outputs below will not work properly.
  178.  
  179. #------------------------------------------------------------------------
  180. # On/off switches
  181. #------------------------------------------------------------------------
  182.  
  183. # On/Off switch. Non-dimming lamp modules and wall switches.
  184. # In Home Assistant use MQTT switch with a configuration like:
  185. # switch:
  186. # - platform: mqtt
  187. # state_topic: 'insteon/aa.bb.cc/state'
  188. # command_topic: 'insteon/aa.bb.cc/set'
  189. switch:
  190. # Output state change topic and template. This message is sent
  191. # whenever the device state changes for any reason. Available
  192. # variables for templating are:
  193. # address = 'aa.bb.cc'
  194. # name = 'device name'
  195. # on = 0/1
  196. # on_str = 'off'/'on'
  197. # mode = 'normal'/'fast'/'instant'
  198. # fast = 0/1
  199. # instant = 0/1
  200. state_topic: 'insteon/{{address}}/state'
  201. state_payload: '{{on_str.upper()}}'
  202.  
  203. # Manual mode (holding down a button) is triggered once when the button
  204. # is held and once when it's released. Available variables for
  205. # templating are address (see above), name (see above), and:
  206. # manual_str = 'up'/'off'/'down'
  207. # manual = 1/0/-1
  208. # manual_openhab = 2/1/0
  209. #manual_state_topic: 'insteon/{{address}}/manual_state'
  210. #manual_state_payload: '{{manual_str.upper()}}'
  211.  
  212. # Input on/off command. Similar functionality to the cmd_topic
  213. # but only for turning the device on and off. The output of
  214. # passing the payload through the template must match the following:
  215. # { "cmd" : 'on'/'off', ["mode" : 'normal'/'fast'/'instant'],
  216. # ["fast" : 1/0], ["instant" : 1/0] }
  217. # Available variables for templating are:
  218. # value = the input payload
  219. # json = the input payload converted to json. Use json.VAR to extract
  220. # a variable from a json payload.
  221. on_off_topic: 'insteon/{{address}}/set'
  222. on_off_payload: '{ "cmd" : "{{value.lower()}}" }'
  223.  
  224. # Scene on/off command. This triggers the scene broadcast on the switch
  225. # in the same way clicking the button would. The inputs are the same as
  226. # those for the on_off topic and payload.
  227. scene_topic: 'insteon/{{address}}/scene'
  228. scene_payload: '{ "cmd" : "{{value.lower()}}" }'
  229.  
  230. #------------------------------------------------------------------------
  231. # Dimmers
  232. #------------------------------------------------------------------------
  233.  
  234. # Dimmer switch. Dimming lamp modules and wall switches. In Home
  235. # Assistant use MQTT light with a configuration like the following -
  236. # this gets HA to send the brightness value as the payload for all
  237. # control of the light.
  238. # light:
  239. # - platform: mqtt
  240. # schema: json
  241. # name: "insteon 1"
  242. # state_topic: "insteon/48.b0.ad/state"
  243. # command_topic: "insteon/48.b0.ad/level"
  244. # brightness: true
  245. #
  246. dimmer:
  247. # Output state change topic and payload. This message is sent
  248. # whenever the device state changes for any reason. Available
  249. # variables for templating are:
  250. # address = 'aa.bb.cc'
  251. # name = 'device name'
  252. # on = 0/1
  253. # on_str = 'off'/'on'
  254. # level_255 = 0-255
  255. # level_100 = 0-100
  256. # mode = 'normal'/'fast'/'instant'
  257. # fast = 0/1
  258. # instant = 0/1
  259. state_topic: 'insteon/{{address}}/state'
  260. state_payload: >
  261. { "state" : "{{on_str.upper()}}", "brightness" : {{level_255}} }
  262.  
  263. # Manual mode (holding down a button) is triggered once when the button
  264. # is held and once when it's released. Available variables for
  265. # templating are address (see above), name (see above), and:
  266. # manual_str = 'up'/'off'/'down'
  267. # manual = 1/0/-1
  268. # manual_openhab = 2/1/0
  269. #manual_state_topic: 'insteon/{{address}}/manual_state'
  270. #manual_state_payload: '{{manual_str.upper()}}'
  271.  
  272. # Input on/off command. Similar functionality to the cmd_topic
  273. # but only for turning the device on and off. The output of
  274. # passing the payload through the template must match the following:
  275. # { "cmd" : "on"/"off", ["mode" : 'normal'/'fast'/'instant'],
  276. # ["fast" : 1/0], ["instant" : 1/0] }
  277. # Available variables for templating are:
  278. # address = 'aa.bb.cc'
  279. # name = 'device name'
  280. # value = the input payload
  281. # json = the input payload converted to json. Use json.VAR to extract
  282. # a variable from a json payload.
  283. # NOTE: this isn't used by the HA example above - it's only useful when
  284. # treating the dimmer as an on/off switch and sending ON/OFF payloads
  285. on_off_topic: 'insteon/{{address}}/set'
  286. on_off_payload: '{ "cmd" : "{{value.lower()}}" }'
  287.  
  288. # Input dimming on/off command. Similar functionality to the cmd_topic
  289. # but only for turning the device on and off and setting the level.
  290. # The output of passing the payload through the template must match the
  291. # following:
  292. # { "cmd" : "on"/"off", "level" : LEVEL,
  293. # ["mode" : 'normal'/'fast'/'instant'],
  294. # ["fast" : 1/0], ["instant" : 1/0] }
  295. # where:
  296. # LEVEL = 0->255 dimmer level
  297. # Available variables for templating are:
  298. # address = 'aa.bb.cc'
  299. # name = 'device name'
  300. # value = the input payload
  301. # json = the input payload converted to json. Use json.VAR to extract
  302. # a variable from a json payload.
  303. level_topic: 'insteon/{{address}}/level'
  304. # NOTE: HASS JSON switch doesn't send brightness in some cases
  305. # when actuated so handle that here in the template code. The
  306. # other HASS MQTT options also have this problem.
  307. level_payload: >
  308. { "cmd" : "{{json.state.lower()}}",
  309. "level" : {% if json.brightness is defined %}
  310. {{json.brightness}}
  311. {% else %}
  312. 255
  313. {% endif %} }
  314.  
  315. # Scene on/off command. This triggers the scene broadcast on the switch
  316. # in the same way clicking the button would. The inputs are the same as
  317. # those for the on_off topic and payload.
  318. scene_topic: 'insteon/{{address}}/scene'
  319. scene_payload: '{ "cmd" : "{{value.lower()}}" }'
  320.  
  321. #------------------------------------------------------------------------
  322. # Battery powered sensors
  323. # door sensors, hidden door sensors, window sensors
  324. #------------------------------------------------------------------------
  325.  
  326. # In Home Assistant use MQTT binary sensor with a configuration like:
  327. # binary_sensor:
  328. # - platform: mqtt
  329. # state_topic: 'insteon/aa.bb.cc/state'
  330. # device_class: 'motion'
  331. #
  332. # - platform: mqtt
  333. # state_topic: 'insteon/aa.bb.cc/low_battery'
  334. # device_class: 'battery'
  335. battery_sensor:
  336. # Output state change topic and payload. This message is sent
  337. # whenever the device state changes for any reason. Available
  338. # variables for templating are:
  339. # address = 'aa.bb.cc'
  340. # name = 'device name'
  341. # on = 0/1
  342. # on_str = 'off'/'on'
  343. state_topic: 'insteon/{{address}}/state'
  344. state_payload: '{{on_str.upper()}}'
  345.  
  346. # Output low battery topic and payload. This message is sent
  347. # whenever the device detects a low battery. Available variables
  348. # for templating are:
  349. # address = 'aa.bb.cc'
  350. # name = 'device name'
  351. # is_low = 0/1
  352. # is_low_str = 'off'/'on'
  353. low_battery_topic: 'insteon/{{address}}/battery'
  354. low_battery_payload: '{{is_low_str.upper()}}'
  355.  
  356. #------------------------------------------------------------------------
  357. # Motion sensors
  358. #------------------------------------------------------------------------
  359.  
  360. # Motion sensors will use the state and low battery configuration
  361. # inputs from battery_sensor and some sensors add an addition
  362. # dawn/dusk notification which is configured here.
  363. #
  364. # To register the dawn/dusk signa in Home Assistant use MQTT binary
  365. # sensor with a configuration like:
  366. # binary_sensor:
  367. # - platform: mqtt
  368. # state_topic: 'insteon/aa.bb.cc/dawn'
  369. # device_class: 'light'
  370. motion:
  371. # Output dawn/dusk change topic and payload. This message is sent
  372. # whenever the device light sensor detects dawn or dusk changes.
  373. # Available variables for templating are:
  374. # address = 'aa.bb.cc'
  375. # name = 'device name'
  376. # is_dawn = 0/1
  377. # is_dawn_str = 'off'/'on'
  378. # is_dusk = 0/1
  379. # is_dusk_str = 'off'/'on'
  380. # state = 'dawn'/'dusk'
  381. dawn_dusk_topic: 'insteon/{{address}}/dawn'
  382. dawn_dusk_payload: '{{is_dawn_str.upper()}}'
  383.  
  384. #------------------------------------------------------------------------
  385. # Leak sensors
  386. #------------------------------------------------------------------------
  387.  
  388. # Leak sensors will report the dry/wet status and a heartbeat every 24
  389. # hours. The leak sensors does not support low battery signal like other
  390. # battery operated devices.
  391. #
  392. # In Home Assistant use a combination of MQTT binary sensor and template
  393. # sensor with a configuration like:
  394. # binary_sensor:
  395. # - platform: mqtt
  396. # state_topic: 'insteon/aa.bb.cc/wet'
  397. # device_class: 'moisture'
  398. #
  399. # sensors:
  400. # - platform: mqtt
  401. # state_topic: 'insteon/aa.bb.cc/heartbeat'
  402. leak:
  403. # Output wet/dry change topic and payload. This message is sent
  404. # whenever the device changes state to wet or dry.
  405. # Available variables for templating are:
  406. # address = 'aa.bb.cc'
  407. # name = 'device name'
  408. # is_wet = 0/1
  409. # is_wet_str = 'off'/'on'
  410. # is_dry = 0/1
  411. # is_dry_str = 'off'/'on'
  412. # state = 'wet'/'dry'
  413. wet_dry_topic: 'insteon/{{address}}/wet'
  414. wet_dry_payload: '{{is_wet_str.upper()}}'
  415.  
  416. # Output heartbeat topic and payload. This message is sent
  417. # every 24 hours. Available variables for templating are:
  418. # address = 'aa.bb.cc'
  419. # name = 'device name'
  420. # is_heartbeat = 0/1
  421. # heartbeat_time = UNIX time float of the last heartbeat
  422. heartbeat_topic: 'insteon/{{address}}/heartbeat'
  423. heartbeat_payload: '{{heartbeat_time}}'
  424.  
  425. #------------------------------------------------------------------------
  426. # Smoke Bridge
  427. #------------------------------------------------------------------------
  428.  
  429. # The smoke bridge will broadcast on a variety of groups for various error
  430. # conditions.
  431. #
  432. # In Home Assistant use MQTT binary sensor with a configuration like:
  433. # binary_sensor:
  434. # - platform: mqtt
  435. # state_topic: 'insteon/aa.bb.cc/smoke'
  436. # device_class: 'smoke'
  437. #
  438. # - platform: mqtt
  439. # state_topic: 'insteon/aa.bb.cc/battery'
  440. # device_class: 'battery'
  441. #
  442. # - platform: mqtt
  443. # state_topic: 'insteon/aa.bb.cc/co'
  444. # device_class: 'gas'
  445. #
  446. # - platform: mqtt
  447. # state_topic: 'insteon/aa.bb.cc/error'
  448. smoke_bridge:
  449. # Output state change topic and payload. This message is sent
  450. # whenever the device state changes for any reason. Available
  451. # variables for templating are:
  452. # address = 'aa.bb.cc'
  453. # name = 'device name'
  454. # on = 0/1
  455. # on_str = 'off'/'on'
  456. # type = 'smoke'/'co'/'low_battery'/'error'/'clear'
  457. smoke_topic: 'insteon/{{address}}/smoke'
  458. smoke_payload: '{{on_str.upper()}}'
  459.  
  460. co_topic: 'insteon/{{address}}/co'
  461. co_payload: '{{on_str.upper()}}'
  462.  
  463. battery_topic: 'insteon/{{address}}/battery'
  464. battery_payload: '{{on_str.upper()}}'
  465.  
  466. error_topic: 'insteon/{{address}}/error'
  467. error_payload: '{{on_str.upper()}}'
  468.  
  469. #------------------------------------------------------------------------
  470. # Thermostat
  471. #------------------------------------------------------------------------
  472.  
  473. # The thermostat has a lot of available states and commands
  474. #
  475. #
  476. # In Home Assistant use MQTT climate sensor with a configuration like:
  477. # climate:
  478. # - platform: mqtt
  479. # name: Study
  480. # mode_state_topic: "insteon/aa.bb.cc/mode_state"
  481. # modes: ["OFF", "AUTO", "HEAT", "COOL", "PROGRAM"]
  482. # current_temperature_topic: "insteon/aa.bb.cc/ambient_temp"
  483. # fan_mode_state_topic: "insteon/aa.bb.cc/fan_state"
  484. # fan_modes: ["AUTO", "ON"]
  485. #
  486. # The current Home Assistant mqtt hvac component is not great. It lacks
  487. # a lot of functionality offered by the thermostat. At some point I will
  488. # submit a PR to Home Assistant to try and fix this.
  489. # Major issues:
  490. # - no concept of separate heat and cool set points
  491. # - no humidity state
  492. # - no status state
  493. thermostat:
  494. # Output state change topic and payload. Available variables for
  495. # templating in all cases are:
  496. # address = 'aa.bb.cc'
  497. # name = 'device name'
  498. # The following specific variables only apply to the topics listed
  499. # directly below
  500. # temp_c = temperature in celsius
  501. # temp_f = temperature in farenheit
  502. ambient_temp_topic: 'insteon/{{address}}/ambient_temp'
  503. ambient_temp_payload: '{"temp_f" : {{temp_f}}, "temp_c" : {{temp_c}}}'
  504. cool_sp_state_topic: 'insteon/{{address}}/cool_sp_state'
  505. cool_sp_state_payload: '{"temp_f" : {{temp_f}}, "temp_c" : {{temp_c}}}'
  506. heat_sp_state_topic: 'insteon/{{address}}/heat_sp_state'
  507. heat_sp_state_payload: '{"temp_f" : {{temp_f}}, "temp_c" : {{temp_c}}}'
  508. # fan_mode = "on", "off"
  509. # is_fan_on = 0/1
  510. fan_state_topic: 'insteon/{{address}}/fan_state'
  511. fan_state_payload: '{{fan_mode.upper()}}'
  512. # mode = 'off', 'auto', 'heat', 'cool', 'program'
  513. mode_state_topic: 'insteon/{{address}}/mode_state'
  514. mode_state_payload: '{{mode.upper()}}'
  515. # humid = humidity percentage
  516. humid_state_topic: 'insteon/{{address}}/humid_state'
  517. humid_state_payload: '{{humid}}'
  518. # status = "off", "heating", "cooling"
  519. # is_heating = 0/1
  520. # is_cooling = 0/1
  521. status_state_topic: 'insteon/{{address}}/status_state'
  522. status_state_payload: '{{status.upper()}}'
  523. # Caution, there is no push update for the hold or energy state. ie, if
  524. # you press hold on the physical device, you will not get any notice of
  525. # this unless you run get_status(). There is also no way to programatically
  526. # change the hold state or energy state
  527. # hold_str = 'off', 'temp'
  528. # is_hold = 0/1
  529. hold_state_topic: 'insteon/{{address}}/hold_state'
  530. hold_state_payload: '{{hold_str.upper()}}'
  531. # See caution in hold state above
  532. # energy_str = 'off', 'on'
  533. # is_energy = 0/1
  534. energy_state_topic: 'insteon/{{address}}/energ_state'
  535. energy_state_payload: '{{energy_str.upper()}}'
  536.  
  537. # Command Topics
  538. # Available variables for templating all of these commands are:
  539. # address = 'aa.bb.cc'
  540. # name = 'device name'
  541. # value = the input payload
  542. # json = the input payload converted to json. Use json.VAR to extract
  543. # a variable from a json payload.
  544. #
  545. # Mode state command. The output of passing the payload through the
  546. # template must match the following:
  547. # { "cmd" : "auto"/"off"/"heat"/"cool","program" }
  548. mode_command_topic: 'insteon/{{address}}/mode_command'
  549. mode_command_payload: '{ "cmd" : "{{value.lower()}}" }'
  550. # Fan state command. The output of passing the payload through the
  551. # template must match the following:
  552. # { "cmd" : "auto"/"on" }
  553. fan_command_topic: 'insteon/{{address}}/fan_command'
  554. fan_command_payload: '{ "cmd" : "{{value.lower()}}" }'
  555. # Temp setpoint commands. The payloads should be in the form of {temp_c:
  556. # float, temp_f: float} Only one unit needs to be present. If temp_c is
  557. # present it will be used regardless
  558. heat_sp_command_topic: 'insteon/{{address}}/heat_sp_command'
  559. heat_sp_payload: '{ "temp_f" : {{value}} }'
  560. cool_sp_command_topic: 'insteon/{{address}}/cool_sp_command'
  561. cool_sp_payload: '{ "temp_f" : {{value}} }'
  562.  
  563. #------------------------------------------------------------------------
  564. # Mini remotes
  565. #------------------------------------------------------------------------
  566.  
  567. # Battery powered remotes (usually 4 or 8 buttons). A message is
  568. # sent whenever one of the buttons is pressed.
  569. remote:
  570. # Output state change topic and template. This message is sent
  571. # whenever a button is pressed. Available variables for templating are:
  572. # address = 'aa.bb.cc'
  573. # name = 'device name'
  574. # button = 1...n (button number 1-4 or 1-8)
  575. # on = 0/1
  576. # on_str = 'off'/'on'
  577. # mode = 'normal'/'fast'/'instant'
  578. # fast = 0/1
  579. # instant = 0/1
  580. state_topic: 'insteon/{{address}}/state/{{button}}'
  581. state_payload: '{{on_str.upper()}}'
  582.  
  583. # Manual mode (holding down a button) is triggered once when the button
  584. # is held and once when it's released. Available variables for
  585. # templating are address (see above), name (see above), button (see
  586. # above), and:
  587. # manual_str = 'up'/'off'/'down'
  588. # manual = 1/0/-1
  589. # manual_openhab = 2/1/0
  590. #manual_state_topic: 'insteon/{{address}}/manual_state'
  591. #manual_state_payload: '{{manual_str.upper()}}'
  592.  
  593. #------------------------------------------------------------------------
  594. # Fan Linc
  595. #------------------------------------------------------------------------
  596.  
  597. # A FanLinc is a dimmer switch (Insteon group 1) plus a fan control
  598. # (group 2). The dimmer MQTT messages use the dimmer settings
  599. # above. The settings here are just for the fan input and output.
  600. # The settings can be used to turn the fan on and off (and report
  601. # on/off state changes).
  602. #
  603. # NOTE: Both the fan state and fan speed state topics will be
  604. # published on ANY fan change. So if you only need one of them, you
  605. # can put both payloads in a single message and set the other inputs
  606. # to blank (which will turn off the output).
  607. #
  608. # In Home Assistant, use the dimmer example above for the light and
  609. # use MQTT fan with a configuration like this for the fan:
  610. # fan:
  611. # - platform: mqtt
  612. # command_topic: 'insteon/aa.bb.cc/fan/set'
  613. # state_topic: 'insteon/aa.bb.cc/fan/state'
  614. # speed_command_topic: 'insteon/aa.bb.cc/fan/speed/set'
  615. # speed_state_topic: 'insteon/aa.bb.cc/fan/state'
  616. fan_linc:
  617. # Output fan state change topic and payload. This message is sent
  618. # whenever the fan state changes for any reason. Available
  619. # variables for templating are:
  620. # address = 'aa.bb.cc'
  621. # name = 'device name'
  622. # on = 0/1
  623. # on_str = 'off'/'on'
  624. # level = 0/1/2/3
  625. # level_str = 'off'/'low'/'medium'/'high'
  626. fan_state_topic: 'insteon/{{address}}/fan/state'
  627. fan_state_payload: '{{on_str.upper()}}'
  628.  
  629. # Fan on/off command. Similar functionality to the cmd_topic
  630. # but only for turning the device on and off. The output of
  631. # passing the payload through the template must match the following:
  632. # { "cmd" : "on"/"off" }
  633. # Available variables for templating are:
  634. # address = 'aa.bb.cc'
  635. # name = 'device name'
  636. # value = the input payload
  637. # json = the input payload converted to json. Use json.VAR to extract
  638. # a variable from a json payload.
  639. fan_on_off_topic: 'insteon/{{address}}/fan/set'
  640. fan_on_off_payload: '{ "cmd" : "{{value.lower()}}" }'
  641.  
  642. # Output fan speed state change topic and payload. Set to empty
  643. # to turn off. The same templating variables are available as
  644. # fan_state_topic agove.
  645. fan_speed_topic: 'insteon/{{address}}/fan/speed/state'
  646. fan_speed_payload: '{{level_str}}'
  647.  
  648. # Fan speed change command. Similar functionality to the cmd_topic
  649. # but only for turning the device on and off. The output of
  650. # passing the payload through the template must match the following:
  651. # { "cmd" : SPEED }
  652. # where
  653. # SPEED = 0/1/2/3 (for off, low, medium, high)
  654. # or = "off"/"low"/"medium"/"high"
  655. # Available variables for templating are:
  656. # address = 'aa.bb.cc'
  657. # name = 'device name'
  658. # value = the input payload
  659. # json = the input payload converted to json. Use json.VAR to extract
  660. # a variable from a json payload.
  661. fan_speed_set_topic: 'insteon/{{address}}/fan/speed/set'
  662. fan_speed_set_payload: '{ "cmd" : "{{value.lower}}" }'
  663.  
  664. #------------------------------------------------------------------------
  665. # Keypad Linc
  666. #------------------------------------------------------------------------
  667.  
  668. # A KeypadLinc is an on/off or dimmer switch (Insteon group 1) plus a
  669. # series of scene control buttons which operate on other groups. The group
  670. # 1 behavior will depend on whether the device is an on/off or dimmer. The
  671. # 4 or 6 other buttons are controlled like switches - but the only affect
  672. # is turning on and off the LED on the button since they have no directly
  673. # attached load.
  674. #
  675. # 6 button and 8 button keypads have use the following button numbers:
  676. # 1 on 1 2
  677. # 3 4 3 4
  678. # 5 6 5 6
  679. # 1 off 7 8
  680. #
  681. # In Home Assistant, use MQTT switches to represent the on/off switches and
  682. # the MQTT json component for a dimmer. The non-group 1 buttons are switches.
  683. # # dimmers:
  684. # light:
  685. # - platform: mqtt
  686. # schema: json
  687. # state_topic: "insteon/aa.bb.cc/state/1"
  688. # command_topic: "insteon/aa.bb.cc/set/1"
  689. # brightness: true
  690. #
  691. # # switches:
  692. # switch:
  693. # - platform: mqtt
  694. # state_topic: 'insteon/aa.bb.cc/state/1'
  695. # command_topic: 'insteon/aa.bb.cc/set/1'
  696. #
  697. # # other buttons:
  698. # switch:
  699. # - platform: mqtt
  700. # state_topic: 'insteon/aa.bb.cc/state/2'
  701. # command_topic: 'insteon/aa.bb.cc/set/2'
  702. keypad_linc:
  703. # On/off switch state change topic and template. This message is sent
  704. # whenever one of the on/off buttons is pressed. It will not be sent for
  705. # button 1 if it's a dimmer. Available variables for templating are:
  706. # address = 'aa.bb.cc'
  707. # name = 'device name'
  708. # button = 1-8
  709. # on = 0/1
  710. # on_str = 'off'/'on'
  711. # mode = 'normal'/'fast'/'instant'
  712. # fast = 0/1
  713. # instant = 0/1
  714. btn_state_topic: 'insteon/{{address}}/state/{{button}}'
  715. btn_state_payload: '{{on_str.upper()}}'
  716.  
  717. # Dimmer output state change topic and payload for button 1. This
  718. # message is sent whenever the device dimmer state changes for any
  719. # reason. Available variables for templating are:
  720. # address = 'aa.bb.cc'
  721. # name = 'device name'
  722. # on = 0/1
  723. # on_str = 'off'/'on'
  724. # level_255 = 0-255
  725. # level_100 = 0-100
  726. # mode = 'normal'/'fast'/'instant'
  727. # fast = 0/1
  728. # instant = 0/1
  729. dimmer_state_topic: 'insteon/{{address}}/state/1'
  730. dimmer_state_payload: >
  731. { "state" : "{{on_str.upper()}}", "brightness" : {{level_255}} }
  732.  
  733. # Manual mode (holding down a button) is triggered once when the button
  734. # is held and once when it's released. Available variables for
  735. # templating are address (see above), name (see above), and:
  736. # manual_str = 'up'/'off'/'down'
  737. # manual = 1/0/-1
  738. # manual_openhab = 2/1/0
  739. #manual_state_topic: 'insteon/{{address}}/manual_state'
  740. #manual_state_payload: '{{manual_str.upper()}}'
  741.  
  742. # Input on/off command. For button 1, this will set the load. For other
  743. # buttons, it just set the button LED. The output of passing the payload
  744. # through the template must match the following:
  745. # { "cmd" : 'on'/'off', "button": button,
  746. # ["mode" : 'normal'/'fast'/'instant'],
  747. # ["fast" : 1/0], ["instant" : 1/0] }
  748. # Available variables for templating are:
  749. # value = the input payload
  750. # json = the input payload converted to json. Use json.VAR to extract
  751. # a variable from a json payload.
  752. btn_on_off_topic: 'insteon/{{address}}/set/{{button}}'
  753. btn_on_off_payload: '{ "cmd" : "{{value.lower()}}" }'
  754.  
  755. # Input dimming on/off command for button 1. Similar functionality to
  756. # the cmd_topic but only for turning the group 1 on and off and setting
  757. # the level. This topic can be the same as the btn_on_off_topic in which
  758. # case either command format is valid. The output of passing the
  759. # payload through the template must match the following:
  760. # { "cmd" : "on"/"off", "level" : LEVEL,
  761. # ["mode" : 'normal'/'fast'/'instant'],
  762. # ["fast" : 1/0], ["instant" : 1/0] }
  763. # where:
  764. # LEVEL = 0->255 dimmer level
  765. # Available variables for templating are:
  766. # address = 'aa.bb.cc'
  767. # name = 'device name'
  768. # value = the input payload
  769. # json = the input payload converted to json. Use json.VAR to extract
  770. # a variable from a json payload.
  771. dimmer_level_topic: 'insteon/{{address}}/set/1'
  772. # NOTE: HASS JSON switch doesn't send brightness in some cases
  773. # when actuated so handle that here in the template code. The
  774. # other HASS MQTT options also have this problem.
  775. dimmer_level_payload: >
  776. { "cmd" : "{{json.state.lower()}}",
  777. "level" : {% if json.brightness is defined %}
  778. {{json.brightness}}
  779. {% else %}
  780. 255
  781. {% endif %} }
  782.  
  783. # Scene on/off command. This triggers the scene broadcast on the switch
  784. # in the same way clicking the button would. The inputs are the same as
  785. # those for the btn_on_off topic and payload.
  786. btn_scene_topic: 'insteon/{{address}}/scene/{{button}}'
  787. btn_scene_payload: '{ "cmd" : "{{value.lower()}}" }'
  788.  
  789. #------------------------------------------------------------------------
  790. # IO Linc relay controllers
  791. #------------------------------------------------------------------------
  792.  
  793. # The IOLinc is both a switch (momentary or latching on/off) and a sensor
  794. # that can be on or off. If you configure the IOLinc to be momentary, then
  795. # the on command will trigger it for the duration that is configured and
  796. # the off command is ignored. If it's configured as a latching switch,
  797. # then the on and off commands work like a normal switch. The set-flags
  798. # command line command can be used to change the settings.
  799. #
  800. # NOTE: the on/off payload forces the relay to on or off so it's most
  801. # likely NOT the way you want to use this. The scene payload is the same
  802. # trigger the IOLinc as a responder which respects the sensors settings in
  803. # momentary-C mode and is most likely the way you do want to use this.
  804. #
  805. # In Home Assistant use MQTT switch with a configuration like:
  806. # switch:
  807. # - platform: mqtt
  808. # state_topic: 'insteon/aa.bb.cc/state'
  809. # command_topic: 'insteon/aa.bb.cc/scene'
  810. io_linc:
  811. # Output state change topic and template. This message is sent whenever
  812. # the device sensor state changes. Available variables for templating
  813. # are:
  814. # address = 'aa.bb.cc'
  815. # name = 'device name'
  816. # on = 0/1
  817. # on_str = 'off'/'on'
  818. state_topic: 'insteon/{{address}}/state'
  819. state_payload: '{{on_str.upper()}}'
  820.  
  821. # Input on/off command. This forces the relay on/off and ignores the
  822. # momentary-C sensor setting. Use this to force the relay to respond.
  823. # If momentary mode is active, it will turn off after the delay. The
  824. # output of passing the payload through the template must match the
  825. # following:
  826. # { "cmd" : 'on'/'off' }
  827. # Available variables for templating are:
  828. # value = the input payload
  829. # json = the input payload converted to json. Use json.VAR to extract
  830. # a variable from a json payload.
  831. on_off_topic: 'insteon/{{address}}/set'
  832. on_off_payload: '{ "cmd" : "{{value.lower()}}" }'
  833.  
  834. # Scene on/off command. This triggers the IOLinc as if it were a
  835. # responder to a scene command and is the "correct" way to trigger the
  836. # IOLinc relay in that it respects the momentary settings. The inputs
  837. # are the same as those for the on_off topic and payload.
  838. scene_topic: 'insteon/{{address}}/scene'
  839. scene_payload: '{ "cmd" : "{{value.lower()}}" }'
  840.  
  841. #------------------------------------------------------------------------
  842. # On/off outlets
  843. #------------------------------------------------------------------------
  844.  
  845. # On/Off outlets. Non-dimming in wall outlet modules is two independent
  846. # switchs (top and bottom outlet. The top outlet is button 1, the bottom
  847. # outlet is button 2. In Home Assistant use MQTT switch with a
  848. # configuration like:
  849. # switch:
  850. # - platform: mqtt
  851. # state_topic: 'insteon/aa.bb.cc/state/1'
  852. # command_topic: 'insteon/aa.bb.cc/set/1'
  853. # switch:
  854. # - platform: mqtt
  855. # state_topic: 'insteon/aa.bb.cc/state/2'
  856. # command_topic: 'insteon/aa.bb.cc/set/2'
  857. outlet:
  858. # Output state change topic and template. This message is sent
  859. # whenever the device state changes for any reason. Available
  860. # variables for templating are:
  861. # address = 'aa.bb.cc'
  862. # name = 'device name'
  863. # button = 1 (top outlet) or 2 (bottom outlet)
  864. # on = 0/1
  865. # on_str = 'off'/'on'
  866. # mode = 'normal'/'fast'/'instant'
  867. # fast = 0/1
  868. # instant = 0/1
  869. state_topic: 'insteon/{{address}}/state/{{button}}'
  870. state_payload: '{{on_str.upper()}}'
  871.  
  872. # Input on/off command. Similar functionality to the cmd_topic
  873. # but only for turning the device on and off. The output of
  874. # passing the payload through the template must match the following:
  875. # { "cmd" : 'on'/'off', "button": button,
  876. # ["mode" : 'normal'/'fast'/'instant'],
  877. # ["fast" : 1/0], ["instant" : 1/0] }
  878. # Available variables for templating are:
  879. # value = the input payload
  880. # json = the input payload converted to json. Use json.VAR to extract
  881. # a variable from a json payload.
  882. on_off_topic: 'insteon/{{address}}/set/{{button}}'
  883. on_off_payload: '{ "cmd" : "{{value.lower()}}" }'
  884.  
  885. # Scene on/off command. This triggers the scene broadcast on the outlet
  886. # in the same way clicking the button would. The inputs are the same as
  887. # those for the on_off topic and payload.
  888. scene_topic: 'insteon/{{address}}/scene/{{button}}'
  889. scene_payload: '{ "cmd" : "{{value.lower()}}" }'
  890.  
  891. #----------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement