Victron Energy VE.direct binding

ERROR is a higher log level than INFO. I’ll switch that message over to WARN I think. Are you getting data on your channels? A lot of those errors are not so much ‘errors’ and I probably need to knock down the default debugging (checksum problems happen pretty regularly in my experience as two messages stumble over each other – they can be ignored as it’s sending data every few seconds). I just pushed a new jar up that fixes some of the debugging info and got rid of that message about the relay (that wasn’t supposed to make it out yet :D)

Thing is: after setting the binding to TRACE and back again to INFO, it still spits out all information.
So it is:

  1. binding does the INFO logging
  2. log:set TRACE org.openhab.binding.VEDirect
  3. binding does the TRACE logging
  4. log set INFO org.openhab.binding.VEDirect
  5. binding still does the TRACE logging
    even after deleting the JAR, restarting OH3, or rebooting the Pi…

So, I replaced it with the yesterday’s version and got this (still with INFO logging), was too fast for fontail, so I’ll have it split in:

openhab.log:

2021-10-01 07:58:22.119 [INFO ] [internal.VEDirectSerialBridgeHandler] - vedirect:serial:VEDirectShunt: Initializing VEDirect Serial Bridge: /dev/ttyUSB_shunt
2021-10-01 07:58:22.150 [INFO ] [internal.VEDirectSerialBridgeHandler] - vedirect:serial:VEDirectShunt: Connecting to VE.Direct using /dev/ttyUSB_shunt.
2021-10-01 07:58:22.226 [INFO ] [internal.VEDirectSerialBridgeHandler] - vedirect:serial:VEDirectSolar: Initializing VEDirect Serial Bridge: /dev/ttyUSB_solar
2021-10-01 07:58:22.246 [INFO ] [internal.VEDirectSerialBridgeHandler] - vedirect:serial:VEDirectSolar: Connecting to VE.Direct using /dev/ttyUSB_solar.
2021-10-01 07:58:22.272 [INFO ] [internal.VEDirectSerialBridgeHandler] - vedirect:serial:VEDirectSolar: Connection established using /dev/ttyUSB_solar. Configuring IO parameters. 
2021-10-01 07:58:24.890 [ERROR] [internal.VEDirectSerialBridgeHandler] - Invalid block: Csum 7437!
2021-10-01 07:58:24.893 [ERROR] [internal.VEDirectSerialBridgeHandler] - 
PID	0xA389
V	26115
VS	-12
I	444
P	12
CE	0
SOC	1000
TTG	-1
Alarm	OFF
AR	0
BMV	SmartShunt 500A/50mV
FW	0407
MON	0
Checksum	z
2021-10-01 07:58:24.897 [ERROR] [internal.VEDirectSerialBridgeHandler] - Invalid block: Csum 5875!
2021-10-01 07:58:24.899 [ERROR] [internal.VEDirectSerialBridgeHandler] - 
H1	-76272
H2	0
H3	0
H4	0
H5	0
H6	-813142
H7	24310
H8	29052
H9	0
H10	6
H11	0
H12	0
H15	-23
H16	0
H17	2077
H18	2159
Checksum	
2021-10-01 07:58:25.887 [ERROR] [internal.VEDirectSerialBridgeHandler] - Invalid block: Csum 7437!
2021-10-01 07:58:25.890 [ERROR] [internal.VEDirectSerialBridgeHandler] - 
PID	0xA389
V	26117
VS	-13
I	464
P	12
CE	0
SOC	1000
TTG	-1
Alarm	OFF
AR	0
BMV	SmartShunt 500A/50mV
FW	0407
MON	0
Checksum	u
2021-10-01 07:58:25.894 [ERROR] [internal.VEDirectSerialBridgeHandler] - Invalid block: Csum 5875!
2021-10-01 07:58:25.896 [ERROR] [internal.VEDirectSerialBridgeHandler] - 
H1	-76272
H2	0
H3	0
H4	0
H5	0
H6	-813142
H7	24310
H8	29052
H9	0
H10	6
H11	0
H12	0
H15	-23
H16	0
H17	2077
H18	2159
Checksum	
2021-10-01 07:58:26.889 [ERROR] [internal.VEDirectSerialBridgeHandler] - Invalid block: Csum 7437!
2021-10-01 07:58:26.891 [ERROR] [internal.VEDirectSerialBridgeHandler] - 
PID	0xA389
V	26118
VS	-12
I	490
P	13
CE	0
SOC	1000
TTG	-1
Alarm	OFF
AR	0
BMV	SmartShunt 500A/50mV
FW	0407
MON	0
Checksum	u
...

events.log:

2021-10-01 07:58:21.899 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2021-10-01 07:58:22.099 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from UNINITIALIZED to INITIALIZING
2021-10-01 07:58:22.128 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from INITIALIZING to UNKNOWN
2021-10-01 07:58:22.181 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Port in use: /dev/ttyUSB_shunt
2021-10-01 07:58:22.187 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2021-10-01 07:58:22.208 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from UNINITIALIZED to INITIALIZING
2021-10-01 07:58:22.214 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from INITIALIZING to ONLINE
2021-10-01 07:58:22.238 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from INITIALIZING to UNKNOWN
2021-10-01 07:58:22.270 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from UNINITIALIZED to INITIALIZING
2021-10-01 07:58:22.293 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from INITIALIZING to ONLINE
2021-10-01 07:58:22.300 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from UNKNOWN to ONLINE
2021-10-01 07:58:24.407 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from 0.74 to 0.44 A
2021-10-01 07:58:40.399 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from 0.44 A to 0.5 A
2021-10-01 07:58:56.400 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from 0.5 A to 0.49 A
2021-10-01 07:59:12.397 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from 0.49 A to 0.46 A
2021-10-01 07:59:27.406 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from 0.46 A to 0.52 A
2021-10-01 07:59:30.289 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from ONLINE to UNINITIALIZED
2021-10-01 07:59:30.314 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2021-10-01 07:59:30.317 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from OFFLINE (COMMUNICATION_ERROR): Port in use: /dev/ttyUSB_shunt to UNINITIALIZED
2021-10-01 07:59:30.341 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-10-01 07:59:30.344 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2021-10-01 07:59:42.396 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from 0.52 A to 0.48 A
2021-10-01 07:59:42.862 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from ONLINE to UNINITIALIZED
2021-10-01 07:59:42.882 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2021-10-01 07:59:42.887 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from ONLINE to UNINITIALIZED
2021-10-01 07:59:42.941 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2021-10-01 07:59:42.950 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)

Hm. Would you be able to send me a copy of your original openhab.log? Not sure why that checksum is coming up bad, will need to see the raw bytes. Will PM you my email address.

Dears,

I search a binding for OH2.
This binding runs only on OH3, right?

Thank you for your feedback

Any chance this project is still alive? I have a BMV-702 attached via USB (VE.direct) and I’m looking for a more direct way to communicate with it than over mqtt, as I’m currently doing.

Still is. Haven’t done a release though in a while for the latest OpenHAB. Will try to get something pushed out in the next few days.

2 Likes

That’s great news :slight_smile:
I tried the latest jar file on an Raspberry Pi 4 Model B Rev 1.1 running openHAB 3.3.0 - Release Build with just one VE.Direct serial cable attached. Openhab detects the cable, but I cannot see the device connected to it, a BMV-702, in the GUI. I can see all the values in the log, though. Should this already work on openHAB 3.3? I 'd be happy to do some testing/validation/etc.

From the log:

21:40:42.206 [INFO ] [openhab.event.InboxAddedEvent        ] - Discovery Result with UID 'vedirect:serial:VE4WQMJU' has been added.
21:40:42.206 [INFO ] [ig.discovery.internal.PersistentInbox] - Added new thing 'vedirect:serial:VE4WQMJU' to inbox.


21:44:35.996 [ERROR] [covery.VEDirectDeviceDiscoveryService] - Declaring Unknown Device
21:44:36.929 [ERROR] [.internal.VEDirectSerialBridgeHandler] - vedirect:serial:VE4WQMJU: Invalid block: Csum 6413 !
21:44:36.933 [ERROR] [.internal.VEDirectSerialBridgeHandler] - vedirect:serial:VE4WQMJU: 
PID	0x204
V	24237
I	-2299
P	-56
CE	-10694
SOC	962
TTG	4277
Alarm	OFF
Relay	OFF
AR	0
BMV	702
FW	0311
Checksum	A
21:44:37.017 [ERROR] [.internal.VEDirectSerialBridgeHandler] - vedirect:serial:VE4WQMJU: Invalid block: Csum 6899 !
21:44:37.021 [ERROR] [.internal.VEDirectSerialBridgeHandler] - vedirect:serial:VE4WQMJU: 
H1	-155119
H2	-10695
H3	-130587
H4	2
H5	0
H6	-8658849
H7	10
H8	30891
H9	25463
H10	135
H11	0
H12	0
H15	1
H16	11
H17	21465
H18	23750
Checksum