evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Add support for NIBE SMO S40 SG Ready

Open VallahDieWaldfee opened this issue 11 months ago • 8 comments

Nibe published a firmware update which allows you to control SG ready operating mode via modbus. A native support would be amazing!

Following Registers are available:

3032 HOLDING UINT8: Activate SG Ready via API. Has to be "1". Enables the toggling.
6008 HOLDING UINT8: toggle SG ready (0: Blocking , 1: normal, 2: cheap energy, 3: free energy (Boost))
1911 INPUT UINT8: SG ready state (10: normal, 20: blocked, 30: cheap energy, 40: free energy (Boost))
2305 INPUT UINT32: current Power Consumption (W) (scale 0.0001)
9 INPUT UINT16: Hot Water Temperature (°C) (scale 0.1)
1058 INPUT UINT8: external Blocking (0=false, 1=true)

right now I'm using a custom configuration. But native would be handy :)

VallahDieWaldfee avatar Dec 15 '25 21:12 VallahDieWaldfee

You can use sgready together with the modbus plugins. See other implementations for inspiration. Happy to take a PR. Pleas note that the core team won‘t be working on this.

andig avatar Dec 16 '25 07:12 andig

right now I'm using a custom configuration. But native would be handy :)

@VallahDieWaldfee do you want to share it? That's already half of the template we need ;)

andig avatar Dec 17 '25 09:12 andig

Of course :)

setmode: # set operation mode (1: reduced, 2: normal, 3 boost)
  source: map
  values:
    1: 0 # block
    2: 1 # evcc "normal" → Gerät "Free"
    3: 3 # evcc "boost" → Gerät "Forced on"
  set:
    source: modbus
    uri: ###
    id: 1
    register:
      address: 6008
      type: writeholding
      encoding: int16

getmode: # operation mode (1: reduced, 2: normal, 3 boost)
  source: map
  values:
    10: 2 # Gerät "Free" → evcc "normal"
    20: 1 #block
    30: 3 # cheap
    40: 3 # Gerät "Forced on" → evcc "boost"
  get:
    source: modbus
    uri: ###
    id: 1
    register:
      address: 1911
      type: input
      encoding: uint16

power: # charge power in W
  source: modbus
  uri: ###
  id: 1
  register:
    address: 2305
    type: input
    encoding: uint16
  scale: 10

temp: # current temperature (°C)
  source: modbus
  uri: ###
  id: 1
  register:
    address: 9
    type: input
    encoding: uint16
  scale: 0.1


limittemp: # temperature limit (°C) configured in device
  source: const
  value: 58

To get this to work you will need to set register 3032 manually to 1. This is only needed once.

I'm using for the consumed energy an extra shelly-meter, since the heat pump only shows hourly rates for hot water, heating and cooling. Every full hour it only shows the used energy of the previous hour.

I think it would be possible to combine all these three with calc, but I still would have to add them to the "old" value.

Since I have no clue about GO at all, it will need some time for me to get into it :) I will try my best!

VallahDieWaldfee avatar Dec 17 '25 10:12 VallahDieWaldfee

See https://github.com/evcc-io/evcc/blob/6f97bff88d8170f67967f39a9c41033c7f082bcc/templates/definition/charger/lg-therma.yaml#L4 for a full example- no Go required.

andig avatar Dec 17 '25 10:12 andig

@andig maybe you could help. I figured out how to add manpower.

BUT: it needs to be disabled (0) and enabled(1) in an extra register. only with that set the set kw value is used.

I'm a noob: Is there a possibility to access the passed setmaxpower (maybe .setmaxpower..?) variable within an If-Logic? if yes, which value is passed if there's no limitation?

VallahDieWaldfee avatar Jan 01 '26 17:01 VallahDieWaldfee

You can use a sequence to set mutiple registers. Const plugin can provide fixed values like 1/0 for on and off.

andig avatar Jan 01 '26 17:01 andig

I know. my problem is, that I have to find out weather power is currently limited or not to set the first register correctly. Alternatively I could set it always 1, but then the given limit value must be 0 when not limited

VallahDieWaldfee avatar Jan 01 '26 17:01 VallahDieWaldfee