question

magnus-fagerberg avatar image
magnus-fagerberg asked

Modbus/TCP error code 3

Hi

Can someone help me understand this error?


1644513584266.png


1644514407179.png


Modbus TCP
1644513584266.png (659.3 KiB)
1644514407179.png (83.1 KiB)
2 |3000

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

7 Answers
wkirby avatar image
wkirby answered ·

What is the modbus request that you are sending?

2 |3000

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

magnus-fagerberg avatar image
magnus-fagerberg answered ·

Cerbo GX is connected to my Homey. Looks like this in the homey app. You can make a lots of flows (programable functions) with this data as a trigger.

1644527408771.png


1644527408771.png (611.0 KiB)
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.

wkirby avatar image wkirby ♦♦ commented ·
Can you show the request its self?

I think Homey would have a configuration file for the modbus requests?

0 Likes 0 ·
magnus-fagerberg avatar image magnus-fagerberg wkirby ♦♦ commented ·

This is the request when adding GX device to homey first time:

1644528382506.png

0 Likes 0 ·
1644528382506.png (140.3 KiB)
wkirby avatar image wkirby ♦♦ magnus-fagerberg commented ·

Mmm, OK. It kind of difficult to see the message that Homey is sending.

In the error I can see that a range request is being sent (quantity 6). I would say to try to request just 1 register to see if that stops the error, but I don't know Homey at all, so I wouldn't know how to set that.
According to this: https://community.homey.app/t/app-pro-victron-energy/46219

It is all wrapped up and the user does not get to alter the requests, so no idea what it is sending out to the GX.

0 Likes 0 ·
tnt369 avatar image
tnt369 answered ·

In the second pic there are two units using id 100. Maybe thats the reason. Id 100 should only used by .system

The charger should have other id.

2 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.

magnus-fagerberg avatar image magnus-fagerberg commented ·

Yes I have seen that. If you read this post it seems its no problem they have the same unitid?

https://community.victronenergy.com/questions/83070/modbus-tcp-different-devices-same-unit-id.html

I wondering also what "Device instance 0" at the end of the error description means?


0 Likes 0 ·
magnus-fagerberg avatar image magnus-fagerberg magnus-fagerberg commented ·

This is from the GX Modbus-TCP Manual

For the overall system data, look for com.victronenergy.system in the excel sheet, and use Unit-ID 100.

Note that both Unit-ID 0 and Unit-ID 100 map to the same internal address. We recommend to use ID 100, since many Modbus-TCP clients and PLCs do not work with ID 0.

I don't have any unit in my device with ID0.


0 Likes 0 ·
tnt369 avatar image
tnt369 answered ·

If there are two units using id 100 i think that will cause communication errors.

There is a workaround to change the id´s of the modbus units:

Device ID over 255 in Modbus - Victron Community (victronenergy.com)

This describe how to modify the mapping of the vrm-instance to the modbus id.

2 |3000

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

magnus-fagerberg avatar image
magnus-fagerberg answered ·

I'm trying to change ID on the units that has ID 100.

Wich one is the one I need to change? Or can I add more lines?

This is the list in /opt/victronenergy/dbus-modbustcp

Unit ID, /DeviceInstance,Remark

246,257,CCGX VE.Bus port (ttyO1)

247,256,CCGX VE.Direct 1 port (ttyO0)

245,258,"CCGX VE.Direct 2 port, Venus GX VE.Direct 1 port (ttyO2)"

243,260,Venus GX VE.Direct 2 port (ttyO4)

242,261,Venus GX VE.Bus port (ttyO5)

230,273,EasySolar-II/Multiplus-II GX VE.Direct port (ttyS1)

229,274,EasySolar-II/Multiplus-II GX VE.Direct port (ttyS2)

228,275,EasySolar-II/Multiplus-II GX VE.Bus port (ttyS3)

227,276,Cerbo GX VE.Bus port (ttyS4)

226,279,Cerbo GX VE.Direct port 1 (ttyS7)

224,278,Cerbo GX VE.Direct port 2 (ttyS6)

223,277,Cerbo GX VE.Direct port 3 (ttyS5)

0,0,VE.Can device instance 0 and system service

1,1,VE.Can device instance 1

2,2,VE.Can device instance 2

3,3,VE.Can device instance 3

4,4,VE.Can device instance 4

5,5,VE.Can device instance 5

6,6,VE.Can device instance 6

7,7,VE.Can device instance 7

8,8,VE.Can device instance 8

9,9,VE.Can device instance 9

10,10,VE.Bus AC-Sensor on input 1

11,11,VE.Bus AC-Sensor on output

12,12,VE.Bus AC-Sensor on input 2

20,20,PV Inverter instance 0

21,21,PV Inverter instance 1

22,22,PV Inverter instance 2

23,23,PV Inverter instance 3

24,24,PV Inverter instance 4

25,25,PV Inverter instance 5

26,26,PV Inverter instance 6

27,27,PV Inverter instance 7

28,28,PV Inverter instance 8

29,29,PV Inverter instance 9

30,30,Carlo Gavazi grid meters instance 0

31,31,Carlo Gavazi grid meters instance 1

32,32,Carlo Gavazi grid meters instance 2

33,33,Carlo Gavazi grid meters instance 3

34,34,Carlo Gavazi grid meters instance 4

40,40,Redflow system totals

41,41,Redflow battery (Modbus-RTU ID 1)

42,42,Redflow battery (Modbus-RTU ID 2)

43,43,Redflow battery (Modbus-RTU ID 3)

44,44,Redflow battery (Modbus-RTU ID 4)

45,45,Redflow battery (Modbus-RTU ID 5)

46,46,Redflow battery (Modbus-RTU ID 6)

100,0,Workaround for clients that do not support unit ID 0

239,288,VE.Direct via USB (ttyUSB0)

238,289,VE.Direct via USB, Octo GX VE.Direct 3 (ttyUSB1)

237,290,VE.Direct via USB, Octo GX VE.Direct 4 (ttyUSB2)

236,291,VE.Direct via USB, Octo GX VE.Direct 5 (ttyUSB3)

235,292,VE.Direct via USB, Octo GX VE.Direct 6 (ttyUSB4)

233,293,VE.Direct via USB, Octo GX VE.Direct 7 (ttyUSB5)

232,294,VE.Direct via USB, Octo GX VE.Direct 8 (ttyUSB6)

231,295,VE.Direct via USB, Octo GX VE.Direct 9 (ttyUSB7)

234,296,VE.Direct via USB, Octo GX VE.Direct 10 (ttyUSB8)

225,512,CAN-bus BMS



It looks like my solarcharger has id 0?

1644618686173.png



1644618686173.png (63.8 KiB)
1 comment
2 |3000

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

thomasw-1 avatar image thomasw-1 commented ·
VRM instance 0 is standard for MPPT single installation!

This is for sure not your issue!


0 Likes 0 ·
tnt369 avatar image
tnt369 answered ·

That´s what i expected. Strange. Chargers should be different than 0 and 100.

Make a copy of the file for backup. Try it with removing the line

100,0,Workaround for clients that do not support unit ID 0

I hope this will only change the ID of the charger und not of the system (should be still at id 100).

1 comment
2 |3000

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

magnus-fagerberg avatar image magnus-fagerberg commented ·

This happened.

1645130561876.png

2 units has now ID 0.



0 Likes 0 ·
1645130561876.png (81.3 KiB)
thomasw-1 avatar image
thomasw-1 answered ·

Hi @Magnus Fagerberg ,

This issue is obviously related to your Homey instance. I reproduced the same error by modbus pool using a wrong unit id (see below). So look in you Homey configuration, where you can configure unit-id 100.

1645264644275.png

Apropos, it is normal that device id 100 is used for more device types in VenusOS. It is identical on my systems. Therefore I suppose that error anylsis leads into a dead end for that.

If this helps, like appreciated.



1645264644275.png (16.4 KiB)
2 |3000

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

Related Resources