For those who, like me, wants just the ON/OFF functionality of a Sonoff mini r2 AND was not able to install Tasmota in it (what a failure ... shame on me!), this is a basic driver to use the switch capability of this device using Sonoff's DIY mode.
The driver and documentation can be found here:
It is available to install using HPM (Hubitat Package Manager - awsome app!). Note: Waiting for the incorporation of this package into HPM - in a few days it will be available.
I would prefer using Tasmota, but, believe me, it took me LESS time to develop this driver than the time I spent trying, over and over, to install Tasmota in it - not Tasmota firmware problem I can assure. It is that the device was not helpful at all! So, I gave up and this driver is my last resort to use my Sonoff mini r2 in my home.
I would like to suggest that, anyone who wants to further develop this driver, please contact me using a PM. I'd be glad to incorporate new functionalities developed by others or even relinquish control over it.
Can I ask if there are any plans to update the driver to allow the startup state to be changed. This would mean that whenever the device is turned on it would deliver power without having to connect to wifi and then be turned on.
It seems that he Sonoff DIY Tool uses mDNS service to get the device switch changes and, as far as I know, the Hubitat hub doesn't support it - at least not yet. So, without HE support for mDNS will be not possible to implement it.
I'm doing some tests here to find a way to overcome this limitation.
However, with the current tools available by the Sonoff's side, the only way of dealing with it would be inquiring the device periodically and it could potentially overload the HE hub.
One of the things I'm doing is to optimize the code to the max so it could - potentially - cause the minimum overhead possible.
Also, I plan to allow the user to:
Configure the frequency of the device pooling
Configure a schedule where different pooling frequencies could be established throughout the day