It’s a Tripower 20000tl-30.
Any chance that your integration is working with this one?
Not sure. You can install the integration on a test basis and see if you get the values via “webconnect” or “speedwire”. If not, delete them again.
Seems to work.
Thanks for the hint!
Did you used “webconnect” or “speedwire”?
I would like to update my list of supported devices.
Speedwire as it seems to be more reliable.
Hi!
Inspired by this post, I adjusted it a bit.
I made a helper in which I can set the max power:
I can show it as a slider in Lovelace:
Linked to that helper, I made an automation which writes the helper-value to the SMA modbus:
alias: Set Max PV Power from Helper
description: ""
trigger:
- platform: state
entity_id:
- input_number.maxpvpower
condition: []
action:
- service: modbus.write_register
data:
address: 40915
slave: 3
value:
- 0
- "{{ states('input_number.maxpvpower') | int }}"
hub: sma_modbus
mode: single
then I made 2 automations which set the helper to 0 or max, depending on the current Tibber energy price:
alias: Price Negative, Max Power 0
description: ""
trigger:
- platform: state
entity_id:
- sensor.electricity_price_address
from: ">0"
to: <0
condition: []
action:
- service: input_number.set_value
target:
entity_id: input_number.maxpvpower
data:
value: 0
mode: single
alias: Price Positive, Max Power 8000
description: ""
trigger:
- platform: state
entity_id:
- sensor.electricity_price_address
from: <0
to: ">0"
condition: []
action:
- service: input_number.set_value
target:
entity_id: input_number.maxpvpower
data:
value: 8000
mode: single
So now I can adjust the max power that my SMA delivers with the slider in Lovelace. (this is not quite useful for my situation, but it works).
But when the energy-price goes negative, the max power goes to 0. Besides that, my heat-pump starts heating the DHW. In the future my batteries will load at the lowest point and my future swimming pool, jacuzzi and sauna will start heating. All up to the max power my connection allows.
Yes. I changed it to bring it back. It worked for a week on 502.
I just stopped using the Webconnect module, shame for all the effort I put in with LAN cables, buying the module, etc… It’s just completely unreliable. I now use a clamp current sensor inside the fusebox.
My modbus to my sma has been working for years. I am on some 2022 ha release. Without any updates on my network, the sma modbus stopped replying, sometime during the last 2-3 weeks. I have tried reactivating the modbus setting in the sma without any luck. Anyone seen a something simular ?
I have problems on the sma power ac sensor, if It stays under 1400 as value it’s fine when it moves over it, stops working and goes to 4000000000 and more any ideas?
I have an old SMA SunnyBoy and when it’s “off” (no PV production) the numbers make no sense.
You might check with something like SunnyExplorer and see what is displayed when off and replace those meaningless values using templates.
I have a SUNNY BOY SMART ENERGY 4.0 and the problem is that when it starts to produce more than 1100 W / 1200 W the SMA AC Grid that has the modbus register 30775 has values that makes no sense. Even when the inverter is producing and the battery discharging the value starts to goes wrong… seems like that register isn’t just the PV production.
Any idea of the register with just the PV act power?
Ok I just understood that value… I have the battery pack managed by the sunny boy that is even an inverter, that register gives me the amount of power that is being released on the internal grid that is not going in the battery, if all the power goes in the battery the value overflows is like a NaN value…
Ok now I need to find a way to build the data of the PV generation on this inverter…
Is there a way starting from DC side?
I found a solution to my issue with modbus suddenly being blocked.
I disabled the modbus in the SMA settings, and then turned off the SMA-unit over night. Started it up next day and then set the modbus to enabled again. TADA, everything works again.
I had the same issue this week after a power outage.
Your solution did the trick, but I also had to restart HA after enabling modbus again.
Thinking this over: After the outage HA was possibly restarted quicker then the inverter communication, and that is why the entities were unavailable. So perhaps a restart of HA alone would have fixed it.
Same thing happened to me with the same SMA unit. Disabling and then re-enabling modbus tcp via Ennexos Portal fixed the issue like for you.
Next time I have a power outage I will try with modbus udp. It looks like the inverter somehow kept track of the stale tcp connection even after resetting inverter, network switch, and server…
I think I tried some of that before (same issues just happens again after a week-ish), but maybe UDP is worth trying.
Also you mention “EnnexOS”, isn’t that the new fancy OS, which these older, pre-(integrated)wifi inverters, do not have? Do you have a 5000TL 21? Or has there been an upgrade for these units?
I need to use the SMA windows utility program and connect through bluetooth to access settings, feels very 2008-ish…
@MarcoFiorio
Please read the modbus documentation.
Some Numbers are reserved for NaN (not a number).
0xFFFFFFFF is equivalent to 4294967295 (assuming unsigned 32)
The inverter sometimes delivers such values (depending on the device type) when it is not producing electricity or is in standby.
May I ask how did you make the Bluetooth thing work with your SMA. My Modbus had been off line for over a 6 months now, not getting it back to work after so many years. Nothing has changed as far as I can tell, yet Modbus is dead, maybe there has been an update from SMA corporation on the bus or in HA I can not figure that out. So your solution how 2008-ish it may be might be the solution for me to get data again from my PV.
I used this:
https://www.sma.de/en/products/monitoring-control/sunny-explorer
It’s old, windows only. Also make sure you know the passwords (mine were empty or default luckily). It connects to bluetooth. First time setup was a bit finnicky but not the hardest thing i’ve ever done.
I tried direct connecting with ethernet cable but that sucked, sitting in the laundry room with a long cable. Was also less reliable. Bluetooth reaches pretty far in my case.
friendly_name: 'SMA_Grid Frequency'
value_template: >-
{% if states('sensor.sma_grid_frequency')|float < 30 or states('sensor.sma_grid_frequency')|float > 100 %}
Not Measured
{% else %}
{{ states('sensor.sma_grid_frequency') }}
{% endif %}
unit_of_measurement: "Hz"
modbus_grid_voltage:
friendly_name: 'SMA_Grid Voltage'
value_template: >-
{% if states('sensor.sma_grid_voltage')|float < 180 or states('sensor.sma_grid_voltage')|float > 300 %}
Not Measured
{% else %}
{{ states('sensor.sma_grid_voltage') }}
{% endif %}
unit_of_measurement: "V"
This part is throwing errors if grid_voltage is not in the wanted range:
ValueError: Sensor sensor.modbus_grid_voltage has device class 'None', state class 'None' unit 'V' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'Not Measured' (<class 'str'>)
Don’t know if makes to also include the unit_of_measurement within an IF-case or if this would create another error due to changing units.