Fabian-Schmidt / esphome-victron_ble

Use official Victron BLE endpoint for fetching data from Victron devices via Bluetooth LE via ESPHome.
GNU General Public License v3.0
152 stars 15 forks source link

Readout of Victron DC/DC charger Orion XS #50

Closed terdt closed 2 months ago

terdt commented 2 months ago

I

terdt commented 2 months ago

I replaced the Orion-Tr Smart DC/DC by the new Orion XS charger. In the yaml I replaced the mac address and the encryption key by the Orion XS data. But it's not working out of the box as I expected. What can I do ?

Fabian-Schmidt commented 2 months ago

Can you please provide a log from the ESP device? And also which values do you see in the Victron App on the overview page (before you connect to the device). This is the same datasource.

terdt commented 2 months ago

yes, of course, it is a little bit overloaded due to the amount of services which are running on the ESP

logs_womo-1_logs.txt

Fabian-Schmidt commented 2 months ago

yes, of course, it is a little bit overloaded due to the amount of services which are running on the ESP

logs_womo-1_logs.txt

Thanks for the log. It contains the following message:

[W][victron_ble:266]: [xx:xx:xx:xx:xx:xx] Unsupported record type 0F

This means victron has not documented this type of device. As I am not affiliated with Victron I only have access to public resources and to two devices which I purchased myself. Either ask victron to update the announcement protocol definition to include this new device or we need to guess the data / protocol structure. This would require a couple of examples and the corresponding data from the app.

Please let me know which way you want to go?

terdt commented 2 months ago

please see screenshot

IMG_6233

terdt commented 2 months ago

Do you know which document have to be updated and where could I find it ?

Fabian-Schmidt commented 2 months ago

The documentation is in the victron community https://community.victronenergy.com/questions/187303/victron-bluetooth-advertising-protocol.html

See pdf in top post.

terdt commented 2 months ago

This document is quite old and can not be found on an official Victron page. I assume the Victron path could be quite difficult. Does following info can help ? https://github.com/keshavdv/victron-ble/issues/53 If not what do you need and how can I support ?

Fabian-Schmidt commented 2 months ago

To support the device I will create a separate branch and start writing some stub code. Afterwards I need some verbose logs from you and the corresponding data displayed in the victron app in the overview page. As there are only 5 values it should be relative easy.

Fabian-Schmidt commented 2 months ago

I added a new branch for Orion XS suport.

Can you please create a new config with minimal components and verbose level. E.g.:

external_components:
  - source: github://Fabian-Schmidt/esphome-victron_ble@OrionXS

logger:
  level: VERBOSE

To add support for the device I need a few example values from the log. There should be a message Encrypted message:. And the corresponding value displayed in the Victron App. To identify the various states (Zustände) I need an example for each one. As none of the values can be negative 4-5 examples should be enough. It would be great if the Input and Output (Eingang und Ausgang) have a larger voltage difference (at least 0.5V) to make it easier to find them.

Thanks

terdt commented 2 months ago

Please find attached some data. Hopeful it is enough for evaluation. Otherwise I have to see how to log data during driving.

Victron_log.csv

Fabian-Schmidt commented 2 months ago

Hi, I added support can you please test?

To ensure you get the latest version please use the following external reference:

external_components:
  - source: github://Fabian-Schmidt/esphome-victron_ble@OrionXS
    refresh: 0s

I added two additional sensor types to support the device OUTPUT_CURRENT and INPUT_CURRENT. The device supports the following sensor types:

Can you please test and let me know if it is working.

Cheers, Fabian

terdt commented 2 months ago

Hi Fabian, test passed successful. Thanks a lot. Will you include as standard ? Kind Regards Thomas

Fabian-Schmidt commented 2 months ago

Yes I will include it as standard. In a few days I will review the code changes and then merge it.

Have you tested all the sensor types and they present correct values?

terdt commented 2 months ago

I have not compared all digits behind the comma, but in general all sensors reflects the values in the App. The text sensors are in English but this is also normal