Smappee solar production not available for Energy function

Hey,

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):

{
    "utcTimeStamp": 1659650060872,
    "gwSensors": [
        {
            "gwSensorChannelsConfig": [
                {
                    "leakIntervals": 0,
                    "maxPulses": 0,
                    "ppu": 1,
                    "uom": "NONE",
                    "enabled": false,
                    "type": "NONE"
                },
                {
                    "leakIntervals": 1,
                    "maxPulses": 0,
                    "ppu": 100,
                    "uom": "m3",
                    "enabled": true,
                    "type": "GAS"
                }
            ],
            "sensorId": 1,
            "serialNumber": "####"
        }
    ],
    "switchSensors": []
}

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:

Hello,

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

Added to the MQTT sensors in configuration.yaml:

    - state_topic: "servicelocation/<your_smappee_id>/aggregatedGW"
      name: "smappee sensor water"
      unit_of_measurement: "L"
      value_template: "{{value_json.gwIntervalDatas[0].measurements[3].value | float(default=0)}}"

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.

Next I added a sensor to template.yaml:

  - name: "water usage"
    unique_id: water_usage
    unit_of_measurement: "L"
    state: "{{(states('sensor.smappee_sensor_water') | float(default=0))}}"

And finally the sensors to utility_meter.yaml:

# Water consumption
water_usage_hourly:
    source: sensor.water_usage
    name: Water Usage Hourly
    cycle: hourly
    delta_values: true
    tariffs:
        - peak
water_usage_daily:
    source: sensor.water_usage
    name: Water Usage Daily
    cycle: daily
    delta_values: true
    tariffs:
        - peak
water_usage_weekly:
    source: sensor.water_usage
    name: Water Usage Weekly
    cycle: weekly
    delta_values: true
    tariffs:
        - peak
water_usage_monthly:
    source: sensor.water_usage
    name: Water Usage Monthly
    cycle: monthly
    delta_values: true
    tariffs:
        - peak
water_usage_yearly:
    source: sensor.water_usage
    name: Water Usage Yearly
    cycle: yearly
    delta_values: true
    tariffs:
        - peak

Hope this helps.

Hey all,

sorry for the late reply - had no time to play around in the last days :slight_smile:

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 :wink:

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

cheers and again: Thanks for all the support

Well, I can confirm it is working!

Sensor config (via MQTT Integration):

 #Gas Sensor integration
  - name: "smappee gas sensor"
    state_topic: "servicelocation/<deviceID>/aggregatedGW"
    unit_of_measurement: "m³"
    value_template: "{{((value_json.gwIntervalDatas[0].index1Delta | float(default=0))/1000)}}"

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?

intervalDatas [1]
0 {5}
utcEndtime : 1661697000000

2022-08-28T14:30:00.000Z


averageRMSVoltage : 2452
alwaysOn : 10058
channelIntervalDatas [3]
0 {7}
averageRMSCurrent : 3753
averageImportRMSActivePower : 28842
averageExportRMSActivePower : 245
averageRMSApparentPower : 921260
averageRMSReactivePower : 920745
averagePowerfactor : 2
ctInput : 0
1 {7}
averageRMSCurrent : 2005
averageImportRMSActivePower : 420756
averageExportRMSActivePower : 0
averageRMSApparentPower : 492174
averageRMSReactivePower : 255329
averagePowerfactor : 84
ctInput : 1
2 {7}
averageRMSCurrent : 3314
averageImportRMSActivePower : 449355
averageExportRMSActivePower : 0
averageRMSApparentPower : 813397
averageRMSReactivePower : 677842
averagePowerfactor : 54
ctInput : 2

Answered my own question and linking to it here for completeness - this gives 5 minute power/energy calculations.

Cheers.

Colin

My smappee solar went dead… Anyone here not using their solar version anymore? I’m interested to buy it

Hi, what smappee device do you have? i dont see any aggegratedGW , only aggegrated ?

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:

to use them, i need to make 2 utility sensors like this?

water_usage_hourly:
    source: sensor.pergola_quintens_sensor_water
    name: Water Usage Hourly
    cycle: hourly
    delta_values: true
    
gas_usage_hourly:
    source: sensor.pergola_quintens_sensor_gas
    name: Gas Usage Hourly
    cycle: hourly
    delta_values: true

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?

here is a screenshot of the gas:

isnt that wrong? the last period was 6.11 , now next hour its 6.15 , and utility meter collected also 6.15 ? should it collect only the difference?

Hi all,

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