Posts

Showing posts from February, 2020

Sonoff wifi smart switch with Homekit

I just got some cheap Sonoff smart switches for the existing ceiling led lights (which can't fit hue bulbs). Sonoff uses eWelink and I needed to link this to Alexa, Siri(homekit) and Fibaro. Alexa Alexa was fine with the skill already available. Just need to add the skill. HomeKit The next challenge was homekit/homebridge.  I started trying to find an API and it's actually more complicated than I imagined. I looked out for more commercial integrations to eWelink and found the IFTTT one. That makes it "easier" with the IFTTT applet with a webhooks. 1. Create an IFTTT applet: IF webhook event name "ewe_light_on" THEN turn on the light 2. Create an IFTTT applet: IF webhook event name "ewe_light_off" THEN turn off the light 3. Create a bash shell script to call the IFTTT webhook with the webhook address. Example ewe_light.sh: curl -X POST https://maker.ifttt.com/trigger/ewe_light_$1/with/key/ -- The $1 variable allows input for th...