Skip to content
Michael Bierman edited this page Jul 11, 2020 · 6 revisions

Welcome to the homebridge-http-switch wiki!

Sample configs

Add your configurations so others can see working examples.

  1. Use case, A Flo

Here is the config I ended up with to control my Flo which turns on and off water to my home. Since it lacks open APIs, I used ifttt to change states of the unit and apilio to store the state.

    {
        "accessory": "HTTP-SWITCH", 
        "name": "Flo",
        "switchType": "stateful",
        "pullInterval": 5000,
        "debug": true,
        "statusPattern": "true",
        "onUrl": {
            "url": "https://maker.ifttt.com/trigger/[trigger_removed]/with/key/[key_removed]",
            "method": "GET"
        },
        "offUrl": {
            "url": "https://maker.ifttt.com/trigger[trigger_removed]/with/key/[key_removed]",
            "method": "GET"
        },
        "statusUrl": {
            "url": "https://api.apilio.com/api/v1/boolean_variables/Flo",
            "method": "GET",
            "headers": {
                "Accept": "application/json",
                "Authorization": "Basic [token_removed]"
            }
        }
    }
  1. Use case, B Flo (new) Flo is dropping their IFTTT integration so I had to use their API directly. Note I added a statusPattern

     {
       "accessory": "HTTP-SWITCH",
       "name": "Flo",
       "switchType": "stateful",
       "statusCache": 10,
       "pullInterval": 5000,
       "debug": true,
       "statusPattern": "{.*\"target\".*\"(home|sleep)\".*}",
       "onUrl": {
           "url": "https://api-gw.meetflo.com/api/v2/locations/***/systemMode",
           "method": "POST",
           "headers": {
               "authorization": "***",
               "Content-Type": "application/json"
           },
           "body": {
               "target": "home"
           }
       },
       "offUrl": {
           "url": "https://api-gw.meetflo.com/api/v2/locations/***3/systemMode",
           "method": "POST",
           "headers": {
               "authorization": "***",
               "Content-Type": "application/json"
           },
           "body": {
               "target": "away"
           }
       },
       "statusUrl": {
           "url": "https://api-gw.meetflo.com/api/v2/locations/***?expand=",
           "method": "GET",
           "headers": {
               "authorization": "e****",
               "Content-Type": "application/json"
           }
       }
    

    },

Clone this wiki locally