Home Automation - Smartkit

Does the ZMAi-90 have a manual override -- i.e. can you turn it on/off from inside your DB?


Can you switch them using a button or something without an app / Home Assistant?
In the original version described in the blog post the button appears to have been attached to GPIO13 because the author uses that for a button input in his template. In the current version that doesn't seem to be the case any more. I don't measure continuity between either side of the button and GPIO13, and the PCB trace from the switch appears to go to an RC debounce combo and then bugger off under the LCD, presumably through a via to the V9821.

Pressing the button on mine doesn't toggle power and doesn't report any discernible change in state via TuyaReceived in Tasmota. Pressing and holding, which would put the device into Tuya pairing mode with the original firmware, does seem to knock the device off the network and cause the WiFi LED to blink, so presumably that's sending some TuyaMCU instruction to the ESP, but it didn't show up in the Tasmota console with WebLog 4. It doesn't reset Tasmota to default config like a looooooong press of Button1 would.

In short: If you really wanted to control it locally, you could probably hack the hardware to reroute the button to an unused GPIO on the ESP module instead of to the V9821, but as it stands switching is only available via external control.
 

Attachments

  • 2020-12-29 15.13.51.jpg
    2020-12-29 15.13.51.jpg
    1.1 MB · Views: 40
The ZMAi-90 is relatively easy to flash with Tasmota. See https://www.creationfactory.co/2019/12/reverse-engineering-zmai-90-din-rail.html for flashing instructions. The versions currently shipped by Banggood use TuyaMCU comms between the V9821 and the ESP in the Tuya module, so you don't have to capture the raw comms data as detailed in that blog article. There's a simple template and Tasmota setup details at https://templates.blakadder.com/ZMAi-90.html

The ZMAi-90 claims a 60A maximum current, which looks pretty plausible given that the relay is rated 80A - plenty for most applications even when applying a safety derating factor based on its country of origin. Other things I like about it are that it uses a bistable relay, so the coil only consumes power while changing state, and that the current shunt is integrated into one of the beefy legs of the relay itself rather than using a surface mount resistor like so many other power monitors. That means you're never pushing your full load current through a tiny sliver of copper on the PCB.

The LCD and button are run by the V9821 and remain functional when you flash the ESP with Tasmota, so you get the bonus of voltage, current, power and cumulative energy readings on the LCD and an impulse LED that gives you a visible indication of power even at a distance if you aren't close enough to read the LCD.
thanks @zarf - you seem to know the ZMAI-90 well:thumbsup:
As mentioned, I have 3 of them and the only disadvantage to the POW-R2 that I've noticed, is lack of local switching and I haven't found a way to download a csv file with measurement history - I'm too supid to flash them, even if that would solve the csv problem
 
They're definitely worth Tasmotising. I have several, but the first one I bought as a test is still running the original Tuya firmware because it got installed before I'd figured out how easy it was to flash. I have access to its power readings via TuyaLocal, but I hate not having control over how often I get power readings. Fortunately the power it's measuring (my whole office sub-DB) is relatively constant, but flashing it is definitely on the to-do list. For my newer Tasmotised units I use a combination of PowerDelta and a rule-driven dynamic TelePeriod to make sure that they report in as soon as the geyser starts or stops drawing power.
These look really great and feature rich, especially the seriously high current switching and monitoring. They seem about the same price as the Astute. In the end they actually cheaper considering the effort required to Tasmotise the Astute. If I had to start over I’d probably go this route. Thanks for the headsup
 
In the original version described in the blog post the button appears to have been attached to GPIO13 because the author uses that for a button input in his template. In the current version that doesn't seem to be the case any more. I don't measure continuity between either side of the button and GPIO13, and the PCB trace from the switch appears to go to an RC debounce combo and then bugger off under the LCD, presumably through a via to the V9821.

Pressing the button on mine doesn't toggle power and doesn't report any discernible change in state via TuyaReceived in Tasmota. Pressing and holding, which would put the device into Tuya pairing mode with the original firmware, does seem to knock the device off the network and cause the WiFi LED to blink, so presumably that's sending some TuyaMCU instruction to the ESP, but it didn't show up in the Tasmota console with WebLog 4. It doesn't reset Tasmota to default config like a looooooong press of Button1 would.

In short: If you really wanted to control it locally, you could probably hack the hardware to reroute the button to an unused GPIO on the ESP module instead of to the V9821, but as it stands switching is only available via external control.
It's a bit of a pity, but I guess you would probably do better to include this in-line after a normal circuit breaker in any case, and use the normal CB to actually switch off the whole thing in case of emergency.
 
It's a bit of a pity, but I guess you would probably do better to include this in-line after a normal circuit breaker in any case, and use the normal CB to actually switch off the whole thing in case of emergency.
Yup - that's exactly what I've done - in the case of the geyser I've retained the original 20A CB to provide the over current protection. The same approach seems prudent regardless of what you use as your smart switch - AFAIK none of the options I've seen discussed here have any form of over current breaking functionality. If you trust a Tasmota rule to react quickly enough you might be able to duplicate the slow-trip functionality of a breaker (eg: Most 20A breakers don't trip immediately if you draw 20A, but they would trip much more rapidly at a higher current caused by a short) but for compliance reasons I've always wanted the original CB doing its job, while my smart stuff does switching and power measurement.

I have some of these "WiFi circuit breakers" too - https://www.banggood.com/MoesHouse-...Control-with-Alexa-Google-Home-p-1611291.html - they claim to have overload protection and have the hand feel of a really solidly built breaker (probably the least Chinese feeling smart devices I've bought) but even if you trust their overload trip functionality they don't come in a rating below 63A which is way too high, so I've kept original CBs in line with them too. If you want high current switching and can live with Tuya, they're great, but I much prefer Tasmota so I'll probably swap them out at some point. They have no current measurement capability so wherever I've used them I've needed PZEM-004 modules for power measurement too.
 
Yup - that's exactly what I've done - in the case of the geyser I've retained the original 20A CB to provide the over current protection. The same approach seems prudent regardless of what you use as your smart switch - AFAIK none of the options I've seen discussed here have any form of over current breaking functionality. If you trust a Tasmota rule to react quickly enough you might be able to duplicate the slow-trip functionality of a breaker (eg: Most 20A breakers don't trip immediately if you draw 20A, but they would trip much more rapidly at a higher current caused by a short) but for compliance reasons I've always wanted the original CB doing its job, while my smart stuff does switching and power measurement.

I have some of these "WiFi circuit breakers" too - https://www.banggood.com/MoesHouse-...Control-with-Alexa-Google-Home-p-1611291.html - they claim to have overload protection and have the hand feel of a really solidly built breaker (probably the least Chinese feeling smart devices I've bought) but even if you trust their overload trip functionality they don't come in a rating below 63A which is way too high, so I've kept original CBs in line with them too. If you want high current switching and can live with Tuya, they're great, but I much prefer Tasmota so I'll probably swap them out at some point. They have no current measurement capability so wherever I've used them I've needed PZEM-004 modules for power measurement too.

I hear you and agree. Just a problem that DB board space is mostly limited -- and I already have two external surface mounted DB boards!
 
Apparently. When I see Tuya my mind generally goes blank.



Yup it does and it’s virtually identical to the Sonoff ones just maybe on a much longer wire so I did plan to see if I can make use of it, but just in case I can’t due to wiring or sensor type rather spent the R99 for the Sonoff one which I know will work and plugs in without fail.

But on the topic is there any kind of “offline” intelligence in Tasmota to use sensor data to force the relay off? I mean along the lines of “if temperate reaches 70, turn relay off” just in case of say MQTT or Home Assistant connectivity failure to have it turn off the relay as a fail safe.
use node red paired with the Tasmota sensor via MQTT for that if temp X do Y.
the sonoff will still need power... so use says RPi, powered from the same source as the sonoff, I got all my sonoffs etc powered from my essential rail on my DB that is powered from the Victron Inverter/batteries, so whatever Esom does they always have power, the electronics, as my Home Assistant is also the interface to my Paradox alarm, I've thrown InsiteGold/SWAN away,
G
 
Yup - that's exactly what I've done - in the case of the geyser I've retained the original 20A CB to provide the over current protection. The same approach seems prudent regardless of what you use as your smart switch - AFAIK none of the options I've seen discussed here have any form of over current breaking functionality. If you trust a Tasmota rule to react quickly enough you might be able to duplicate the slow-trip functionality of a breaker (eg: Most 20A breakers don't trip immediately if you draw 20A, but they would trip much more rapidly at a higher current caused by a short) but for compliance reasons I've always wanted the original CB doing its job, while my smart stuff does switching and power measurement.

I have some of these "WiFi circuit breakers" too - https://www.banggood.com/MoesHouse-...Control-with-Alexa-Google-Home-p-1611291.html - they claim to have overload protection and have the hand feel of a really solidly built breaker (probably the least Chinese feeling smart devices I've bought) but even if you trust their overload trip functionality they don't come in a rating below 63A which is way too high, so I've kept original CBs in line with them too. If you want high current switching and can live with Tuya, they're great, but I much prefer Tasmota so I'll probably swap them out at some point. They have no current measurement capability so wherever I've used them I've needed PZEM-004 modules for power measurement too.
use the Tasmota/sonoff (I use a sonoff 4channel) only as a smart switch, driving a contractor (I have 4 for some of my non essential circuits),

I still have my contractor sitting next to a normal CB (this pairing of contractor and CB, i have for each of the 4 non essential circuits), so if you look at my rail it has a CB, then a contractor, and then wire leads off to a sonoff thats off board, got a nice 500x500 wooden board next to my electrical panel, on which my sonoff4, and some RPi's are all mounted including a 5 port hub, into which I hard wired everything including my inverted, from where I then run one line to my main switch/network cabinet.

G
 
I hear you and agree. Just a problem that DB board space is mostly limited -- and I already have two external surface mounted DB boards!
... when I fitted the inverter I had my DB re-wired, with a surface mount unit, we cut the back of the box out and fitted that over the hole where the old DB was,
My unit is now a 3 rail box, Power in, main isolator, main EL, CarloGavazzi and something else on rail 1, Rail 2 is a rail 2 isolator, rail 2 EL, output to Inverter followed by the above 4 pairs of EL+Contactor
Rail 3 is a Isolator, rail 3 EL, Inverter input isolator and then all my essential circuits,
with this setup I created enough space per rail and nicely grouped everything.
ended costing my R1000 for the sparky to do, took him maybe 2 hours/max.
G
 
use node red paired with the Tasmota sensor via MQTT for that if temp X do Y.
the sonoff will still need power... so use says RPi, powered from the same source as the sonoff, I got all my sonoffs etc powered from my essential rail on my DB that is powered from the Victron Inverter/batteries, so whatever Esom does they always have power, the electronics, as my Home Assistant is also the interface to my Paradox alarm, I've thrown InsiteGold/SWAN away,
G

Nah Node Red can also go offline so don’t want more reliance.

But it was pretty easy to make a rule to turn off relay off temperature hits 65. Tasmota also has a built in function it seems to reboot if the sensor disconnects for some reason.
 
... when I fitted the inverter I had my DB re-wired, with a surface mount unit, we cut the back of the box out and fitted that over the hole where the old DB was,
My unit is now a 3 rail box, Power in, main isolator, main EL, CarloGavazzi and something else on rail 1, Rail 2 is a rail 2 isolator, rail 2 EL, output to Inverter followed by the above 4 pairs of EL+Contactor
Rail 3 is a Isolator, rail 3 EL, Inverter input isolator and then all my essential circuits,
with this setup I created enough space per rail and nicely grouped everything.
ended costing my R1000 for the sparky to do, took him maybe 2 hours/max.
G
Jeez, just to change earth switch they want R1500 and changing whole DB they want R10 000 or more!
 
get yourself a dif sparky.
but then mine is also interested in HomeAutomation, so this was like a project for us, get the board swopped out to accept the Inverter setup, I got a OpenEnergyMonitor also with current clamps so needed space, and then the contractors etc.
G
 
... allot of these switches you can do yourself, swop one out for another... they all wire the same, flip the main Isolator... switch everything off and go for it.
G
 
... who here has been able to flash a Sonoff mini (new unit without the DIY pin, and EWLink FW 3.6.0) with Tasmoto ?
Need some assistance.
G
Hi. I found that I had to flash using the serial method. The OTA just bombs out.
 
ye... but my fat fingers is not allowing me to solder on the wires, already destroyed 2 mini's...
make that 2 units physically damaged,
1 unit bricked via the OTA method,
leaving the last unit in DIY mode atm.
G
 
ye... but my fat fingers is not allowing me to solder on the wires, already destroyed 2 mini's...
make that 2 units physically damaged,
1 unit bricked via the OTA method,
leaving the last unit in DIY mode atm.
G
I did have to resort to a super fine tip on the soldering iron. Then check with a magnifying glass before switching on. Not the easiest flash I've done. Got it waxed now. Did 20 units the other day and took about 45 min to do them. I am still trying to figure the OTA solution. I was also able to serial flash the units I bricked by using OTA and they recovered.
 
Top
Sign up to the MyBroadband newsletter
X