Controlling a BrilliantSmart Tuya based smart switch

223 views
Skip to first unread message

Terry Wood

unread,
Jan 5, 2022, 4:47:21 PM1/5/22
to Automate
Hello,

I've been looking at using Automate to control a BrilliantSmart smart plug to turn a charger on and off.   What I wanted to do was use automate to detect battery level <10% and turn on the charger, when it gets to 80% turn off the charger.

Where I'm running into trouble is working out how to have automate send the on and off commands to the smart plug.

If I choose App Start and then pick activity the package Brilliant Smart (com.brilliantlighting.brain) there are many dozens of things listed like com.tuya.device.base.info.activity.IconChooseActivity.   From here I am lost in how to pick the right options in actions etc.     Googling around I discovered that this device is based on Tuya IoT but I've been able to dig up much more helpful information.

If i can just crack this, Automate would be awesome at controlling switches and lights directly like this but its a bit over my head and I'd appreciate any assistance.

Cheers.

T.


L.Schmidt

unread,
Jan 5, 2022, 5:39:26 PM1/5/22
to automa...@googlegroups.com
Am Wed, 5 Jan 2022 13:47:21 -0800 (PST)
schrieb Terry Wood <te...@woody.net.au>:

Not sure whether this is much help to you, but in the general context
of switching power sockets with automate I'm using sispmctl controlled
devices, with good success: about 20 sockets automatically switched
by different means, including mobile devices. sispmctl is the small
program able to operate on the sockets, and even my (OpenWRT reflashed)
wifi router can do that.

Example of sispmctl compatible devices are the gembird/energenie
eg-pms* power rails, which pack 4 individually switchable sockets into
one power rail. The come with USB, ethernet and wifi connectivity. I'm
using exclusively the USB variants.

But for merely switching charger of mobile device off at a certain
charge level, and on again when below another level, I've moved away
from switching grid power to the charger several years ago
already: several software solutions exist (admitting charging
voltage is software controllable by relatively modern mobile
device hardware), which allow you to set the charge level hysteresis for
enabling/disabling power.
That's easier because this works with any charger, anywhere, without
the need to tell automate somehow when it is allowed to control charger
(it won't help if Automate finds that charging is needed and turns on
the charger, while it may not even be connected to it.

L.Schmidt

unread,
Jan 5, 2022, 6:00:21 PM1/5/22
to automa...@googlegroups.com
Am Wed, 5 Jan 2022 13:47:21 -0800 (PST)
schrieb Terry Wood <te...@woody.net.au>:
Sorry, I forgot to name apps implementing software control of charging
power switching: the two which I found to work nicely (others I
haven't tried as I found two functional options sufficient) are
ACC (Advanced Charging Controller), a module running with Magisk,
and the Charge Voltage Limiter which is part of 3C tools, a bit hidden
in there and not immediately evident that such a feature exists in that
tool kit: In Settings -> Battery -> Tweaks -> Charge Limit (and,
charge limiting method, below, too). ACC worked on every device I
tried it on yet, 3C tools on all but a Nexus 5. (about 10 to 12
different devices tested).

Henrik "The Developer" Lindqvist

unread,
Jan 6, 2022, 5:50:40 AM1/6/22
to Automate
Automate has no built-in support for the variety of "smart home" appliances, as most lack public APIs. If they do have an public API, then the HTTP request block usually suffice to access it.
Reply all
Reply to author
Forward
0 new messages