Running HomeSeer Events - jvmahon/Homebridge-HomeSeer4 GitHub Wiki
There are two ways to run HomeSeer Events from HomeKit. In each case, the "Event" is activated by a switch that will appear in your iOS device.
1. By Using a Virtual Switch
My preferred way to run a HomeSeer event is to create a virtual Switch in HomeSeer and set that up to appear as an On/Off switch in Homekit; You then can trigger a HomeSeer event by turning On / Off that switch.
How to do it:
-
Create a virtual switch in HomeSeer with an Off and an On value. Typically, Off = 0 and On = 100 or 255.
-
Create an event in Homeseer that triggers when the virtual switch is set to "on."
-
The body of your event should then run all of your event actions, with the last Action being to turn the Virtual Switch back to the Off position, this effectively resets the switch so it is ready for the next running of the Event. I like to keep the body of the event pretty simple - sometimes just calling another event that I want to run.
2. Configuring Events In Your Config.Json file
Another way to add switches to HomeKit that can be then be used to trigger HomeSeer events is to identify the event in an "events" section in your config.json file.
The sample config.json found here shows how this is done: https://github.com/jvmahon/homebridge-homeseer4/blob/master/config/config.complex.json
Note that the "uuid_base" parameter can be any unique value.
"events":
[
{
"name":"All lights off",
"eventGroup":"Lighting",
"eventName":"All lights off",
"uuid_base":"All lights off"
},
{
"name":"Night Mode",
"eventGroup":"Lighting",
"eventName":"Night Mode",
"offEventGroup":"Lighting",
"offEventName":"Daytime Lighting",
"uuid_base":"1234593"
}
],