ISKRA MT381 energy meter compatibility
MatejsLab opened this issue · 4 comments
Hi, this project seems interesting, I am planning to integrate the Iskra energy meter into Openhab.
How do I know if my energy meter is compatible with your software?
My meter has IR ports with a magnet ring, but the model seems different.
I actually already measure just current with CTs to prevent overloads of mains fuses.
I would like to send the 15-minute consumption, active tariff, and warning flag "grid transformer overload" if it exists.
Our electric company set up a new plan with 5 tariffs and 3 of them change in a day, 2 are winter and 2 are summer only, and one is the baseline. I could guess with Openhab based on time what tariff is on but it is cheating it may be false.
Now they announced a new flexible contract where you get a cheaper tariff if you turn off loads at peak demands, but it is dumb as they expect me to fiddle with unplugging devices manually in 15 minutes when I get an SMS or Mail to get a bonus. I have openhab to do this, to manage with dryers and boilers w smart plugs and dial down smart heating.
Maybe just point me out if smarting the energy meter is useful for that, or it cant be smartened to tell that grid load indicator and my 15-minute energy rate that my energy company talks all over the place that smart meters can do but not how I can use it to control my smart heating for example.
Thanks in advance
Matej
Hi Matej,
Cool that you're considering using this.
How do I know if my energy meter is compatible with your software?
You don't =)
On the internet, I found a me162_technical_description.pdf
PDF:
ME162
Single-Phase Electronic Meter
Technical Description
Version 1.1, 02.06. 2006
With among others this text:
The relevant bits are documented at the top:
pe32me162ir_pub/pe32me162ir_pub.ino
Lines 1 to 44 in e3394b0
There's an initial connect readout sample here:
pe32me162ir_pub/pe32me162ir_pub.ino
Lines 645 to 656 in e3394b0
I also have a Python version here: https://github.com/wdoekes/pe32me162irpy_pub
It is not as well documented, but it is written in Python, so it might be easier to hack/extend/change. You can use that if you're testing on a laptop/raspberry, instead of on an ESP.
I would like to send the 15-minute consumption, active tariff, and warning flag "grid transformer overload" if it exists.
Hard to tell whether that exists. The ME162 has the following EDIS/OBIS codes for readout:
There is no such thing as a 15-minute consumption there. Only the "current" positive/negative cumulative values (1.8.x and 2.8.x). And it has no mention at all of what the active tariff is. Although the latest change in any of the 1.8.x or 2.8.x. values should give you a clue which one is active.
I think this might be your manual: https://www.telematicasistemi.it/it/documents/_01.category/manuali/Mx381_User_manual_eng_V1.01.pdf
It looks way more advanced than my device.
It's likely that the same protocol is supported:
The EDIS/OBIS codes are scattered throughout the document: 1.8.0, 90.7.0, etc..
I think from "Annex 1: MT381 object list" and downwards, you have a boatload of these OBIS codes. Among those 0-0:96.14.0.255
("Currently Active Tariff") and the aforementioned 1-0:1.8.0.255
("Active Energy Plus").
The 0-0
vs. 1-0
probably specifies which internal device this code is for. At login time, the "default" device is selected here:
pe32me162ir_pub/pe32me162ir_pub.ino
Line 331 in e3394b0
I think you'll need to write /?0!
to talk to device 0 and /?1!
to talk to device 1.
In the Python version, that would be here: https://github.com/wdoekes/pe32me162irpy_pub/blob/a7ccc15ab079cc323bd7b96adf6188a4e0b28891/pe32me162irpy_pub.py#L437
You'll probably need to "log out" to switch between devices:
pe32me162ir_pub/pe32me162ir_pub.ino
Lines 447 to 452 in e3394b0
With these parts you might be able to:
- log in on dev 0
- fetch the currently active tarrif; push value to openhab
- log out
- log in on dev 1
- fetch the current readings from 1.8.x for 15 minutes (or less if you don't know when the tariff changes); push delta to openhab
- log out
- repeat
Good luck!
Walter
To add some info, I'm using this program with a ME372 meter and it works fine. My meter doesn't publish much data though, especially not the instant consumption.
Here is what I have :
[ISK5\2ME372-2102]
C.1.0(xxxxxxxxx) // Meter manufacturer number
0.0.0(xxxxxxxxx) // Meter serial number
1.8.0(029809kWh) // Total imported active energy
2.8.0(000000kWh) // Total exported active energy
128.20.0(020) // GSM signal status (15-20 = 2 bars)
128.20.1(015) // GSM Status
!
The IR probe is not sold any more by the Danes as a kit (I think I was the last to order one), but the components are very common and easy to source on Ali. The PCB schematics are still available and can be used to order the PCB on JLCPCB or PCBWAY. The enclosure can be 3D-printed (the STL is on the Danes website and there is even an improved version with space for a Wemos on Thingiverse, https://www.thingiverse.com/thing:4437840)