Smappee integration: control charging point

If anyone is still trying to control their smappee charger trough Home Assistant for solar or dynamic pricing optimized charging, I made a basic integration installable trough HACS/custom repo. For now it does about the same as @brodykenrick 's app, it exposes a Home Assistant service (now called action by the way) to set the charging speed. You can find the repo here : GitHub - scruysberghs/home-assistant-smappee-charging-profiles

You have mode NORMAL (that allows you to set charging power in AMPERE or PERCENTAGE), SMART en PAUSED)
But feel free to go over the other availalbe EV line api’s here https://smappee.atlassian.net/wiki/spaces/DEVAPI/pages/2804875635/EV+Line and let me know if there is anything else you would like to see implemented in home assistant.
Or feel free to expand functionality yourself of course :slight_smile:
Basicly setting charging speed and mode is all I need for now, I might look at adding a slider and mode selector for the ui in the integration if I find the time.

3 Likes

another option to look at is setting op the evcc.io addon + integration and point your smappee OCPP backend to that. Haven’t tried myself but should be possible. Too bad smappee support has to whitelist a OCPP backend adres before you can use it with your own equipment… That together with the fact that realtime data is not availalble trough the api smells a bit like trying to protect an ecosystem from Smappee’s side… Long way away from what the open home foundation en Home Assistant stands for.

1 Like

Looks very nifty. Good work.

I’ll have a look (one day) to see if I can extend it for my use cases easily.

For the OCPP path note that Smappee didn’t support setting a charge rate over OCPP (unless they added it in the last year). Essentially just on/off and whatever value it had previously. I used that for a while but eventually I wanted more flexibility.

Great plugin, thanks!

Is the PAUSE mode not working though? Is it at Smappee side that this part of the API doesn’t work, or some bug in your code? https://smappee.atlassian.net/wiki/spaces/DEVAPI/pages/2803367937/Set+the+charging+mode+of+one+of+the+connectors+of+a+charging+station

Personally, I’ll combine it with the realtime measurements from the P1 reader, PV inverters and home battery status/inverter. Too bad there is no simple way to read out the current power consumption of the EV charger and its total power delivery.

PAUSE should work. At least it did when I had a Smappee charger available for testing. If not you could also set charging vurrent below 6A to stop charging.

Thanks. I thought you removed “PAUSE” mode from the source code at git?

It is not in the code, it is just a parameter you pass to the API if I remember correctly. Do you get an error message when you call the action with mode PAUSED?

Sorry, my mistake, it’s added in the latest release instead of removed. Was looking at the wrong commit… :see_no_evil:

Just a question: if you switch to your private OCPP endpoint, does it mean you can no longer get a CSV log of the charging sessions from the Smappee service itself? You only have your HA loggings left over to rely on for employer reimbursements?

Hi all, nice work!
I found a way to have more items available for home assistant, via the API.

https://smappee.atlassian.net/wiki/spaces/DEVAPI/pages/1447165953/Get+Smart+Devices

First, you would need to retrieve the smartdeviceID of your charger. This is - for my case - the first instance of following command:

https://app1pub.smappee.net/dev/v3/servicelocation/[SERVICELOCATIONID]/smartdevices

Then, you can see all current settings in the get one smart device api call, with your device ID:

https://app1pub.smappee.net/dev/v3/servicelocation/[SERVICELOCATIONID]/smartdevices/[SMARTDEVICEID]

This is the structure I recieve from the response:

object {7}
id: CARCHARGER-XXX
uuid: XXXXX
name: XXX
favourite: true
type {9}
configurationProperties [4]
properties [2]

As a following step, you can perform two actions:
Modify a smart device - only everything withing configuration properties and general information. This is the least interesting part.
The execute smart device actions is more interesting:

https://app1pub.smappee.net/dev/v3/servicelocation/[SERVICELOCATIONID]/smartdevices/[SMARTDEVICEUUID]/actions/[NAME]

Take care, you need the SMARTDEVICE unique ID, which you can see from the response above. The actions, for my case, are located within type (9). There are 7 actions:

  • startCharging: Start charging your car at the charging station, where you could provide as parameter the percentageLimit
  • setPercentageLimit: Sets the maximum charging speed or the maximum current that your electric vehicle can support.
  • stopCharging: Stop the charging session for the connected vehicle.
  • normalChargingMode: Disable smart charging for the charging station
  • smartChargingMode: Enable smart charging for the charging station
  • pauseCharging: Pause the charging for this charging point
  • setChargingMode: Set the charging mode, which controls the output of the charging point. The parameter for this one is mode, with 3 values (STANDARD, SMART, SOLAR)

I created some rest_command sensors for all those items, and via an automation, this could run. I tried it, and it works as a charm, you can now easily switch between standard, smart and solar charging in home assistant.

As a next step, I then created some custom charger in the evcc.yaml for the EVCC integration, as I was unable to use OCPP or other integrations. All the data for EVCC is retrieved by a Also this works, I can confirm.

My solution is that, when I want EVCC to control the smappee charger, I put it on STANDARD charging mode, such that EVCC can control the currents. The tabs in EVCC will then determine the current levels, based on PV power and home consumption.
The main issue I personally have, is that this is not so efficient, as my charger is 3phase, which can switch to 1phase, but you cannot control this from outside the device. This implies that EVCC min power is around 4kW.

Hope this is useful or it inspires some of you.

Seems assume could you share your evcc configuration?

There are a few options to use home assistant sensors:

https://docs.evcc.io/en/docs/integrations/home-assistant

I used the last one. Here is the guide for the rest API:

https://github.com/marq24/ha-evcc/blob/d1970903e257547919a519e435d88d20cabad2a5/HA_AS_EVCC_SOURCE.md

I will soon share my yaml file, when it is fully up and running, as it is still a bit faulty. I did found a couple of discussions which may be interesting to follow.

Some discussions I find particular interesting:

https://github.com/evcc-io/evcc/discussions/20711

https://github.com/evcc-io/evcc/discussions/18414

Hi all

I created a github with a HACS integration and some notes on EVCC. Please keep in mind that I am a hardware-enthusiast, not a software engineer. Hopefully this integration could/would work for you.

Smappee_EV

On these pages, I also provided my first estimate of the integration with EVCC.

Happy to hear your suggestions and improvement points. Let’s make it work!

1 Like

@Myny_HA
Installed, smooth install process, works very nice, thanks!

1 Like

Meanwhhile, this inttegration has been improving and it seems users are happy with it.

On the github, there are also discussions ongoing in the discussions section:

I also created a page in the community:

@Myny_HA Thanks for your efforts! This works really nice with EVCC. This works a lot nicer in combination with my home battery and there is less grid import/wasted because of the slow 1 minute update rate of the Smappee default solar charging.

I have 1 issue that I can’t see to fix. Sometimes EVCC tries to charge the car. I see a 1.4kW charging for 10 seconds and then it stops. And this repeats every 5 minutes and the car is not charging. I’m not sure why it stops after 10 seconds even though there is enough surplus. It was trying all morning for example and I had 2.7kW of surpluss.

If I give it a nudge in the Smappee app, but just pressing resume charging there, it starts and EVCC keeps updating the charge power every 10 seconds.

I don’t know why sometimes it just starts and works and sometimes i have to give it a nudge. Not sure if it’s caused by EVCC of the HA integration. I followed your documentation and set it up like that.

I’m wondering if someone else is experiencing the same.

I sometimes had something similar: switch on and off continuously.
This behavior stopped when I included interval: 30s. Apparently <30s, EVCC becomes unstable.

## minimal configuration example

**interval: 30s**

site:
    title: Home # display name for UI
    meters:
        grid: Grid_smappee
        pv: PV_smappee
    #     battery:
    #       - my_battery

I changed it to 30s right after your suggestion, but I’m still having the same problem. But not sure if it’s an EVCC things or a combo with the integration.

It keeps starting every 5 minutes and then stops the charge a few seconds later. I had 5kW grid injection and a full home battery.

Hello,
I just started working with Home Assistant and I added the smappee EV through HACS.


But I don’t see where I can configure it. It will be something stupid but I don’t see it.
Could you help out?

After installing it, you need to go to settings => devices and services and then add a new integration and choose Smappee EV.

1 Like