Closed Gert-dev closed 5 months ago
shouldn't you apply the inverse unit map transformation in the reply?
shouldn't you apply the inverse unit map transformation in the reply?
Yes, probably :slightly_smiling_face: . I had already placed a comment for myself that mentions that, but it's stuck pending for some reason:
I'll try to get to that in the next couple of days.
could you add some tests? I would feel more comfortable accepting the PR if there are some 🙏🏽
shouldn't you apply the inverse unit map transformation in the reply?
Done. I verified it works with Loxone. Finally I can get my solar inverter's data into my home automation without too much hassle :tada: .
(If anyone from Loxone/Huawei is reading this, YOU'RE WELCOME - thanks for ignoring interoperability and just finger-pointing at one another when contacted for support. :unamused: )
could you add some tests? I would feel more comfortable accepting the PR if there are some 🙏🏽
I'll try. I'm familiar with writing tests, but not so much with Python nor its test frameworks :slightly_smiling_face: .
I added a test.
thanks, this seems to work well for me. In my case the Victron requires a Id of 126, but the solar invertor is set to 1. This PR allowed the remapping
Some clients require a minimum unit ID of 1 (e.g. Loxone home automation's MODBUS server support), and some servers have a device on unit ID 0 (e.g. Huawei SUN-2000L), making both incompatible. Ideally they should support one another, but when wonky implementations such as these don't, with this PR you can let the proxy remap one unit ID to another to fix this.
Marking this as draft since I've already tested this working with qModMaster, but still need to test on-device to ensure it actually fixes my problem :wink: .
Fixes #25.