Auslesen, entschlüsseln und parsen von Smart Meter Telegrammen

Overview

Netz-NÖ SmartMeter-P1-Reader

https://www.netz-noe.at/Download-(1)/Smart-Meter/218_9_SmartMeter_Kundenschnittstelle_lektoriert_14.aspx

Dieses Skript entschlüsselt Telegramme (DLMS) von der P1 Schnittstelle eines Sagemcom T210-D. Die Telegramme werden anschließend geparst und folgende Werte an einen MQTT-Broker gesendent:

  • kWh_in: Bezogene Energie in kWh (Gesamtwert)
  • kWh_out: Eingespeiste Energie in kWh (Gesamtwert)
  • pwr_in: Aktueller Verbrauch in Watt
  • pwr_out: Aktuelle Einspeisung in Watt

Installation:

  • Python libraries installieren (pip install -r requirements.txt)
  • Konfigurationsparameter im .env-File eintragen. Der KEY ist der Entschlüsselungskey, welcher von Netz-NÖ beantragt werden muss.
  • Falls das Skript nicht als root ausgeführt wird: Anlegen der Datei "/var/log/decrypter.log" (Setzen der Rechte auf die Datei nicht vergessen).

Beispiel-Konfiguration:

PORT='/dev/ttyUSB0'
BAUD=2400
KEY=XXXXXXXXXXXXXXXXXXXXXXX
LOGLEVEL=WARNING
MQTT_USER=mqttuser
MQTT_PASS=mqttpassword
MQTT_HOST='192.168.420.666'
MQTT_PORT=1883
MQTT_TOPIC='/haus/smartmeter/vals'

Run as a Service

  • Folgende Datei anlegen: /etc/systemd/system/smart.service
  • Die Parameter "ExecStart", "User" und "Group" anpassen nicht vergessen!
[Unit]
Description=Smart Meter Decrypter
Documentation=https://github.com/langi0815/Netz_NOE_SmartMeter_P1_Reader
After=networking.service
[Service]
Type=simple
User=pi
Group=pi
TimeoutStartSec=0
Restart=on-failure
RestartSec=30s
ExecStart=/usr/bin/python3 /home/pi/scripts/decrypter.py
[Install]
WantedBy=multi-user.target

Danach folgende Befehle ausführen:

  • sudo systemctl enable smart
  • sudo systemctl start smart

Mit folgendem Befehl kann überprüft werden, ob der Service ordnungsgemäß läuft:

  • sudo systemctl status smart

Falls es Probleme gibt:

  • sudo journalctl -u smart (nach unten scrollen nicht vergessen)

Verwendete Hardware:

  • BELTI USB-zu-MBUS-Slave-Modul (von Amazon)
  • RJ12 Kabel
  • Raspberry Pi

Für die Aufbereitung der Daten wird Hassio + Mossquito-Broker empfohlen

Beispielconfig der Sensoren (Hassio):

 - platform: mqtt
    state_topic: /home/smartmeter/vals
    name: SmartMeter_kWh_in
    value_template: "{{value_json.kWh_in}}"
    unit_of_measurement: "kWh"
    last_reset_topic: '/home/smartmeter/vals'
    last_reset_value_template: '1970-01-01T00:00:00+00:00'
    device_class: energy
    state_class: measurement
  - platform: mqtt
    state_topic: /home/smartmeter/vals
    name: SmartMeter_kWh_out
    value_template: "{{value_json.kWh_out}}"
    unit_of_measurement: "kWh"
    last_reset_topic: '/home/smartmeter/vals'
    last_reset_value_template: '1970-01-01T00:00:00+00:00'
    device_class: energy
    state_class: measurement
  - platform: mqtt
    state_topic: /home/smartmeter/vals
    name: SmartMeter_power_in
    value_template: "{{value_json.pwr_in}}"
    unit_of_measurement: "W"
    last_reset_topic: '/home/smartmeter/vals'
    last_reset_value_template: '1970-01-01T00:00:00+00:00'
    device_class: energy
    state_class: measurement
  - platform: mqtt
    state_topic: /home/smartmeter/vals
    name: SmartMeter_power_out
    value_template: "{{value_json.pwr_out}}"
    unit_of_measurement: "W"
    last_reset_topic: '/home/smartmeter/vals'
    last_reset_value_template: '1970-01-01T00:00:00+00:00'
    device_class: energy
    state_class: measurement
You might also like...
 A Powerful, Smart And Simple Userbot In Pyrogram.
A Powerful, Smart And Simple Userbot In Pyrogram.

Eagle-USERBOT 🇮🇳 A Powerful, Smart And Simple Userbot In Pyrogram. Support 🚑 Inspiration & Credits Userge-X Userge Pokurt Pyrogram Code Owners Mast

 A Powerful, Smart And Simple Userbot In Telethon.
A Powerful, Smart And Simple Userbot In Telethon.

Owner: Masterolic 🇮🇳 BLACK LIGHTNING A Powerful, Smart And Simple Userbot In Telethon. Credits This is A Remix Bot Of Many UserBot. DARKCOBRA Friday

An all-in-one financial analytics and smart portfolio creator as a Discord bot!
An all-in-one financial analytics and smart portfolio creator as a Discord bot!

An all-in-one financial analytics bot to help you gain quantitative financial insights. Finn is a Discord Bot that lets you explore the stock market like you've never before!

A smart tool to backup members 📈 So you even after a raid/ ban you can easily restore them in  seconds 🎲
A smart tool to backup members 📈 So you even after a raid/ ban you can easily restore them in seconds 🎲

🤑 Discord-backer 🤑 A open-source Discord member backup and restore tool for your server. This can help you get all your members in 5 Seconds back af

Microservice to extract structured information on EVM smart contracts.

Contract Serializer Microservice to extract structured information on EVM smart contract. Why? Modern NFT contracts may have different names for getPr

⚡ Yuriko Robot ⚡ - A Powerful, Smart And Simple Group Manager Written with AioGram , Pyrogram and Telethon

⚡ Yuriko Robot ⚡ - A Powerful, Smart And Simple Group Manager Written with AioGram , Pyrogram and Telethon

Web3 Ethereum DeFi toolkit for smart contracts, Uniswap and PancakeSwap trades, Ethereum JSON-RPC utilities, wallets and automated test suites.
Web3 Ethereum DeFi toolkit for smart contracts, Uniswap and PancakeSwap trades, Ethereum JSON-RPC utilities, wallets and automated test suites.

Web3 Ethereum Defi This project contains common Ethereum smart contracts and utilities, for trading, wallets,automated test suites and backend integra

Powerful Ethereum Smart-Contract Toolkit
Powerful Ethereum Smart-Contract Toolkit

Heimdall Heimdall is an advanced and modular smart-contract toolkit which aims to make dealing with smart contracts on EVM based chains easier. Instal

PINN(s): Physics-Informed Neural Network(s) for von Karman vortex street

PINN(s): Physics-Informed Neural Network(s) for von Karman vortex street This is

nn-Meter is a novel and efficient system to accurately predict the inference latency of DNN models on diverse edge devices

A DNN inference latency prediction toolkit for accurately modeling and predicting the latency on diverse edge devices.

METER: Multimodal End-to-end TransformER

METER Code and pre-trained models will be publicized soon. Citation @article{dou2021meter, title={An Empirical Study of Training End-to-End Vision-a

Kwcpu - An unobtrusive CPU meter that fits in the default Windows 11 taskbar. Supports up to 32 cores.
Kwcpu - An unobtrusive CPU meter that fits in the default Windows 11 taskbar. Supports up to 32 cores.

kwcpu An unobtrusive CPU meter that fits in the default Windows 11 taskbar. Supports up to 32 cores. kwcpu is provided as a Rainmeter skin. By default

The smart farm is an idea that designing Smart Farm by IoT
The smart farm is an idea that designing Smart Farm by IoT

The smart farm is an idea that designing Smart Farm by IoT. Using Raspberry Pi 4 detect the data from different sensors(Raindrop sensor and DHT22 sensor), and push the data to Azure IoT central.

Smart-contracts - open sourcing our upcoming smart contracts for better security and transparency

Smart-contracts - open sourcing our upcoming smart contracts for better security and transparency

A Smart, Automatic, Fast and Lightweight Web Scraper for Python
A Smart, Automatic, Fast and Lightweight Web Scraper for Python

AutoScraper: A Smart, Automatic, Fast and Lightweight Web Scraper for Python This project is made for automatic web scraping to make scraping easy. It

This is a new web-based photo management application. Run it on your home server and it will let you find the right photo from your collection on any device. Smart filtering is made possible by object recognition, location awareness, color analysis and other ML algorithms.
Telegram Voice Chat Music Player UserBot Written with Pyrogram Smart Plugin and tgcalls

Telegram Voice Chat UserBot A Telegram UserBot to Play Audio in Voice Chats. This is also the source code of the userbot which is being used for playi

Jetson Nano-based smart camera system that measures crowd face mask usage in real-time.
Jetson Nano-based smart camera system that measures crowd face mask usage in real-time.

MaskCam MaskCam is a prototype reference design for a Jetson Nano-based smart camera system that measures crowd face mask usage in real-time, with all

SLIDE : In Defense of Smart Algorithms over Hardware Acceleration for Large-Scale Deep Learning Systems

The SLIDE package contains the source code for reproducing the main experiments in this paper. Dataset The Datasets can be downloaded in Amazon-

Comments
  • Frage: Wie kommt man zum Schlüsselcode der Netz Noe

    Frage: Wie kommt man zum Schlüsselcode der Netz Noe

    Hallo,

    vielleicht kann ja hier jemand helfen.

    Ich bin den Anweisungen des PDF Dokuments gefolgt und habe die e-mail an [email protected] geschickt. Ausser einer automatisierten e-mail "Ihre Nachricht ist bei uns angekommen und befindet sich in guten Händen. " hat sich nichts getan. Das ist jetzt 2 1/2 Monat her. Die lokalen Netz NOe Mitarbeiter haben keine Ahnung.

    https://www.netz-noe.at/Netz-Niederosterreich/Smart-Meter/Informationen.aspx -> https://www.netz-noe.at/Download-(1)/Smart-Meter/218_9_SmartMeter_Kundenschnittstelle_lektoriert_14.aspx

    Den verschlüsselten Datensatz kann ich auslesen - fange halt nicht viel damit an.

    opened by schup 6
Owner
null
Telegram Voice Chat Music Player UserBot Written with Pyrogram Smart Plugin and tgcalls

Telegram Voice Chat UserBot A Telegram UserBot to Play Audio in Voice Chats. This is also the source code of the userbot which is being used for playi

Dash Eclipse 7 May 21, 2022
A python API for BSCScan (Binance Smart Chain Explorer), available on PyPI.

bscscan-python A complete Python API for BscScan.com, available on PyPI. Powered by BscScan.com APIs. This is a gently modified fork of the etherscan-

Panagiotis Kotsias 246 Dec 31, 2022
Info & tools for reverse engineering the M6 smart fitness band

m6-reveng This repo contains information and tools for reverse engineering the $7 M6 smart fitness band. Hardware The SoC (system-on-a-chip) is a Teli

null 41 Dec 26, 2022
❤️ DaisyX 2.0 ❤️ A Powerful, Smart And Simple Group Manager ... Written with AioGram , Pyrogram and Telethon...

❤️ DaisyX 2.0 ❤️ A Powerful, Smart And Simple Group Manager ... Written with AioGram , Pyrogram and Telethon... ⭐️ Thanks to everyone who starred Dais

TeamOfDaisyX 44 Oct 6, 2022
PancakeTrade - Limit orders and more for PancakeSwap on Binance Smart Chain

PancakeTrade helps you create limit orders and more for your BEP-20 tokens that swap against BNB on PancakeSwap. The bot is controlled by Telegram so you can interact from anywhere.

Valentin Bersier 187 Dec 20, 2022
👾 Telegram Smart Group Assistant 🤖

DarkHelper ?? Features ⚡️ Smart anti-apam & anti-NFSW message checker Tag Members , Entertain facility , Welcommer ban , unban , mute , unmute , lock

amirali rajabi 38 Dec 18, 2022
A Serverless Application Model stack that persists the $XRP price to the XRPL every minute as a TrustLine. There are no servers, it is effectively a "smart contract" in Python for the XRPL.

xrpl-price-persist-oracle-sam This is a XRPL Oracle that publishes external data into the XRPL. This Oracle was inspired by XRPL-Labs/XRPL-Persist-Pri

Joseph Chiocchi 11 Dec 17, 2022
“Hey there 👋 I'm szrosebot .A Powerful, Smart And Simple Group Manager with some extra features..

A Powerful, Smart And Simple Group Manager szrose bot This is the clone of DewmiBotit is a Powerful, Smart And Simple Group Manager bot made by hiruna

slgeekshow 36 Oct 30, 2022
A Powerful, Smart And Advance Group Manager ... Written with AioGram , Pyrogram and Telethon...

❤️ Shadow ❤️ A Powerful, Smart And Advance Group Manager ... Written with AioGram , Pyrogram and Telethon... ⭐️ Thanks to everyone who starred Shadow,

TeamShadow 17 Oct 21, 2022
A Advanced Powerful, Smart And Intelligent Group Management Bot With New And Powerful Features

Vegeta Robot A Advanced Powerful, Smart And Intelligent Group Management Bot With New And Powerful Features ... Written with Pyrogram and Telethon...

⚡ CT_PRO ⚡ 9 Nov 16, 2022