Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modbus multidevice support #44

Merged
Prev Previous commit
Next Next commit
extended ENUM dictionary with more DeviceIDs and battery inverter fields
  • Loading branch information
sellth committed Jan 10, 2021
commit dbb02b044efb6d603e96479e42726c5cc0e78510
23 changes: 22 additions & 1 deletion features/smamodbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,28 @@
9314: 'PlugwiseCircle',
9315: 'PlugwiseSting',
9316: 'SCS-1000',
9317: 'SB 5400TL-JP-22'
9317: 'SB 5400TL-JP-22',
9324: 'SBS1.5-1VL-10',
9325: 'SBS2.0-1VL-10',
9326: 'SBS2.5-1VL-10',
9344: 'STP4.0-3AV-40',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add:

9456: 'SBS3.7-10'

I can confirm that the modbus register and values are the same. I am happy to help testing because i am using this battery inverter if there is anything needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SBS3.7-10 should be 9356 according to this: https://files.sma.de/downloads/MODBUS-HTML_SBS3.7-6.0-10_GG10-V13.zip

Will add these to the list, but actual readout of battery-related values is not yet implemented.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry yes, typo.

9345: 'STP5.0-3AV-40',
9346: 'STP6.0-3AV-40',
9366: 'STP3.0-3AV-40'
},
'BatteryState': {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not quite sure this will work or i can not find the function: AFAIK the values here are return values that are present in Modbus Register: 30955 and cannot be called directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, but these values are not used to call modbus directly. They are used to interpret the modbus response codes here:

e = pvenums.get(name, {})

303: 'Off',
2291: 'Standby',
2292: 'Charging',
2293: 'Discharging',
16777213: 'NA'
},
'BatteryHealth': {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not quite sure this will work or i can not find the function: AFAIK the values here are return values that are present in Modbus Register: 31391 and cannot be called directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, but these values are not used to call modbus directly. They are used to interpret the modbus response codes here:

e = pvenums.get(name, {})

35: 'Fault',
303: 'Off',
307: 'OK',
455: 'Warning',
16777213: 'NA'
}
}

Expand Down