News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Consumer Unit Wifi / Bluetooth Energy Meters

Started by crankshaft, Mar 29, 2022, 02:01 AM

Previous topic - Next topic

crankshaft

Hello all;

Just wondering whether any of you have experience in purchasing / installing a bluetooth or wifi energy monitor on the incoming Consumer / Distribution unit ?

I am considering using: Wifi 60A Smart Power Monitor and most likely communicate with it using a raspberry PI which also handles lots of other home automation and MQTT data.

Details of the unit can be found here: ZMAI-90

Interested to know if anyone has done this, and if so with what devices and any recommendations you may have ?

Thanks


shantanu@india

Maybe you can use a standard energy meter with RS485 modbus port coupled to a ESP8266 based module.
This would cut down your cost.
Regards
Shantanu

crankshaft

@shantanu@india - Thanks, cost is not really a concern in this case, the din-mount devices are within my budget.

RGV250

Hi,
I have an Eco-Eye https://www.eco-eye.com/product-monitor-smart-pc
I found it a bit unreliable for me as the logging unit is a long way away from the CT / transmitter. I did a display using Node Red with a Raspberry Pi but was not 100% happy with that. Now looking at a few other options for the logging side.

Bob

Giuseppe MPO

Quote from: shantanu@india on Mar 29, 2022, 05:57 AMMaybe you can use a standard energy meter with RS485 modbus port coupled to a ESP8266 based module.
This would cut down your cost.

@shantanu@india  i am very interested in being able to connect an ES8266 via RS232 or RS485 connection to be able to connect various cards with PIC to a home automation system. I am trying to learn and operate a Raspberry PI 4 board with Home Assistant, do you have a FW for ESP to do this?

crankshaft

@RGV250 - Bob, that's interesting, I had a look at that product via the link.

I have just ordered some split core current transformers to play with, have never used them before but presume that I can just measure their output using analog/digital port, and then it's just a case of measuring current / time to calculate power usage.

I have also ordered a couple of the ZMAI-90, which are sold via ali-express, ebay, amazon etc etc but seem to be OEM originally manufactured by TUYA.

These devices are WIFI, but not sure at this stage if they are configured in STATION or ACCESS-POINT mode.

If AP mode, and my RPI is already connected to the wifi network, then connecting to it would be a problem, and I have not found any bluetooth/BLE alternatives.

I guess I could use a ESP32 to create a gateway between the WIFI of the monitor and convert that to BT/BLE connection, or just use the ESP32 to connect directly to a Split Core Current Transformer.

I guess, I am thinking out aloud here, and just trying to figure out what is more practical / reliable.

Giuseppe MPO

@crankshaft to know the real energy consumption you can't just measure the current and the voltage, you have to consider the phase shift between voltage and current, otherwise you measure the reactive power and not the real one.

shantanu@india

Quote from: Giuseppe MPO on Mar 29, 2022, 02:48 PM@shantanu@india  i am very interested in being able to connect an ES8266 via RS232 or RS485 connection to be able to connect various cards with PIC to a home automation system. I am trying to learn and operate a Raspberry PI 4 board with Home Assistant, do you have a FW for ESP to do this?
Guiseppe,
I hope you are comfortable with micropython running in esp devices. Just a few lines of code and you have a working home automation system with 10 digital inputs/outputs and one analog input working as a webserver in the home Wi-Fi environment.Alternatively you can use http methods to upload status/states to your own webserver running in the cloud. Just four dollars for a working product.
Regards
Shantanu

keytapper

I'd like to say that MicroPython works like a charm with ESP. The serial port is rather unmanageable when used with AT commands, which is one of the optional system loaded.
Ignorance comes with a cost

Giuseppe MPO

Unfortunately I don't know MicroPython, I will have to learn it. I thought of simply putting an ESP8266, then via MQTT or other, connected in serial with my cards with PIC and putting my data online.

shantanu@india

#10
Quote from: Giuseppe MPO on Mar 30, 2022, 03:34 PMUnfortunately I don't know MicroPython, I will have to learn it. I thought of simply putting an ESP8266, then via MQTT or other, connected in serial with my cards with PIC and putting my data online.
MicroPython is no big deal.The interpreter occupies just 0.6 Mb space in the 4Mb flash and writing code is a cakewalk since Python is simple and intuitive. But I still don't trust ESP in time critical or machine control application.. in such cases PIC remains my first choice.
An interpreter running inside a microcontroller is typically slow and you have very little control over the execution time. A typical example is machine.Timer() class which is used to create hardware interrupts. There is a propensity of simplest of codes to crash if there is a memory conflict between the main and the interrupt handler. Python allocates 'memory heaps' which are difficult to understand. The garbage collector is often of no help whatsoever and creates additional problems by destroying useful variables. Another example is the esp8266 watchdog. Once initiated by machine.WDT.init() you have very little control and it overflows after about 1.2 secs. For http methods this is often a bother since the server might take time to respond. All said and done, esp's running micropython are useful for fast IOT developments in noncritical areas since code compilation is not necessary. Testing and debugging becomes extremely easy.
Regards
Shantanu

keytapper

I agreed for the fact of crucial timing, micropython may not be the best candidate. So the competitor would be the wiring framework, which Arduino IDE will handle and possibly find a bunch of libraries.
For micropython, the libraries are somehow traslated from wiring one.
Ignorance comes with a cost

ChrisRowe

Hi,
I have used Shelly units for measuring / control ... https://shelly.cloud/

They do some units that can be mounted in a DIN rail consumer unit.

They are very versatile and can be used with Shelly Cloud or MQTT .

I currently have 24 of the units in my property controlling shutters ,lights and Underfloor heating system via Node Red and a raspberry pi as control.

regards
Chris