Opening this as an introduction as much as a proposal. I'm one of the code owners of the SMA integration in Home Assistant Core, and a member of the Home Assistant Core team; so pysma sits directly downstream of work I'm responsible for. :)
@kellerza and I have been exchanging emails about this, and he suggested getting introduced to @rklomp as the current maintainer. Rather than turning up with unsolicited code, I'd rather start with the direction and see whether it fits how you want the library to grow.
While experimenting with my own inverter I got it working over Modbus TCP, including write access. But after testing both paths side by side, Webconnect is clearly the better data source: sensor coverage is more complete and the values are more reliable. Several things I expected to work over Modbus either returned nothing usable or didn't map cleanly to what the integration already exposes.
So I'd like to correct the direction I originally floated with @kellerza over email: this shouldn't be "replace Webconnect with Modbus". At first webconnect stays the primary transport, and Modbus is added narrowly for the one thing Webconnect can't do.
My main idea:
- Webconnect first. The definitions were already moved to their own file, I understood of Johann. Anything Modbus does better on the read side is a later, evidence-driven decision, I suppose.
- Modbus as an optional control layer. A separate, opt-in SMAmodbus client used specifically for writes.
Looking forward to your responses and I hope we can started extending pysma! :)
Opening this as an introduction as much as a proposal. I'm one of the code owners of the SMA integration in Home Assistant Core, and a member of the Home Assistant Core team; so pysma sits directly downstream of work I'm responsible for. :)
@kellerza and I have been exchanging emails about this, and he suggested getting introduced to @rklomp as the current maintainer. Rather than turning up with unsolicited code, I'd rather start with the direction and see whether it fits how you want the library to grow.
While experimenting with my own inverter I got it working over Modbus TCP, including write access. But after testing both paths side by side, Webconnect is clearly the better data source: sensor coverage is more complete and the values are more reliable. Several things I expected to work over Modbus either returned nothing usable or didn't map cleanly to what the integration already exposes.
So I'd like to correct the direction I originally floated with @kellerza over email: this shouldn't be "replace Webconnect with Modbus". At first webconnect stays the primary transport, and Modbus is added narrowly for the one thing Webconnect can't do.
My main idea:
Looking forward to your responses and I hope we can started extending pysma! :)