Hey,
as you are sucessfully connected (in openhab and qmodbus), i think it might not be a general modbus problem, but only that some registers may not be available.
Did you try only 13023 or some other registers too?
Having a look in the spec, therere are some ranges of registers, you might try one of each range.
Hi,
thanks @soenke! It’s working for me using OH4.0.4, Sungrow SH10RT and battery SBR096.
I’m using the LAN port connected to my internal network for ModBus. Winet-S is using my Guest network for iSolarCloud connection.
I had to restart the Docker container after completing installation to get regular item updates based on configured pollInterval. Stop-Start the binding didn’t work.
Here’s the things config similar to the example mentioned above but without a type mismatch warning:
I’m working on a script/rule that triggers my Wifi outlet if the Exprt Power is greater than X.
But so far it doesen’t trigger something, maybe I’m doing something wrong with the state argument.
if (items.getItem('Sungrow_Inverter_Export_Power').quantityState > Quantity('10 W')) {
items.getItem('WiFi_steckdose_kuche_switch_1').sendCommand('ON');
}
Hey,
i’m not familiar with the quantityState and don’t have any rules for this now.
Do you have any documentation on that?
I’ve found this topic Working with Number:Temperature Items in rules which discusses some pitfalls while working with Quanties in rules, it may be helpful.
Anyway, did you check, that your items have the correct dimension type?
Maybe you could check your code by logging something and check the values.
Hi Sönke thank you for your reply,
unfortunately I only got around to continuing on the topic today…
I logged the exact QuantitySate to get the correct format. With
logInfo("testlog", "state contains" + Sungrow_Inverter_Export_Power.state.toString)
Is the output: state contains -991 W - this is also correct.
However, I still can’t get the rule to work… it doesn’t matter if I try state or quantitystate
Hi there. I am sorry if this is a beginner’s question. I installed the bundle via bundle:install https://github.com/soenkekueper/openhab-addons/releases/download/sungrow-beta/org.openhab.binding.modbus.sungrow-4.0.0-SNAPSHOT.jar, but when I type bundle:start in the command line, I get this error:
openhab> bundle:start 263
Error executing command: Error executing command on bundles:
Error starting bundle 263: Could not resolve module: org.openhab.binding.modbus.sungrow [263]
Unresolved requirement: Import-Package: org.openhab.binding.modbus.handler
This is on OH 4.0.4. Is the bundle somehow not packaged correctly?
Hey,
you’re too fast and right
As you need a default modbus tcp or serial bridge, provided by the modbus binding, you need to install the generic modbus binding first.
Thanks a lot Sönke, I will try that! My LAN cable is hooked up only to the WiNet-S right now. If I understand the previous exchanges correctly, then to access MODBUS I will still have to hook up a cable to the other LAN port, right? Will I then nonetheless need to do what you described in your README under “Enabling modbus and whitelist setting” or is that an alternative to using the inverter-internal LAN port?
i’ve just the same setup: Just one lan cable connected to the Winet-S Dongle. So you should be fine to go with that. Just check that the modbus export is enabled in the winet-s dongle as mentioned in the docs.
The internal lan port did not worked for my inverter and as the winet-s is working fine, i’ve not investigated that any more.
The whitelist seems disabled but under Run Information → Forwarding Information I see nothing. Is this usual? Or should it show some IP address? Do I need to enable MODBUS somehow?
Never mind, I think I got things configured now and they do seem to be working! So thanks a lot!
For all others who are trying to get this to run on a current version of OH, I slightly updated the syntax to avoid some warnings related to an outdated format being used:
All the values should have an appropriate default value. So if you check the source you’ll see the correct channels: Its Total DC Power and Daily_PV_Generation.
- context: item
default: Sungrow_Inverter_Total_DC_Power
label: Solar Power
name: solarPower
required: true
type: TEXT
- context: item
default: Sungrow_Inverter_Daily_PV_Generation
description: Solar Energy
label: Solar Energy
name: solarEnergy
required: true
type: TEXT