Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback: Battery Sense and Orion Smart DCDC is working #20

Closed
HBK1 opened this issue Aug 7, 2023 · 6 comments
Closed

Feedback: Battery Sense and Orion Smart DCDC is working #20

HBK1 opened this issue Aug 7, 2023 · 6 comments

Comments

@HBK1
Copy link

HBK1 commented Aug 7, 2023

Victron Battery Sense reports as Battery Monitor and presents BATTERY_VOLTAGE and TEMPERATURE.
Orion Smart DCDC needs a filter on OUTPUT_VOLTAGE since it reports 0x7FFF=32767 when engine is off=Unavalible.
Both are working ok together with a Smartshunt and MPPT on the same ESP32.

See below config for DCDC and Battery Sense:

victron_ble:
  - id: MySmartDcdc
    mac_address: ${smart_dcdc_mac_address}
    bindkey: ${smart_dcdc_encryption_key}
  - id: MySmartBS
    mac_address: ${smart_bs_mac_address}
    bindkey: ${smart_bs_encryption_key}

sensor:
  # MySmartDcdc
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC Input Voltage"
    type: INPUT_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC Output Voltage"
    type: OUTPUT_VOLTAGE
   # DCDC reports 0x7FFF=32767 when off=Unavalible 
    filters:
      - filter_out: 327.67

  # MySmartBS
  - platform: victron_ble
    victron_ble_id: MySmartBS
    name: "BS voltage"
    type: BATTERY_VOLTAGE
  - platform: victron_ble
    victron_ble_id: MySmartBS
    name: "BS temperature"
    type: TEMPERATURE

binary_sensor:
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC is in Fault state"
    type: DEVICE_STATE_FAULT
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC has Error"
    type: CHARGER_ERROR

text_sensor:
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC state"
    type: DEVICE_STATE
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC Error reason"
    type: CHARGER_ERROR
  - platform: victron_ble
    victron_ble_id: MySmartDcdc
    name: "DCDC Off reason"
    type: OFF_REASON

@HBK1 HBK1 changed the title Feedback Battery Sense and Orion Smart DCDC is working Feedback: Battery Sense and Orion Smart DCDC is working Aug 7, 2023
@benderl
Copy link

benderl commented Aug 12, 2023

Similar results here with an OrionSmart DC-DC charger. If the charger is off, the output voltage is shown as 327.67 V. This should be filtered.

Everything else, including data from my SmartSolar 75-15, is displayed as expected. Great Work!

@Fabian-Schmidt
Copy link
Owner

Should the component submit no value (like your filter), 0.0 or NAN in this scenario? I am unsure what would work best.

@HBK1
Copy link
Author

HBK1 commented Aug 18, 2023

My filter is causing HA to keep the last value which may not be so good.
I would rather prefer 0.0 as this is the real value and what keshavdv does.
NAN will present Unavalible in HA and may disturb further calculations of energy.

Fabian-Schmidt pushed a commit that referenced this issue Aug 18, 2023
@Fabian-Schmidt
Copy link
Owner

Hi @HBK1, can you please test the changes?
You might need to add refresh: 0s to the external_components to ensure you use the latest version for testing.

@HBK1
Copy link
Author

HBK1 commented Aug 18, 2023

It is working ok with 0.0V , Thanks!

There is a warning in the log, is this anything to be worried about?

[15:30:27][D][sensor:094]: 'SH Time remaining': Sending state 65535.00000 min with 0 decimals of accuracy
[15:30:27][D][sensor:094]: 'SH Battery voltage': Sending state 13.34000 V with 2 decimals of accuracy
[15:30:27][D][sensor:094]: 'SH Starter Battery': Sending state 12.77000 V with 2 decimals of accuracy
[15:30:27][D][sensor:094]: 'SH Current': Sending state 0.11400 A with 3 decimals of accuracy
[15:30:27][D][sensor:094]: 'SH Consumed Ah': Sending state -3.90000 Ah with 1 decimals of accuracy
[15:30:27][D][sensor:094]: 'SH State of charge': Sending state 98.60000 % with 1 decimals of accuracy
[15:30:27][D][text_sensor:064]: 'SH Battery Alarm reason': Sending state ''
[15:30:27][W][component:204]: Component victron_ble took a long time for an operation (0.06 s).
[15:30:27][W][component:205]: Components should block for at most 20-30ms.
[15:30:28][D][victron_ble:247]: [F2:F0:E7:44:35:3D] Recieved BATTERY_MONITOR message.
[15:30:28][D][victron_ble:247]: [C3:9C:38:27:0A:0A] Recieved BATTERY_MONITOR message.
[15:30:28][D][victron_ble:247]: [C3:9C:38:27:0A:0A] Recieved BATTERY_MONITOR message.
[15:30:29][D][sensor:094]: 'MPPT Battery Voltage': Sending state 13.35000 V with 2 decimals of accuracy
[15:30:29][D][sensor:094]: 'MPPT Battery Current': Sending state 1.10000 A with 3 decimals of accuracy
[15:30:29][D][sensor:094]: 'MPPT Yield Today': Sending state 0.11000 kWh with 2 decimals of accuracy
[15:30:29][D][sensor:094]: 'MPPT PV Power': Sending state 15.00000 W with 0 decimals of accuracy
[15:30:29][D][sensor:094]: 'MPPT Load Current': Sending state -0.00000 A with 1 decimals of accuracy
[15:30:29][D][text_sensor:064]: 'MPPT state': Sending state 'Float'
[15:30:29][D][text_sensor:064]: 'MPPT Error reason': Sending state ''
[15:30:29][W][component:204]: Component victron_ble took a long time for an operation (0.05 s).
[15:30:29][W][component:205]: Components should block for at most 20-30ms.
[15:30:29][D][victron_ble:247]: [F2:F0:E7:44:35:3D] Recieved BATTERY_MONITOR message.
[15:30:29][D][victron_ble:247]: [C3:9C:38:27:0A:0A] Recieved BATTERY_MONITOR message.

@Fabian-Schmidt
Copy link
Owner

Fabian-Schmidt commented Aug 18, 2023

The warning is because EspHome changed the log level of this message from verbose to warn.
Tracking this warning in a seperate issue #22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants