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 ·
Show more comments
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