ITEAD has released a two newish devices in their Sonoff series (Sonoff Basic R3 & Sonoff Mini) which has an updated firmware that includes a new feature called “DIY mode” which when enabled deactivate the default eWeLink mode (cloud functionality) and instead activate a new official REST API from ITEAD meant for only local control via LAN.
ITEAD have named this new RESTful API API “Sonoff DIY Mode API protocol”, it looks to be released as open source and is designed for local control these newer Sonoff devices over a LAN network without using their cloud or going via the internet.
Hopefully, someone more skilled than I could write a dedicated Sonoff component for Home Assistant that uses this new official REST API from ITEAD which in turns could mean that people do not have to flash on a third-party firmware or use the cloud/internet to control their newer Sonoff devices with Home Assistant in the future.
https://www.itead.cc/sonoff-mini.html
Sonoff Mini product page reads: “It supports the DIY mode (designed for developers) which allows users to integrate MINI into worldwide third-party open source smart home control system to achieve LAN control without cloud service, such as Home Assistant, openHAB, ioBroker .etc.”
https://www.itead.cc/sonoff-basicr3-wifi-diy-smart-switch.html
Sonoff Basic R3 product page reads: “…it has a DIY mode that is the firmware can be user-defined. Built-in a web server that exposes the REST API, which allows you to connect the switch with your existing home automation system. Compatible with Vera, Fibaro, HomeSeer, Savant, Home Assistant, etc, for the protocol document and the code for the DIY Mode tool (updating), please go to Github”
To enable this “DIY mode” you actually have to open the device physically move a jumper switch on the circuit board, as per Sonoff DIY Mode API protocol document: