Victron Energy VE.direct binding

you’re rigtht, I read the other day, that GPS, tank sensors and temperatures can be integrated within Venus OS; but after re-reading it seems, they’re NOT VE.direct, but USB-dongles again! :wink:
so, yeah that’s not VE.direct based and therefore not included in your binding! :wink:

I just updated the jar with a version that auto-detects VE.Direct serial cables. Mucking about w/the udev stuff is still necessary if you have more than one device that ends up as /dev/ttyUSBX (and you will likely need to manually change the auto-detected /dev/ttyUSBX to your custom name). But I’d wanted to get this change done as it sets the full item names to: vedirect:bmv:VE4O3XXR:HQ2101T1RM2:battery1_current1, where the ID’s are the serial # of the cable and the serial # of the attached device. Just makes some stuff easier for debugging and adding/removing the devices. So now, setup should be as easy as plugging in a VE.direct cable and it will show up in your inbox, and after adding it as a Thing, the attached device will then show up in your inbox to be added as well.

oh! I don’t have the factory VE.direct cables. I soldered my own for a fraction of the price… :wink:
I just use CP2104 USB to TTL modules with Micro JST connectors… nonetheless I have added those to my udev-rules and now I have to drive up to my RV to test it out…

PS: I did come across a “Layer 8”-error! :wink:

  1. don’t use the /dev/tty... but the way longer /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_008B6F5A-if00-port0
  2. crash OH3 - it restarts! :wink:
2021-09-28 16:45:10.635 [INFO ] [internal.VEDirectSerialBridgeHandler] - Unknown: HERE2
2021-09-28 16:45:10.682 [INFO ] [internal.VEDirectSerialBridgeHandler] - Initializing VEDirect Serial Bridge: /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_008B834F-if00-port0

btw, “HERE2” still is present with udev-rules:

2021-09-28 16:51:27.370 [INFO ] [internal.VEDirectSerialBridgeHandler] - Unknown: HERE2
2021-09-28 16:51:27.421 [INFO ] [internal.VEDirectSerialBridgeHandler] - Initializing VEDirect Serial Bridge: /dev/ttyUSB_solar
2021-09-28 16:51:27.408 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from UNINITIALIZED to INITIALIZING
2021-09-28 16:51:27.429 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from INITIALIZING to UNKNOWN
2021-09-28 16:51:27.433 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Invalid port: /dev/ttyUSB_solar

(I don’t have it connected, so that explains the “Communication Error”)

I think you need to add /dev/ttyUSB_solar to your startup args"

-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB_solar

The error you’re hitting is before it even tries to open the serial port, it can’t find it in OpenHAB’s SerialPortManager. Also it’s weird that the long version doesn’t work… Wonder why OpenHAB would put a char limit in place.

Put up an updated version that should be less likely to get the serial ports in a mucked up state.

1 Like

I could connect fine (I added the openhab user to the tty group). Buuuut, after that I have the thing… but how can I add channels?

The bridge doesn’t have any channels. It will detect what’s attached and create a new Thing in your inbox for a solar controller/BMV/Inverter/whatever that will have the channels.

That didn’t happen with my Setup. I’ll try again later and are there any more information in DEBUG mode? Then I’ll put the binding in debig/trace before…

If you wish to have solution which does not require playing with udev you can give a shot to [co7io] Persistent serial port identifier provider for openhab. This is openhab side implementation of same logic which binds serial port to specific hardware and not identifier assigned by linux.

1 Like

Yea, if you set the logging to debugging there will be some more info, and I can add a bunch more if necessary. Post everything you’re seeing I guess.

1 Like

ok, didn’t set to TRACE yet, but now I got this (probaply overlooked it the day before):

2021-09-30 15:49:04.120 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'vedirect:bmv:VEDirectSolar:HQ2050G12MZ' to inbox.
2021-09-30 15:49:04.121 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'vedirect:bmv:VEDirectSolar:HQ2050G12MZ' has been added.

So right now I could add both Things, added all channels as equipment to my model and got this:

2021-09-30 15:49:38.724 [INFO ] [internal.VEDirectSerialBridgeHandler] - Initializing VEDirect Serial Bridge: /dev/ttyUSB_shunt
2021-09-30 15:49:38.743 [INFO ] [internal.VEDirectSerialBridgeHandler] - Connecting to VE.Direct using /dev/ttyUSB_shunt.
2021-09-30 15:49:39.086 [ERROR] [internal.VEDirectSerialBridgeHandler] - Invalid block: Csum 9879!
2021-09-30 15:49:39.089 [ERROR] [internal.VEDirectSerialBridgeHandler] - 70001000056A0FF58
PID	0xA056
FW	156
SER#	HQ18044A75V
V	27010
I	1400
VPV	74100
PPV	41
CS	5
MPPT	1
OR	0x00000000
ERR	0
LOAD	ON
H19	17654
H20	36
H21	112
H22	144
H23	450
HSDS	93
Checksum	h
==> /var/log/openhab/events.log <==
2021-09-30 15:49:38.733 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from OFFLINE (COMMUNICATION_ERROR): Invalid port: ttyUSB_shunt to UNKNOWN
2021-09-30 15:49:38.778 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from UNKNOWN to ONLINE
==> /var/log/openhab/openhab.log <==
2021-09-30 15:49:40.090 [ERROR] [overy.VEDirectDeviceDiscoveryService] - Declaring Unknown Device
2021-09-30 15:49:40.096 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'vedirect:mppt:VEDirectShunt:HQ18044A75V' to inbox.
==> /var/log/openhab/events.log <==
2021-09-30 15:49:40.096 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'vedirect:mppt:VEDirectShunt:HQ18044A75V' has been added.
2021-09-30 15:51:11.916 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from UNINITIALIZED to INITIALIZING
2021-09-30 15:51:11.931 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from INITIALIZING to ONLINE
==> /var/log/openhab/openhab.log <==
2021-09-30 15:51:16.929 [ERROR] [irect.internal.VEDirectDeviceHandler] - Trying to update yesterday_max_power
2021-09-30 15:51:16.945 [ERROR] [irect.internal.VEDirectDeviceHandler] - Trying to update yesterday_yield
2021-09-30 15:51:38.194 [WARN ] [re.thing.internal.ThingFactoryHelper] - Could not create channel 'relay', because channel type 'vedirect:switch' could not be found.
==> /var/log/openhab/events.log <==
2021-09-30 15:51:38.213 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from UNINITIALIZED to INITIALIZING
2021-09-30 15:51:38.230 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from INITIALIZING to ONLINE
==> /var/log/openhab/openhab.log <==
2021-09-30 15:51:43.227 [ERROR] [irect.internal.VEDirectDeviceHandler] - Trying to update yesterday_max_power
2021-09-30 15:51:43.246 [ERROR] [irect.internal.VEDirectDeviceHandler] - Trying to update yesterday_yield
2021-09-30 15:52:59.816 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: vedirect:switch
2021-09-30 15:53:06.693 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: vedirect:switch
2021-09-30 15:53:24.052 [WARN ] [ore.internal.thing.ThingTypeResource] - Cannot find channel type: vedirect:switch

I just activated TRACE logging in the console log:set TRACE org.openhab.binding.VEDirect I get the following:

2021-09-30 16:06:46.634 [INFO ] [internal.VEDirectSerialBridgeHandler] - Initializing VEDirect Serial Bridge: /dev/ttyUSB_shunt
2021-09-30 16:06:46.672 [INFO ] [internal.VEDirectSerialBridgeHandler] - Connecting to VE.Direct using /dev/ttyUSB_shunt.
==> /var/log/openhab/events.log <==
2021-09-30 16:06:46.605 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-09-30 16:06:46.642 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from INITIALIZING to UNKNOWN
2021-09-30 16:06:46.712 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2021-09-30 16:06:46.737 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:mppt:VEDirectShunt:BinderSolar' changed from INITIALIZING to ONLINE
2021-09-30 16:06:46.752 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectShunt' changed from UNKNOWN to ONLINE
==> /var/log/openhab/openhab.log <==
2021-09-30 16:06:47.499 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
==> /var/log/openhab/events.log <==
2021-09-30 16:06:47.526 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ControllerState' changed from NULL to FLOAT
2021-09-30 16:06:47.580 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ChargerVoltage' changed from NULL to 27.02 V
2021-09-30 16:06:47.751 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ChargerCurrent' changed from NULL to 1.5 A
==> /var/log/openhab/openhab.log <==
2021-09-30 16:06:48.514 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
==> /var/log/openhab/events.log <==
2021-09-30 16:06:48.388 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_PanelVoltage' changed from NULL to 73.03 V
2021-09-30 16:06:48.532 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_PanelPower' changed from NULL to 43.28 W
==> /var/log/openhab/openhab.log <==
2021-09-30 16:06:49.516 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:50.257 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:06:50.503 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:51.244 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:06:51.504 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:51.734 [ERROR] [irect.internal.VEDirectDeviceHandler] - Trying to update yesterday_max_power
2021-09-30 16:06:51.758 [ERROR] [irect.internal.VEDirectDeviceHandler] - Trying to update yesterday_yield
2021-09-30 16:06:51.870 [INFO ] [internal.VEDirectSerialBridgeHandler] - Initializing VEDirect Serial Bridge: /dev/ttyUSB_solar
2021-09-30 16:06:51.888 [INFO ] [internal.VEDirectSerialBridgeHandler] - Connecting to VE.Direct using /dev/ttyUSB_solar.
==> /var/log/openhab/events.log <==
2021-09-30 16:06:51.809 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_MaxPowerYesterday' changed from NULL to 450 W
2021-09-30 16:06:51.842 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2021-09-30 16:06:51.884 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from INITIALIZING to UNKNOWN
2021-09-30 16:06:51.914 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2021-09-30 16:06:51.936 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:serial:VEDirectSolar' changed from UNKNOWN to ONLINE
2021-09-30 16:06:51.951 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'vedirect:bmv:VEDirectSolar:BinderShunt' changed from INITIALIZING to ONLINE
==> /var/log/openhab/openhab.log <==
2021-09-30 16:06:52.505 [ERROR] [internal.VEDirectSerialBridgeHandler] - Invalid block: Csum 54472!
2021-09-30 16:06:52.508 [ERROR] [internal.VEDirectSerialBridgeHandler] - 7D1ED00900000
PID	0xA056
FW	156
SER#	HQ18044A75V
V	27020
I	1400
VPV	73090
PPV	41
CS	5
MPPT	1
OR	0x00000000
ERR	0
LOAD	ON
H19	17655
H20	37
H21	112
H22	144
H23	450
HSDS	93
Checksum	^
2021-09-30 16:06:53.498 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:53.622 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
==> /var/log/openhab/events.log <==
2021-09-30 16:06:53.619 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from NULL to 0.77 A
2021-09-30 16:06:53.632 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Percentage' changed from NULL to 100 %
==> /var/log/openhab/openhab.log <==
2021-09-30 16:06:54.500 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:54.605 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:06:55.503 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:55.605 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:06:56.307 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:06:56.504 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:56.602 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:06:56.949 [ERROR] [irect.internal.VEDirectDeviceHandler] - Trying to update yesterday_max_power
2021-09-30 16:06:56.968 [ERROR] [irect.internal.VEDirectDeviceHandler] - Trying to update yesterday_yield
2021-09-30 16:06:57.515 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:58.517 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:06:59.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:06:59.520 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:00.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -9
2021-09-30 16:07:00.514 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:01.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:01.517 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:02.098 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:02.527 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:03.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
==> /var/log/openhab/events.log <==
2021-09-30 16:07:02.928 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ChargerCurrent' changed from 1.5 A to 1.4 A
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:03.341 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:07:03.537 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:04.102 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
==> /var/log/openhab/events.log <==
2021-09-30 16:07:03.536 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_PanelPower' changed from 43.28 W to 40.62 W
2021-09-30 16:07:03.545 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ChargerVoltage' changed from 27.02 V to 27.01 V
2021-09-30 16:07:03.547 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_PanelVoltage' changed from 73.03 V to 73.11 V
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:04.532 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:05.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:05.533 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:06.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:06.537 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:07.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:07.539 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:08.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -9
2021-09-30 16:07:08.553 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:09.105 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
==> /var/log/openhab/events.log <==
2021-09-30 16:07:09.113 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from 0.77 A to 0.8 A
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:09.534 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:10.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:10.396 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:07:10.538 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:11.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:11.548 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:12.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:12.553 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:13.099 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:13.553 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:14.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:14.569 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:14.571 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:07:15.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:15.560 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:16.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:16.569 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:17.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:17.575 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:18.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
==> /var/log/openhab/events.log <==
2021-09-30 16:07:18.120 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ChargerCurrent' changed from 1.4 A to 1.5 A
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:18.584 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:19.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
==> /var/log/openhab/events.log <==
2021-09-30 16:07:18.588 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_PanelPower' changed from 40.62 W to 41.29 W
2021-09-30 16:07:18.597 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_PanelVoltage' changed from 73.11 V to 73.14 V
2021-09-30 16:07:18.600 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ChargerVoltage' changed from 27.01 V to 27.02 V
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:19.570 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:20.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:20.569 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:21.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:21.572 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:22.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:22.572 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:23.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:23.590 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:23.593 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:07:24.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:24.590 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:25.103 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
==> /var/log/openhab/events.log <==
2021-09-30 16:07:25.112 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartShunt500A_Battery1_Current1' changed from 0.8 A to 0.74 A
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:25.592 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:26.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -10
2021-09-30 16:07:26.595 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:26.601 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:07:27.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:27.604 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:28.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:28.607 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:28.610 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:07:29.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:29.607 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:30.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:30.592 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:31.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:31.608 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:31.612 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:07:32.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:32.606 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:33.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
2021-09-30 16:07:33.602 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:34.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
==> /var/log/openhab/events.log <==
2021-09-30 16:07:33.309 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ChargerCurrent' changed from 1.5 A to 1.4 A
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:34.603 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:34.607 [WARN ] [irect.internal.VEDirectDeviceHandler] - Unknown ASYNC msg: 0207: 00 00 00 00
2021-09-30 16:07:35.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
==> /var/log/openhab/events.log <==
2021-09-30 16:07:34.497 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_PanelPower' changed from 41.29 W to 40.3 W
2021-09-30 16:07:34.499 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_PanelVoltage' changed from 73.14 V to 73.32 V
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:35.613 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:36.100 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11
==> /var/log/openhab/events.log <==
2021-09-30 16:07:35.624 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BinderSmartSolarMPPT10030_ChargerVoltage' changed from 27.02 V to 27.01 V
==> /var/log/openhab/openhab.log <==
2021-09-30 16:07:36.605 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  FW : 156
2021-09-30 16:07:37.101 [ERROR] [irect.internal.VEDirectDeviceHandler] - Unknown TEXT msg:  VS : -11

One more problem: I don’t seem to to get the Binding out of DEBUG-Logging…?


As you can see, I set the log-level to INFO again, but it keeps spitting out all DEBUG information… :wink:

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