thanks for the fast reply.
I use mosquitto as MQTT broker. If i go to config, I can listen to everything on servicelocation (where i recieve the Smappee values from).
In Topic “servicelocation//sensorConfig” I get some info about the Water/Gas sensor (only Gas connected and configured):
The 5 min intervall might be a possible solution to the problem, as I never saw the aggregatedGW in the topics.
If I understand your code right, i should recieve the data for “SensorID”: 1 with one sub record, as only one sensor is configured, every 5 min or so, as long as there was consumption.
Am I right so far?
@samarkande Correct but as I have two separate gas&water devices, maybe SMAPPEE is formatting the record differently before sending it to MQTT… Nevertheless the information will come to MQTT from gas&water only if you have consumption… otherwise SMAPPEE is quiet and silent… One tool that I found yesterday and seems very useful (and free !!!) is “MQTT-Explorer” (you can see all the topics available in mosquitto and see their values in real time, so you do not have to wait for the record to appear, just open it and let it run), this tool is available in the windows store… Here is the link:
I’m only using one sensor and only for water, but following settings work for me:
I suppose you only have to change the 3 in measurements[3] to get the gas readings.
0 is the temperature of the smappee sensor
1 is the battery percentage
2 is the humidity
3 is the water usage
To define the correct string for the value template I used https://jsonpathfinder.com
On the left side replace the code with the AggregatedGW message. You can also make the message more readable. (Beautify)
As Didier already mentioned, MQTT Explorer is a great help to get the correct Smappee message.
Then on the right side you can search for the value you are looking for and on the top right you have the string to get that value. Replace the x at the front with value_json and you have the correct string.
sorry for the late reply - had no time to play around in the last days
Thanks at Didier for the MQTT-Explorer tip. this helped to identify the Messages for the Gas Sensor and to see, that something is delivered
Big thanks to Boromin for your integration and the supporting steps. I imported your way into my config and hope, that it is working… just need some gas usage to happen.
The integration of Didier was to complicated for me to understand. Maybe with time i will learn and understand.
I’ll keep you updated, if my attempt was successful
My meter is measuring m³ with 3 digits after 0, this is why i devided the value by 1000.
Also my Smappee does not group the values within “measurements”.
in template.yaml I added the sensor:
#Smappe GAS integration
- name: gas_verbrauch
unique_id: gas_consumption_m3_uid
unit_of_measurement: "m³"
state_class: total_increasing
device_class: gas
state: "{{(states('sensor.smappee_gas_sensor') | float(default=0))}}"
The value “gas_verbrauch” I am using as input for utility_meter and could also select it as gas input for the energy dashboard.
hope this also helps anyone.
Again - thanks for all the help!
Hi all,
Looking to replicate some of the functionality above. I’ve got MQTT working and sending numbers through, the realtime looked too much data, so going to use the aggregated 5 minute data, but can’t seem to work out what the numbers mean. From the dashboard.smappee.net site, it looks like the numbers I’m expecting are:
Consumption:2584.8
Production:2565.6
Import: 19.2
Does anyone know how to convert the numbers into something more meaningful?
Hi @Boromin , thnx for your posts, about your config, I’m using the cloud option to extract gas/water , it gives me indeed these 2 sensors, based on daily usage:
For the water? is L converted to m3 , since L is not supported?
What about the reset, since these 2 sensors are daily sensors and are resetted back to 0 at 00:00
Will this not give issues on the utility sensor ? or is that the meaning/purpose of the delta value?
I’m trying to understand this for myself, but as i’m a NOOB its very hard.
The problem for my is that a friend of my asked me to help him with Smappee and HA and specialy the energy page.
So, her it is…
He is living in an appartment and he wants to show all the residents some information about the energy and solar etc from the building…
Can you please help me with a “How to” to get this working via MQTT.
I know where to find the MQTT installation, but I can’t find the “Scenes.yaml” in Studio Code Server. Is that something to create before puting the data in it?
Hello, I don’t know if it can help, but I created a sensor (settings > Device & services > helpers ) type: integral sensor (Left Rieman sum) on my smappee power, and now I have it available in energy dahsboard , without MQTT, … just with SMAPPEE integration