Single phase Din rail Smart Switch with Energy monitoring zmai-90

Thanks dude!
I think my unit is defective or my wiring is off, I’ll keep testing.
Happy new year! and thanks again for the hard work!

@ilan, you may want to take a look at MQTT and the retain settings. I’ve had what appear to be similar behaviours. The MQTT retain settings are the likely culprit. You may want to take a lot at this post I did on that topic:

Happy New Year!

That was one of the first things I checked, I made sure to clear up any MQTT messages pertaining to the switch.

The issue is the relay inside the switch was not completely disengaging when set to ‘off’, I tested with a multimeter and there was still full current running thru. I think this was a dud unit, I will keep testing to make sure.
Meanwhile I have a different DIN rail switch doing my HVAC (https://www.aliexpress.com/item/33056004236.html?spm=a2g0s.9042311.0.0.27424c4dWk8UAD)
I still have it running stock tuya firmware, I’m nowhere near smart enough to figure out how to reverse engineer the tuya MCU.

1 Like

I’ve just ordered a couple of these… So can you now flash them OTA or do I need to get out my soldering iron? I’m confused :slight_smile:
Cheers

@MarkR

Tuya-Convert did the work!

Jarek

thanks… puts my mind at ease :slight_smile:

Hi, just to let you know that I also converted one of these with Tuya-Convert, last week.
Just follow @luis_teixeira tutorial.
I used the latest stable release of Tasmota, 8.1.0.

Cheers!

Hello both, did you use these setting and is that all you needed to do?

Yes,

Instalation:

exactly:

Then you need config your MQTT sensors as explained here:

I use 3 submeters ZMAi-90 for 3 phases and 4 Sonoff POW R2 to meter Washer, Dishwasher, Dryer and Fridge.

Results:

Jarek

2 Likes

amazing reply thank you… I’m going to use this to monitor the workshop/studio.

has anyone else noticed if you press the button on the zamai-90 it loses wifi and you have to reset and start again?

in fact, I could do 4 short presses to enter the wifi SSID/password, both were correct now I get nothing from it at all… All I did was press the button on it and it has gone mental.

EDIT, turned off for 30 minutes and back on and I am able to configure again. annoying, will never press the button again :slight_smile:

hello, you updated a tasmota 8.2.0 and now all my sensors have unknown status, the switch works properly, any ideas on this?
I think it was tasmota because I updated yesterday, today was when I saw that the sensors do not register any value.
Greetings and thank you

Hi,

I’m from begining on Tasmota 8.1.0.2 and all work as expected. I do not plan to upgrade till I’ll have serious reason.
I suggest if rule1 is on and works. Simply lot to Tasmota web console and and check if you see serialsend in log. In case you are not seeing it simply repeat last step of configuration:

  • in the Tasmota console type:
    Rule1 on System#Boot do RuleTimer1 10 endon on Rules#Timer=1 do backlog SerialSend5 fe010f080000001c; RuleTimer1 10 endon
  • next, enable the rule by typing:
    Rule1 1

Hope it helps,
Jarek

Hi, thanks for answer, I did it already and same yet
I supose was tasmota update but I’m not sure at all
update:
after downgrade to 8.1.0 and the switch would stop working (my face was pale), and looking at the console everything seemed to be fine, I changed the topic, reset the device, everything remained the same until the mosquito addon stopped and I started it again … finally everything returns to normal, I can now sleep peacefully
I mention it here as a bad experience, in case someday can help to someone

Thanks for the information. I’m waiting for three to arrive. So I’ll flash them with 8.1 and not 8.2 :slight_smile:

Yes, the issue is that after release 8.1.0 they no longer put the hex value between quote marks:

-    Response_P(PSTR("{\"" D_JSON_SERIALRECEIVED "\":\"%s\"}"),
-      (Settings.flag.mqtt_serial_raw) ? ToHex_P((unsigned char*)serial_in_buffer, serial_in_byte_counter, hex_char, sizeof(hex_char)) : serial_in_buffer);
+    bool assume_json = (!Settings.flag.mqtt_serial_raw && (serial_in_buffer[0] == '{'));
+    Response_P(PSTR("{\"" D_JSON_SERIALRECEIVED "\":%s%s%s}"),
+      (assume_json) ? "" : """",
+      (Settings.flag.mqtt_serial_raw) ? ToHex_P((unsigned char*)serial_in_buffer, serial_in_byte_counter, hex_char, sizeof(hex_char)) : serial_in_buffer,
+      (assume_json) ? "" : """")

This means that you need to parse assuming that quote marks are not present. E.g.:

{"SerialReceived":FE01083233000050230000402211000050000004392600521300008241260000100000CF}

you mean that changing the value_template of the sensors would work in 8.2.0?

Yes, that would work. Apparently the new code is able to detect if you are receiving a json body or not, conditionally adding the quotation marks but I haven’t seen how that works exactly…

Cheers

1 Like

Fyi, the issue was fixed:

if you can, please build from development and give it a try.

Cheers

I’m sorry, but I dont know how do it