Sonoff Mini

Set up web server on Macbook (

Copy 8285 bin file to /Library/WebServer/Documents

Calculate shasum: d5a654253f1ca5c4d170c0ae80902fd88b2deee13cd13835e65e94753a412f8c

Put Mini in DIY mode

Create HotSpot: sonoffDiy/20170618sn

Discover Device ID: dns-sd -B _ewelink._tcp

Test Connection: curl http://<deviceIP>:8081/zeroconf/info -XPOST –data ‘{“deviceid”:”<deviceID>”,”data”:{} }’

Unlock : curl http://<deviceIP>:8081/zeroconf/ota_unlock -XPOST –data ‘{“deviceid”:”<deviceID>”,”data”:{} }’

Flash Firmware: curl http://<deviceIP>:8081/zeroconf/ota_flash -XPOST –data ‘{“deviceid”:”<deviceID>”,”data”:{“downloadUrl”: “”, “sha256sum”: “d5a654253f1ca5c4d170c0ae80902fd88b2deee13cd13835e65e94753a412f8c”} }’

Fails – replacing with Tasomata firmware works.


Raspberry Pi – Lofty

  • Install Raspbian – lite + add ssh file to /boot
  • Update password, change hostname
  • Use raspi-config to expand partition size (reboot)
  • Update System, disable BT & WIFI
  • Install Mythtv-light, Mariadb, apache2
  • Move DB to USB disk
  • Add Storage Groups
  • Import Old recordings



  • Burn latest img to SD Card
  • Connect using Keyboard + HDMI, change password
  • Update network settings to use DHCP (dhcpd.conf), update hostname +hosts
  • Use raspi-config to expand partition size
  • reboot, connect using ssh
  • Use raspi-config to upgrade stuff
  • Add sipgate, localphone, freespeech as Voip External Lines
  • Add mobile & gigaset as extensions
  • Add basic Outgoing Call Routing
  • (Update and Upgrade packages)
  • Install g729 (
  • Install ddclient & add freedns domains, add ‘externhost’ to sip.conf
  • Install samba, create /srv/ binds to /etc/asterisk /home/backups
  • Install Oak R2 board, get PSTN incoming working
  • Upgrade and rebuild dahdi
  • install fail2ban


  • Create least cost routing
  • Add Contacts to DB
  • Filter incoming calls using contacts

Sonoff Basic

To load with EasyESP:

      • Open Unit
      • Solder 4 pin header to serial header
      • Connect USB to Serial cable to header
      • Close Case
      • Hold down button and Connect Power In
      • Using latest firmware run

sudo python --baud 115200 --port /dev/tty.usbserial-FT2IXHL0 write_flash -fm dout 0x0000 ../20191130/bin/ESP_Easy_mega-20191130_normal_ESP8285_1M.bin

      • Power off unit
      • Open case
      • Remove serial cable from header
      • Close Case
      • Power On
      • Change WIFI to ESP_Easy_0 (password: configesp)
      • Configure Unit