项目作者: elfive

项目描述 :
homebridge advanced timer, with homekit and iOS shortcut, you could do much more things.
高级语言: JavaScript
项目地址: git://github.com/elfive/homebridge-advanced-timer.git
创建时间: 2021-01-11T01:54:48Z
项目社区:https://github.com/elfive/homebridge-advanced-timer

开源协议:Apache License 2.0

下载


homebridge-advanced-timer



NPM Version


Total NPM Downloads


Verified by Homebridge



Setup Guide | Contribute

1) Description

advanced timer, get full use of iOS automation.

features

  • controled by a Homekit switch, easy to control.
  • setting up interval plan, and can loop infinite or loop certain cycles.

limitations

  • after homebridge restart, can only start from the loop beginning
  • ……

examples

  • every 30 mins, heat your room for 10 mins.
  • check home temperature every 5 mins, and change heater target temperature.
  • ……

2) Configure

trigger mode

  • TTL


    screenshot

  • Pulse


    screenshot

  • Trigger status compare


screenshot

note: trigger plan(intervals): 2,6

config.json field

field name type required default range description
accessory string yes ‘advanced_timer’ ‘advanced_timer’ MUST BE ‘advanced_timer’
name string yes ‘AdvancedTimer’ —- device name shows in HomeKit. we don’t need it, but homebridge need it.
intervals string yes —- 0 to 86400
(each value)
Comma-separated trigger plan, every interval(in second), if pulse trigger mode is selected, all interval value should longer than trigger_duration below.
repeat int no 0 0 to 86400 How many trigger plan cycles repeat, 0 for infinite loop.
enable_name string no ‘Enable’ —- Timer enable switch name shows in HomeKit
trigger_name string no ‘Trigger’ —- Timer trigger indicator name shows in HomeKit.
trigger_type int no 1 0, 1 like electronic, trigger type has two different type:
0: Pulse
1: TTL
pulse_trigger_duration int no 3 1 to 3 Each time a trigger signal last duration, in second,
only works in Pulse trigger type
start_delay
(unit: second)
int no 0 0 to 86400 After timer enable status set to enable, delay before trigger plan starts.
stop_delay
(unit: second)
int no 0 0 to 86400 Delay after trigger plan stops or after timer enable status set to disable, only works in TTL trigger type.
enable_status_when_start int no 2 0, 1, 2 Enable status after Homebridge start, only works in TTL trigger type.
0: OFF,
1: ON,
2: Last Status.
trigger_status_when_start int no 2 0, 1, 2 Enable status after Homebridge start, only works in TTL trigger type.
0: OFF,
1: ON,
2: Last Status.
trigger_status_while_enabled int no 0 0, 1, 2 Trigger status while service enabled, only works in TTL trigger type.
0: Not Triggered,
1: Triggered,
2: Last Status.
trigger_status_while_disabled int no 0 0, 1, 2 Trigger status while service disabled, only works in TTL trigger type.
0: Not Triggered,
1: Triggered,
2: Last Status.

example of config.json file

  1. "accessories": [
  2. {
  3. "name": "heater_timer",
  4. // trigger plan:
  5. // trigger after 5s then trigger after 10s, means trigger at 5s and 15s
  6. "intervals": "5,10",
  7. // repeat trigger plan for 4 times
  8. "repeat": 4,
  9. "enable_name": "Enable",
  10. "trigger_name": "Trigger",
  11. "enabled_status_after_restart": 2,
  12. "trigger_duration": 3,
  13. "accessory": "advanced_timer"
  14. }
  15. ]

3) How to contribute

everyone is welcome to contribute to this plugin. PR/issue/debug all are welcome.

or you can send me an e-mail: elfive@elfive.cn