So I’ve been reading more about Modbus, although it is really confusing because it is such a old protocol and there is so much different information and interpretation it is hard to find what you’re looking for.
But after some poking around with some other tools, I got it almost fully working, my thing file:
Bridge modbus:tcp:SE2200TCP [ host="192.168.0.214", port=1502, id=1, timeBetweenTransactionsMillis=60,
timeBetweenReconnectMillis=0, connectMaxTries=3, reconnectAfterMillis=0, connectTimeoutMillis=10000 ] {
Bridge poller Registers [ start=69, length=50, refresh=5000, type="holding" ] {
// Setting polling to 1000 ms sometimes led to strange values in I_AC_POWER
// Thing data C_DeviceAddress [ readStart="69", readValueType="uint16" ] // MODBUS Unit ID
// Thing data C_SunSpec_DID [ readStart="69", readValueType="uint16" ] // 101 = single phase, 102 = split phase, 103 = three phase
// Thing data C_SunSpec_Length [ readStart="70", readValueType="uint16" ] // 50 = Length of model block
// Thing data I_AC_Current [ readStart="71", readValueType="uint16" ] // AC Total Current value
// Thing data I_AC_CurrentA [ readStart="72", readValueType="uint16" ] // AC Phase A Current value
// Thing data I_AC_CurrentB [ readStart="73", readValueType="uint16" ] // AC Phase B Current value
// Thing data I_AC_CurrentC [ readStart="74", readValueType="uint16" ] // AC Phase C Current value
// Thing data I_AC_Current_SF [ readStart="75", readValueType="int16" ] // AC Current scale factor
// Thing data I_AC_VoltageAB [ readStart="76", readValueType="uint16" ] // AC Voltage Phase AB value
// Thing data I_AC_VoltageBC [ readStart="77", readValueType="uint16" ] // AC Voltage Phase BC value
// Thing data I_AC_VoltageCA [ readStart="78", readValueType="uint16" ] // AC Voltage Phase CA value
// Thing data I_AC_VoltageAN [ readStart="79", readValueType="uint16" ] // AC Voltage Phase A to N value
// Thing data I_AC_VoltageBN [ readStart="80", readValueType="uint16" ] // AC Voltage Phase B to N value
// Thing data I_AC_VoltageCN [ readStart="81", readValueType="uint16" ] // AC Voltage Phase C to N value
// Thing data I_AC_Voltage_SF [ readStart="82", readValueType="int16" ] // AC Voltage scale factor
// Thing data I_AC_Power [ readStart="83", readValueType="int16" ] // AC Power value
// Thing data I_AC_Power_SF [ readStart="84", readValueType="int16" ] // AC Power scale factor
// Thing data I_AC_Frequency [ readStart="85", readValueType="uint16" ] // AC Frequency value
// Thing data I_AC_Frequency_SF [ readStart="86", readValueType="int16" ] // Scale factor
// Thing data I_AC_VA [ readStart="87", readValueType="int16" ] // Apparent Power
// Thing data I_AC_VA_SF [ readStart="88", readValueType="int16" ] // Scale factor
// Thing data I_AC_VAR [ readStart="89", readValueType="int16" ] // Reactive Power
// Thing data I_AC_VAR_SF [ readStart="90", readValueType="int16" ] // Scale factor
// Thing data I_AC_PF [ readStart="91", readValueType="int16" ] // Power Factor
// Thing data I_AC_PF_SF [ readStart="92", readValueType="int16" ] // Scale factor
// Thing data I_AC_Energy_WH [ readStart="93", readValueType="acc32" ] // AC Lifetime Energy Production
// Thing data I_AC_Energy_WH_SF [ readStart="95", readValueType="uint16" ] // Scale factor
// Thing data I_DC_Current [ readStart="96", readValueType="uint16" ] // DC Current value
// Thing data I_DC_Current_SF [ readStart="97", readValueType="int16" ] // Scale factor
// Thing data I_DC_Voltage [ readStart="98", readValueType="uint16" ] // DC Voltage value
// Thing data I_DC_Voltage_SF [ readStart="99", readValueType="int16" ] // Scale factor
// Thing data I_DC_Power [ readStart="100", readValueType="int16" ] // DC Power value
// Thing data I_DC_Power_SF [ readStart="101", readValueType="int16" ] // Scale factor
// Thing data I_Temp_Sink [ readStart="103", readValueType="int16" ] // Heat sink temperature
// Thing data I_Temp_SF [ readStart="106", readValueType="int16" ] // Scale factor
Thing data I_Status [ readStart="107", readValueType="uint16"] // Operating state
// Thing data I_Status_Vendor [ readStart="109", readValueType="uint16"] // Vendor-defined operating state and error codes
// Thing data Dyn_Power_Cntrl [ readStart="300", readValueType="uint16"] // on address 0xF300 is disabled (=0) by default and should be enabled (1) for dynamic power control functionality
}
Bridge poller Registers2 [ start=61440, length=10, refresh=5000, type="holding" ] {
//Setting polling to 1000 ms sometimes led to strange values in I_AC_POWER
Thing data Act_Power_Ctrl [ readStart="61441", readValueType="uint16", writeStart="61441", writeValueType="int16", writeType="holding"] // R/W to "Active Power Control Limit" on address 0xF001
}}
And the item file:
//SolarEdge modbus
Number Sensor_SE2200_ModBus_I_Status "Invertor status [MAP(SE2200_status.map):%s]" <energy> {channel="modbus:data:SE2200TCP:Registers:I_Status:number", autoupdate="false" }
Dimmer Sensor_SE2200_ModBus_Active_Power_Control_Limit "Active power control" {channel="modbus:data:SE2200TCP:Registers2:Act_Power_Ctrl:dimmer", autoupdate="false" }
The only “issue” I can’t wrap my head around right now is that the dimmer is working if I send 0 or 100, the value on the inverter will change. But, when I send 50 for example (or any other value between 1-99) it will always change to 100.
I’m not sure, but I could it has something to do with " writeValueType=“int16” " inside the data thing for address 61441, in the SolarEdge manual they say the type is uint16 (I assume for write and read then). But when I change the writeValueType to uint16, in the openHAB logging it says that this value isn’t allowed (although I see older topic’s using this value):
2024-05-20 13:07:58.631 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'modbus:data:SE2200TCP:Registers2:Act_Power_Ctrl' changed from ONLINE to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING): {writeValueType=The value uint16 does not match allowed parameter options. Allowed options are: [ParameterOption [value="int64", label="64bit positive or negative integer, 4 registers (int64, uint64)"], ParameterOption [value="int64_swap", label="64bit positive or negative integer, 4 registers but with 16bit words/registers in reverse order (dcba) (int64_swap, uint64_swap)"], ParameterOption [value="float32", label="32bit floating point (float32)"], ParameterOption [value="float32_swap", label="32bit floating point, 16bit words swapped (float32_swap)"], ParameterOption [value="int32", label="32bit positive or negative integer, 2 registers (int32, uint32)"], ParameterOption [value="int32_swap", label="32bit positive or negative integer, 2 registers but with 16bit words/registers in reverse order (ba) (int32_swap, uint32_swap)"], ParameterOption [value="int16", label="16bit positive or negative integer, 1 register (int16, uint16)"], ParameterOption [value="bit", label="individual bit (bit)"]]}
Any thoughts?