The StromLog is working by a RISC-Chip with WIFI support (ESP8266). The main function is to receive the protocols from meter as a SML-decoded digital data-stream. According of the meter-explanations from manufacturer will the StromLog extract delivered values.
For sending into an URL, those are two different protocols. One protocol is designed for a PHP-Script. This script received every values by http post. The other transmission is designed for influx database. Also the influx transmission is sending by post. Only the protocol-details are different.
For both protocols, data will be sending every quarter hour from StromLog to target-URL (0, 15, 30 and 45 min). Those are 96 protocols per day.
We using to sending encrypted data if the StromLog recognised in the target-URL a string like "encrypt". All data will be encrypt by hash-key created from user-name and password. The post-values are sending as usid and the encrypted data as data. As encryption is used AES128 GCM. The key (hash) will be generated by password and as salt is the user-name.
usid=userID&data=‹encrypted data coded by base64 are put into here›
The function sending encrypted data works just with PHP-Script. The calculation of hash key, what is using to encrypt data, we don't want to public it. Sorry for this inconvenience. By the way, if you use your own server into your own net, then isn't important to encrypt data, because the data don't will be send over external providers. The function to calculate the hash-key for encryption is an one way key and will drop bits in its calculations. Sorry, that we don't want to public our encryption functions!
If the StromLog recognised a string like "xyz.php" in the target-URL-string then it will be sending data to a php-script. Otherwise it's sending according influx-protocol.
Post-values are:
timestamp=actual timestamp by StromLog (seconds since 1970-1-1)
usid=userID what you input into the StromLog
bez1=actual value of actual meter-count for from-grid sum rate(dWh)
bez2=actual value of actual meter-count for from-grid rate one(dWh)
bez3=actual value of actual meter-count for from-grid rate two(dWh)
eeg1=actual value of actual meter-count for into-grid rate one(dWh)
pwa= actual consumption (W)
ul1=actual voltage of L1 (dV)
ul2=actual voltage of L2 (dV)
ul3=actual voltage of L3 (dV)
il1=actual curent of L1 (cA)
il2=actual curent of L2 (cA)
il3=actual curent of L3 (cA)
frq=actual Frequency from grid (dHz)
ip=the IP from StromLog in your isolated private net
dtzma=the meter-manufacture
dtzid=the meter identification-number
dtzname=the meter-name that your input into the StromLog-setup
All values from meter are sending as integer. The others as string.
Exemple: timestamp=1234567890; userID=123456789; bez1=4000000; bez2=1000000; bez3=3000000; eeg=2000000; pwa=109; ul1=23000; ul2=24000; ul3=22500; il1=10000; il2= 15000; il3=12000; frq=500; ip=0.0.0.127; dtzma=484c5; dtzid=00000A01484C59020001FDFF; dtzname=yourMeterName
Return-value comes from php-script is: "OK‹br›" and as http-status: 200 or what your script returned.
All this data are sending to the xyz.php. The php-script has to receive all those values and can save it into your database, if you want to use your own database. You can provide your own server, like a raspberry pi or everything else.
When no "xyz.php" into the target-URL is recognised all data will be sending as an InFlux-string.
Also all values are sending by http-post.
Those are two different values-types. The first one are immutable values, separated from the changeable values by space. Attentions: It is possible to put a space into the dtzname-value, but in this protocol that will be create an insufficient error in the protocol! The reason is, that influx used the space as an separator between immutable and changeable values. To avoid it, don't use a space in your meter-name (dtzname).
Immutable values are:
usid=ID
ip=local IP from StromLog
dtzma=manufacturer
dtzid=meter-ID
dtzname=your meter-name that your input into your StromLog
--- Now it's a space to separate immutable values from changeable values ---
pwa=actual power consumption between fromgrid and intogrid (W)
bez1=fromgrid sum divided by 10000 (kWh)
bez2=fromgrid rate one divided by 10000 (kWh)
bez3=fromgrid rate two divided by 10000 (kWh)
eeg1=intogrid divided by 10000 (kWh)
ul1=voltage L1 divided by 10 (V)
ul2=voltage L2 divided by 10 (V)
ul3=voltage L3 divided by 10 (V)
il1=consumption divided by 100 (A)
il2=consumption divided by 100 (A)
il3=consumption divided by 100 (A)
frq=frequency divided by 10 (Hz)
timestamp=actual time from StromLog (seconds since 1970-1-1)
All values those are divided by, are sending as type float with dot into it.
Example:
URL:yourURL or Server
POST:meinzaehler,usid=123456789,ip=0.0.0.127,dtzma=484c5,dtzid=00000A01484C59020001FDFF,dtzname=MeinZähler
(space)pwa=250.40,bez1=345.45,bez2=145.00,bez3=200.45,eeg=122.33,ul1=230.15,ul2=240.11,ul3=225.88,il1=1.05,il2=2.35,il3=5.55,frq=49.9,timestamp=1234567890
Return-value from influx is empty and as http-status: 204
Influx-Grafana-Example diagram: (This screen can you get also by mqtt-(io)Broker in combination with influx-database and grafana)
If you want to integrate the StromLog into your own system, you have the following option. When you call the StromLog by parameter http://IP-address/currentData, you get all values as a JSON string, like this:
{"timestamp":1652220254,"meterData":{"consumption":{"value":83,"unit":"W"},"FromGridSum":{"value":414062304,"unit":"dWh"},"FromGridA":{"value":0,"unit":"dWh"},"FromGridB":{"value":414062304,"unit":"dWh"},"FeedIn":{"value":0,"unit":"dWh"}},"electricsData":{"voltageL1":{"value":0,"unit":"dV"},"voltageL2":{"value":0,"unit":"dV"},"voltageL3":{"value":0,"unit":"dV"},"currentL1":{"value":0,"unit":"dI"},"currentL2":{"value":0,"unit":"dI"},"currentL3":{"value":0,"unit":"dI"},"freq":{"value":0,"unit":"dHz"}}}
or you can get all entries by GET http://IP-address/allData, than you get everything, like this:
{"userid":9,"meter":{"localip":"192.168.10.54","metername":"Messung Computerplatz","manufacturer":"EMH","meterid":"0000000004039FC8DE585E91"},"currentData":{"timestamp":1652220397,"meterData":{"consumption":{"value":84,"unit":"W"},"FromGridSum":{"value":414062338,"unit":"dWh"},"FromGridA":{"value":0,"unit":"dWh"},"FromGridB":{"value":414062338,"unit":"dWh"},"FeedIn":{"value":0,"unit":"dWh"}},"electricsData":{"voltageL1":{"value":0,"unit":"dV"},"voltageL2":{"value":0,"unit":"dV"},"voltageL3":{"value":0,"unit":"dV"},"currentL1":{"value":0,"unit":"dI"},"currentL2":{"value":0,"unit":"dI"},"currentL3":{"value":0,"unit":"dI"},"freq":{"value":0,"unit":"dHz"}}}}
If you needed only the actual consumption, then call http://IP-address/consumption. You get a JSON like this:
{"consumption":{"value":-930,"unit":"W"}}
All available Rest-End-Points can you get by this http://IP-address/help. Figure it just out. (Available upto Firmware 7.00)
This is available from Version 3.9 and higher (2022-05-01)
You can included into many systems, via polling service. Call the WEB-service and decode the JSON answer. In this case, the used-ID should be set as zero (0), but also you can used your own server and our service together too.
When you set the user-name as "sendJSON" then will be send the StromLog every quarter hour the JSON, like you get by option "/allData", to the registered address at field "Daten-Server". That is your server, where can decode the JSON and saving in your database.
Add in the "configuration.yaml" behind the entry "sensor:" following entries for the StromLog entireties. If there no entry "sensor:" then you have to add it before!
Only available from version: 3.9x of StromLog. Exchange "your.ip.of.stromlog" in the config below with your IP-address of StromLog from your network.
Config-Data:
Only available from version: 5.04 of StromLog.
Der StromLog empfängt und dekodiert die Zählerdaten von allen unterstützten Zählern. Diese werden dann im(W)LAN als JSON-String für den ioBoker bereitgestellt. Damit ist jeder Zähler, der durch den StromLog ausgelesen wird, kann auch mit dem ioBroker ausgelesen werden. Und das über WLAN ohne USB- oder Serial-Kabel.
Im ioBroker ist die URL "STROMLOGIP/json.txt" mit der Option "JSON-Format for EFR SmartGridHunb" ohne Nutzer und Passwort einzutragen. Dann können die Daten im ioBroker ausgelesen werden.
- Der JSON String für den ioBroker ist so aufgebaut:
Einstellungen / Visualisierung:
Only available from version 6.00 of StromLog.
There is now a MQTT integrations in StromLog implemented. The function can turned on of setup. Is is nesseccary to enter the IP-address of broker into setup. Every second will send a JSON to broker like this:
{"U1":2377,"U2":2386,"U3":2440,"I1":148,"I2":98,"I3":714,"FQ":500} for electrics data and
{"PS":-1842,"P1":0,"P2":0,"P3":0} for consumptions of sum, L1, L2 and L3
Every two minutes will the StromLog send:
{"A0":12345678,"A1":123,"A2":456,"B0":87654321} A0 is OBIS 1.8.0, A1 is OBIS 1.8.1, A2 is OBIS 1.8.2 and B0 is OBIS 2.8.0
As path to broker is send: StromLog/xyz/electrics, StromLog/xyz/watt and StromLog/xyz/kwh. xyz mean your meter-name what is set on setup.
Up to firmeware-version 6.01 will be using a separated user and user-PW for MQTT login. That allowed different logins for server and brokers. You can using also different logins for both options. Server is using the regular user and user-pw and MQTT using the separetad logins, entred into the MQTT option. Also you can set the port of broker up to firmeware 6.01.
- Example of JS script for implementation into ioBroker
- Example of YAML implementation into Home-Assistant
Useful tips and tricks can you find here: External link to smarthome-tricks.de.
The hardware based on a chip ESP8266. This MC receive on the serial-port the data-stream from meter. The meter transmit its data per IR-light continuously every 1..60 seconds. Our IR optocoupler receive this IR light and exchange it for a serial stream in order to send it to the serial interface of the MC. The MC decode this stream and collect some selected values. After decoding values it will prepare for send to our or your database, using http-protocol. That happens every quarter hour. In result there are 96 http-protocols per day.
Circuit diagram (only for mME):
The last but not actual software can you find and download here:
Description and software for Arduino.
Important to know, all encryption functions we don't public it and is not part of our publishings... sorry. Without encryption isn't without contact to us impossible to use our data base and you have to use your own data base server. In additions we can provide our service without encrypted protocols too, but we have to programming an extra entry. If you want it, then must you contact us by email. Attention, then could it be that we demand some cost from you, for our service.
Globale Header-Datei (Anschlüsse und Zählertyp festlegen)
Einstellungen speichern Header-Datei
Interne Anzeige des Diagramms Header-Datei
OTA Firmware-update Header-Datei
Protokoll Dekoder für SML-Zähler Header-Datei
Protokoll Dekoder für DIN-Zähler (alte Norm) Header-Datei
Protokoll Dekoder für EBZ-Zähler (alte Norm) Header-Datei
Protokoll Dekoder für EBZ-Zähler (Serial 7E1) Header-Datei
Protokoll Dekoder für LG-E320-Zähler Header-Datei
Protokoll Dekoder für LG-E350-Zähler Header-Datei
Protokoll Dekoder für ISKRA-MT174-Zähler (alte Norm) Header-Datei
Protokoll Dekoder für ZE311-Zähler (alte Norm) Header-Datei
Protokoll Dekoder für PAFAL-EC3-Zähler (alte Norm) Header-Datei
Protokoll Dekoder für Zähler, die mit mBus Daten liefern Header-Datei
All the data above and it's protocols, we are using to provided for all users just his own data and save the values into our database. Our goal is it to provided the values to show and displayed for you without to managed your own server. The only thing is it, for your cheap cost we managed your data collect for grid optimization and database-cost, but without relation to the single user. The user-private-data are just for this user!
System-Overview