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

Not enough reply bytes for request in sma.Link.acVoltage #4

Open
keestux opened this issue Apr 7, 2017 · 2 comments
Open

Not enough reply bytes for request in sma.Link.acVoltage #4

keestux opened this issue Apr 7, 2017 · 2 comments

Comments

@keestux
Copy link

keestux commented Apr 7, 2017

Hey,

I'm getting 142 bytes reply for the acVoltage Request. But the decoder expects 6x28 bytes more. Could that be caused by using a different SMA model? (( In other words, is it working for you? ))

To be honest, I can't quite grasp what all the first, last numbers mean. But I did notice that SBFspot has these numbers

case SpotACVoltage:
    // SPOT_UAC1, SPOT_UAC2, SPOT_UAC3, SPOT_IAC1, SPOT_IAC2, SPOT_IAC3
    command = 0x51000200;
    first = 0x00464800;
    last = 0x004655FF;
    break;

and T-Home has

def acVoltage( self ):
    p = Request.Data( command=0x51000200, first=0x00464800, last=0x004652FF )

Notice the 0x004655FF versus 0x004652FF. And also, T-Home expects to see 9 values. SBFspot expects (reading from the comment) 6 values.

@TD22057
Copy link
Owner

TD22057 commented Apr 13, 2017

I expect it's just a big in my script (though it works fine on my inverter). FYI - I'm in the process of moving houses so I don't have time to test this right now and won't have access to my inverter after the move. So I'm not going to be able to test this at all going forward.

@keestux
Copy link
Author

keestux commented Apr 13, 2017

OK. No problem. I've created my own setup with a small portion of T-Home and various modifications.

Looking at the SBFspot source code I see that there are different registers (if that is what they are) for current. It could be that your inverter has the one set, and mine has the other.

GridMsAphsA_1                   = 0x00465000,   // *00* Grid current phase L1 (aka SPOT_IAC1)
GridMsAphsB_1                   = 0x00465100,   // *00* Grid current phase L2 (aka SPOT_IAC2)
GridMsAphsC_1                   = 0x00465200,   // *00* Grid current phase L3 (aka SPOT_IAC3)
GridMsAphsA                     = 0x00465300,   // *00* Grid current phase L1 (aka SPOT_IAC1_2)
GridMsAphsB                     = 0x00465400,   // *00* Grid current phase L2 (aka SPOT_IAC2_2)
GridMsAphsC                     = 0x00465500,   // *00* Grid current phase L3 (aka SPOT_IAC3_2)

I've split acVoltage so that it only does voltage, and a new acCurrent that just does current.

I'll leave the issue open since it is not yet solved. But it probably requires a bit of refactoring (split function and config item to select the correct set for current)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants