Git Product home page Git Product logo

Comments (5)

nmakel avatar nmakel commented on June 19, 2024

Thanks for reporting this. If you modify solaredge_modbus/__init__.py line 403 to read self.wordorder = Endian.Little, does that resolve the cosphi issue? Ignoring for a second that all the other values are then incorrect...

from solaredge_modbus.

greggcarpenteratpacketizedenergy avatar greggcarpenteratpacketizedenergy commented on June 19, 2024

Thanks kindly for the prompt reply!!
I tested this and that fix does cause that specific read request to return the expected result, and doesn't appear to corrupt other reads I'm doing via this library (though since there aren't any other 32 bit reads with known values I'm not certain whether there are any other issues related to this). I haven't tried writing float values yet. I was also concerned that this issue might have been coming from an address misalignment (if the registers on both sides of the MSBs were both reading 0x0000 this could also look like that, but I'm not certain). Given that the prior register F001 1 R/W Active Power Limit Uint16 0-100 % behaves as expected I'm inclined to not think it's an address misalignment issue, however the float order I'm seeing would seem to be contrary to that reported in the Sunspec 32bit float specification: https://sunspec.org/wp-content/uploads/2015/06/SunSpec-Information-Models-12041.pdf

from solaredge_modbus.

greggcarpenteratpacketizedenergy avatar greggcarpenteratpacketizedenergy commented on June 19, 2024

Thanks kindly for the prompt reply!! I tested this and that fix does cause that specific read request to return the expected result, and doesn't appear to corrupt other reads I'm doing via this library (though since there aren't any other 32 bit reads with known values I'm not certain whether there are any other issues related to this). I haven't tried writing float values yet. I was also concerned that this issue might have been coming from an address misalignment (if the registers on both sides of the MSBs were both reading 0x0000 this could also look like that, but I'm not certain). Given that the prior register F001 1 R/W Active Power Limit Uint16 0-100 % behaves as expected I'm inclined to not think it's an address misalignment issue, however the float order I'm seeing would seem to be contrary to that reported in the Sunspec 32bit float specification: https://sunspec.org/wp-content/uploads/2015/06/SunSpec-Information-Models-12041.pdf

Update, I have written and reread the CosPhi register using this library mechanism after making the suggested Endian adjustment, and it appears to behave as intended. I'll update with any further developments I see with it.

from solaredge_modbus.

nmakel avatar nmakel commented on June 19, 2024

Thanks kindly for the prompt reply!! I tested this and that fix does cause that specific read request to return the expected result, and doesn't appear to corrupt other reads I'm doing via this library (though since there aren't any other 32 bit reads with known values I'm not certain whether there are any other issues related to this). I haven't tried writing float values yet. I was also concerned that this issue might have been coming from an address misalignment (if the registers on both sides of the MSBs were both reading 0x0000 this could also look like that, but I'm not certain). Given that the prior register F001 1 R/W Active Power Limit Uint16 0-100 % behaves as expected I'm inclined to not think it's an address misalignment issue, however the float order I'm seeing would seem to be contrary to that reported in the Sunspec 32bit float specification: https://sunspec.org/wp-content/uploads/2015/06/SunSpec-Information-Models-12041.pdf

Update, I have written and reread the CosPhi register using this library mechanism after making the suggested Endian adjustment, and it appears to behave as intended. I'll update with any further developments I see with it.

Thanks for the update. The other object which has float registers is the battery (starting at 0xe100). These values are read with a little endian wordorder. So it makes sense that the inverter model also uses little endian. But, as you say, there aren't that many 32bit float register to test with. Can you confirm the energy_total register still returns valid values?

Also, have you had any luck polling the other power control registers mentioned in the document you referred to?

from solaredge_modbus.

greggcarpenteratpacketizedenergy avatar greggcarpenteratpacketizedenergy commented on June 19, 2024

Can you confirm the energy_total register still returns valid values?
On inspection it appears that this is NOT decoded correctly with the aforementioned wordorder set to Endian.Little, and decodes out of order as would be expected (packet reply 0x010304000000D27A6E which should be decoded as 210 is instead decoded as 13762560 as would be expected for having the wordorder set incorrectly).

However, regarding:

Also, have you had any luck polling the other power control registers mentioned in the document you referred to?

Those that my testing was aimed at primarily fall within the range 0xE000 - 0xE192 (as battery control is my main focus). Those DO appear to behave as desired across the range of registers tested. I've tested the following registers for both reading (and writing where applicable) with the wordorder = Endian.Little configuration:

0xE000
0xE004
0xE005
0xE006
0xE008
0xE00A
0xE00B
0xE00D
0xE00E
0xE010

And all seem to behave correctly (and have been exercised as such in my testing with the expected behavior registering at the inverter and measured power flow direction).

from solaredge_modbus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.