question

jeroenw avatar image
jeroenw asked

Problem implementing the example 3.6.4 from the ESS mode document via MK2 protocol

I am trying to implement the example of paragraph 3.6.4 from the document https://www.victronenergy.com/live/ess:ess_mode_2_and_3

The document explains that one should first read the Assistant ID and table size in the RAM ID table by reading RAM ID 128.

When i do that by sending { 0x05, 0xFF, 'W', 0x30, 0x80, 0x00, 0xF5 } I get a valid response

07 FF 57 85 01 00 23 5B 9F

This would mean that there is an Assistant ID = 0 and that there is one RAM ID. The only assistant on my system is the ESS Assistant so this would indicate that I can use RAM ID 129 to set the ESS grid set point.

Unfortunately when i use the CommandWriteRamVar on RAM ID 129 by sending { 0x05, 0xFF, 'W', 0x32, 0x81, 0x00, 0xF2 } I get a response of

04 FF 57 80 00 26

The documentation states that there should be no response. This response indicates a Unrecognised Command.

Sending the CommandWriteData does not make any sense now. (and gives the same error)


What am i doing wrong? It looks like I don't have the Assistant in the RAM table. Is there a way to check this (other than running VEConfigure and looking at the Assistant tab, because it is present there...)

Any help would be very much appreciated! Links to other documentation on the MK2 MK3 protocol would be very nice too.


ESSMK3mk2
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

4 Answers
jeroenw avatar image
jeroenw answered ·

I made some progress. I removed the Ethernet cable and restarted the device.

Now I no longer get the UnrecognisedCommand in return but a valid response code:

05 FF 57 87 0 0 1E meaning "Write RamVar OK" Yeah!...

The only problem is now that the device is completely ignoring whatever value on I send to it...


Somehow I get the feeling that the ESS Assistant is not accessible by MK3. When I use a remote console or MQTT setting the AcGridSetPoint works fine so the device is configured correct (i think).


Does anyone have a clue? Maybe Victron Staff?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jeroenw avatar image
jeroenw answered ·

I there really no one that knows how to get the example going? Can perhaps some one confirm that the example from the ESS document is still valid or perhaps outdated?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

danny-e avatar image
danny-e answered ·

Hi jeroen, did you find an solution already? it seems we have the exact same problem here. after i write the ramvar i can read it out with readRamVar. did you try that already?

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jeroenw avatar image jeroenw commented ·

He Danny-e, unfortunately i am still stuck at this.

Somehowe it sounds like you might have a different situation. What RamVar did you use?

Problem on my side might be that when i read RamVar 128 i get 0, meaning that the table has length 0. ( https://www.victronenergy.com/live/ess:ess_mode_2_and_3 see par 3.6.2)

Do you get another value for RamVar 128?

0 Likes 0 ·
danny-e avatar image danny-e jeroenw commented ·

Hi jeroen, i use ramvar 129 to set the setpoint, and when i read out 128 i get 0x01 what means that the assistant ID is 0 with 1 ramvar. if i read out 129 i see the value that i setted previously. I have the idea that something else than the setpoint is set when using 129 as a ramvar.

0 Likes 0 ·
jeroenw avatar image jeroenw danny-e commented ·

He Danny-e, at least on your side shows an assistant present! Thats a start.

If i read the text below, i get the impression that a value of 0x01 out RamVar 128 is not a correct value. The first part of the 8 bit would be an assistant identifier and the second part is the number of variables... an ID of 0 sounds strange as the documentation kind of indicated an ID of 3 for the old HUB-4, which makes me think ID's are preset values.

On the other hand, maybe 0 is the correct id of the ESS assistant in your situation and then it would be correct.. who knows..

Somehow i get the feeling the Victron documentation is outdated and this is not the correct way to talk to the ESS assistant anymore.

Any Victron staff here to jump in on this please?!

Documentation from ESS_mode_2_and_3 pdf, paragraph 3.6.4 example:

Reading the Assistant ID and Size in the RAM-ID table:

This uses the CommandReadRAMVar command, 0x30:

→ 0x05, 0xFF, 0x57, 0x30, 0x80, 0x00*, 0xF5
(Length, 0xFF, ‘W’, 0x30, Lo(ID), Hi(ID), Checksum)

Response:
← 0x07, 0xFF, 0x57, 0x85, 0x32, 0x00, 0x52, 0x5A, 0x40
(Length, 0xFF, ‘W’, 0x85, Lo(ValueA), Hi(ValueA), Lo(ValueB)*, Hi(ValueB)*, Checksum)

ValueA is the contents of RAMID 128. In this example it is 0x0032 which indicates AssistantID = 3 with 2 extra RAMIDs. (3 is the ID of HUB-4 which is the predecessor of the ESS assistant)

0 Likes 0 ·
danny-e avatar image
danny-e answered ·

I thought that too, ESS is the only assistant present so maybe assistantID 0 is right. sometimes when i send the setpoint with an high value like: 2000, I get an "low battery" error so that's why I think that maybe the ID 129 is not the right one. lets hope for some assistans... for the information i use an Multiplus II 3Kw with ESS assistant

9 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

jeroenw avatar image jeroenw commented ·
I use a Multiplus II GX 3kW with ESS. Multiplus and MK3 latest version software of course.

I can read and write other variables without issues. The problem is addressing the ESS RamVar for setting a grid setpoint.

Thanks for giving this a push Danny-e!

0 Likes 0 ·
danny-e avatar image danny-e jeroenw commented ·
Jeroen!! I think i got some very good news. after a couple of days trial and error i got it working! address 129 is not the correct one. it is 131 (0x83). some side notes. you have to give a negative setpoint to get a positive one and vice versa. also you have to keep sending the message other wise the multiplus stops after a couple of seconds. Good luck! tell me if you need some help
0 Likes 0 ·
jeroenw avatar image jeroenw danny-e commented ·
Very interesting Danny-e, I think you found something!

I did a quick try and my system also reacts on writing to RamVar 131. When i write 10 times a second or faster, the victron keeps the value. Less frequent writes will make the victron fall back to a previous value. (in my case, when i set a gridsetpoint via mqtt, the unit will go to that value when every i stop sending. )

Bad news is that my victron starts telling me 'ESS OFF' 'NO AC DATA' and 'Waiting...' every 10 seconds or so. My guess is, that RamVar 131 is not the ESS gridsetpoint we are aiming for, but some internal value that makes the unit change course for a small amount of time.

I think the 'Waiting...' could even be an internal process crashing and restarting inside..

Having said that, i think i owe you a beer! This is much further than i ever got. Thanks!

0 Likes 0 ·
danny-e avatar image danny-e jeroenw commented ·

The beer sounds as a good Idea! I send the ramVar 131 ones every three seconds and so far hasnt gotten any errors. Monday i am going to test some more. For now have a Nice weekend!

1 Like 1 ·
yvesf avatar image yvesf danny-e commented ·

Hi @Danny-E! Would you share a dump of your communication? I'd love to compare it with my failed attempt https://github.com/yvesf/ve-ctrl-tool/tree/dfc2443174e99201ef900f23a1b34a3797fbf5a3#failing-to-talk-to-ess-assistant

1 Like 1 ·
jeroenw avatar image jeroenw yvesf commented ·
Have you tried sending the command multiple times per second? That gave a different result on my side. @Danny-E was more successful with ones per 3 seconds. Maybe this helps. What system/ firmware version are you running this on? Strange thing is that we seem to get different answers on the RamVar query. How may assistants do you run?
0 Likes 0 ·
yvesf avatar image yvesf jeroenw commented ·

Hi @Jeroenw . I did a reset and configured the Multiplus again. Now it works as described in the victron article, no idea what was wrong before. I send it about once per second. I send it to 129 as it's written in the Victron docs. I'll update my code on github soon.

I run just the ESS assistant. I run "Software version: 2660481

1 Like 1 ·
yvesf avatar image yvesf yvesf commented ·

I got a Multiplus II 48-5000-70 and can now compare it with the small 12V one.

On the 12V I can find the ESS assistent in the registers as documented.

On the 48V bigger one it's (as previously mentioned in this thread) in 130-134.

We have to write to RAM-Register 131 to control the setpoint.

Here is a RAM dump from 128-137

Mk2> read-ram 128
value0=1 value0(signed)=1 value0=0b1 value0=0x1
Mk2> read-ram 129
value0=34816 value0(signed)=-30720 value0=0b1000100000000000 value0=0x8800
Mk2> read-ram 130
value0=84 value0(signed)=84 value0=0b1010100 value0=0x54
Mk2> read-ram 131
value0=0 value0(signed)=0 value0=0b0 value0=0x0
Mk2> read-ram 132
value0=6144 value0(signed)=6144 value0=0b1100000000000 value0=0x1800
Mk2> read-ram 133
value0=5920 value0(signed)=5920 value0=0b1011100100000 value0=0x1720
Mk2> read-ram 134
value0=0 value0(signed)=0 value0=0b0 value0=0x0
Mk2> read-ram 135
value0=161 value0(signed)=161 value0=0b10100001 value0=0xa1
Mk2> read-ram 136
value0=32767 value0(signed)=32767 value0=0b111111111111111 value0=0x7fff
Mk2> read-ram 137
value0=0 value0(signed)=0 value0=0b0 value0=0
0 Likes 0 ·
Danakil avatar image Danakil danny-e commented ·

@Danny-E to avoid the "low battery alarm" decrease the sustain and cut-off voltages from the ESS assistant. It seems that the ESS assistant has a problem in a calculation of the sustain voltage + restart voltage without Venus OS running (I used a venus OS in parallel of the RS485, to check what RAM was used). For now, I just dropped the sustain voltage to a very low value and the problem disappeared, but I'll investigate further later.

And FYI, RAM ID #136 is to manage the maximum PV Feed IN (in Watt). I haven't tested it yet, it could be usefull for AC PV on AC-OUT.

Best regards

0 Likes 0 ·

Related Resources

What is ESS training video

ESS Quick Installation Guide

ESS design and installation manual

Additional resources still need to be added for this topic