Smappee in HA

Hi, I just starting with home assistant.
I try to get my smappe device in HA but i found some examples but didnt get it to work.
Is there somebody who can explain me step by stap?
Would be great to have that in!

Tnx!!
Wesley

check this post, install the custom component and add the smappee config.

you can also try the mqtt version with more data

Of course i found this post. But i cant get it working now.
I putted the configuration in yaml file but dont understand the other parts of it.
So maybe somebody can help?

you also need those files in your https://github.com/hmn/home-assistant-config/tree/master/custom_components
keep the folder structure

Do i put this in config file?

Who can help me?
Would be great!

We could use a native component so you don’t need an extra agent running somewhere. There seems to already be advanced code on a custom component that could be added native into HA.
Let’s consolidate discussions here: Smappee custom component

Hello… You have at least two solutions:

  • use MQTT (I am using mosquitto), Smappee send a record to MQTT with all the data every second… !!! if you record the sensors, be careful about the size of the history database… !!! To configure MQTT on Smappee, you have to connect to : http://“your smappee LAN IP”/smappee.html . Login with “admin” as password. Go to “advanced” tab, check the advanced box, than you have the fields to configure MQTT on your smappee. Type location of the MQTT broker on the lan + port, username and password to connect on MQTT broker (I use on logonid per device connected to MQTT)… Save and restart Smappee. Than you can find on MQTT the records sent by Smappee: “servicelocation/Smappee UUID/realtime”… You can replace “Smappee UUID” by “#” to get the uuid used by your smappee… than you define a sensor in HA like this for example
- platform: mqtt
  state_topic: "servicelocation/<your UUID>/realtime"
  name: "Smappee Solar c"
  unit_of_measurement: "W"
  value_template: "{{value_json.channelPowers[0].power}}"

  • second solution: use a python script (in the following I am reading the power used on phase 2). You run it on regular basis (every 10 to 20 seconds for example):
import smappy

ls = smappy.LocalSmappee(ip='<smappee LAN ip>')
ls.logon(password='admin')
smappeeData = ls.load_instantaneous()
solarPowerInWatts = 0
for itemDict in smappeeData:
    key = itemDict.get('key')
    if key in ['phase2ActivePower']:
        value = itemDict.get('value')
        phasePowerInWatts = int(float(value) / 1000)
        solarPowerInWatts += phasePowerInWatts
print(solarPowerInWatts)

Smappy module is installed with the command: pip install smappy
I am running HA in a virtual environment (Raspberry pi 4 + Python 3.7 and HA 0.102.2)

I moved recently from solution 2 (script) to MQTT which is more accurate but generate more data…

Let me know if you need more info… Have fun !