This project reads "telegrams" from a P1 meter and POSTs them to a given HTTP endpoint for further processing and also provides the data over TCP port 23 (for Home Assitant integration for example). No fancy schmancy MQTT stuff or anything. Plain, simple, pure HTTP POST + Serial over WiFi. That's it.
- Build the circuit shown under hardware
- Follow the instructions in include/example_config.h and example_env_secrets.ini.
- Flash the Wemos D1 Mini with this software
- Power the Wemos D1 mini and connect it to your meter
- Connect to the WiFi Access Point it creates (
p1-meter
or a name you provided) and configure your WiFi - You should now see POST requests at your configured HTTP endpoint
Where you go from here is up to you. Personally, I use DSMRParser.Net hosted in a C# WebAPI project to handle the POST requests and check the checksum, parse the telegram etc. and then hand the parsed data to InfluxDB so I can visualize my data with Grafana. But you may have totally different plans. And that's OK. All this project requires is that you handle a POST request that contains the raw, unsanitized, unchecked and unvalidated telegram data.
This project is based on a Wemos D1 mini. The cicruit is pretty simple:
There is some discussion on wether the Wemos is 5V tolerant or not. So far, this has been working fine for me. But when in doubt, add a series resistor.
This was a 'weekend project' many moons ago. I have polished it a little recently, but don't expect too much.