The easy approach is just to use Sonoff native software and and eWeLink Smart Home skill on echo and you are away, instructions in link here. However this means having another dependency on external web service (eWelink) another account, and an extra app on your phone etc.
eNotes
termux android node red
Rpieasy
Webhook relay
1. Download cli client for pi (arm)
2. rename to relay
3. place in pi directory
4. chmod +wx relayn
5. ./relay --help
6. on wed bsite register and get token
7. ./relay login -k token-key-here -s token-secret-here
to set tunnel:
1.at cmd prompt: ./relay connect https://localhost:1880
you can then reach the server at http:/xxxx.webrelay.io...
Node Red Pi Oled
Using NR to drive oled:
Node Red: Useful nodes to add...
ifttt: node-red-contrib-ifttt,
Node Red (Pi installation) Nov 2018
Just installed pi os with noobs (Raspian v2.8 Nov2018), surprised that node red was preinstalled (nodered version 0.19.4).
Image backup for rpi
Use wins32 disk imager to make an image (note: read is greyed out at first, create a name with .img extension for your backup first). Click read and it will create an image file (do not click write). https://www.raspberrypi.org/forums/viewtopic.php?t=26463
Raspberry Pi reinstall Nov 2018
The sd on one of my pi 3 was corrupted, was working before (24/7), I guess that must be too much rw for the sd. Good opportunity to reinstall from scratch the pi os, as so many changes since I last updated. Note the lastest version (V2.5, Nov18) , means you have to install node red manually (more later).
IFTTT webhooks
Create ifttt webhooks applet:
1. Choose service: webhooks
2.Choose trigger: Receive a web request
3.Enter event name: e.g button1
4.Create trigger (then that)
5.Choose Action service: e.g google sheets, add row to sheet
6.Create Action
7.Finish