Solar charger (Victron)
Victron solar chargers broadcast their readings encrypted over Bluetooth — no connection, no pairing at the charger. Your CampMatic listens in, decrypts them and passes on PV power, charge current and today's yield. All it takes is the key from the VictronConnect app, once. And today's yield has a quirk you should know about.
Before you start
Supported are Victron's SmartSolar MPPT solar charge controllers. The SmartShunt and BMV-712 Smart battery monitors work too — there is a section of its own for them below.
Your CampMatic reads the charger purely passively through a feature called Instant Readout: the charger broadcasts its readings encrypted over Bluetooth, your CampMatic listens and decrypts them. No connection and no pairing at the charger are needed — only the key.
sensor.<ENTITY>_firmware_version. If it is older, our support will update it on request — write to us via the help page. Until then the CampMatic app does not even offer Victron for pairing. Switch on Instant Readout in VictronConnect
Open VictronConnect and tap your charger — the factory PIN is 000000. Tap ⚙ at the top right, then ⋮ → Product info. Switch on "Instant readout via Bluetooth" there; the switch then reads "Enabled".
Copy the key
Next to "Instant readout details · Encryption data", tap SHOW. The Encryption Key is 32 characters long, digits and the letters a to f. Copy it rather than typing it — a single wrong character and your CampMatic cannot decrypt anything.
Close VictronConnect
Then close VictronConnect. While the app is connected to the charger, your CampMatic may not receive any readings.
Pair it in the CampMatic app
In the CampMatic app go to Devices → Add, choose Victron SmartSolar MPPT, tap your charger in the list and paste the key.
What the charger delivers
You read the slot number as described in the chapter Finding your sensors — Victron has its own configuration topic:
campmatic/<GERAETE_ID>/victron/config
[{"slot":6,"mac":"C8:1E:…","name":"Solar charger","key":"9f1c…"}]
victron/config holds the key as well as the slot and MAC address — your CampMatic needs it to decrypt. The topic is kept on the broker, and the bridge from chapter 4 mirrors it into your own broker through the line topic # both 0 campmatic/<GERAETE_ID>/ ….It is your own key, and it only allows reading, not controlling the charger. Still: if you share a capture, in a forum for instance, blank out the key first.
Up to nine readings arrive for a solar charger under that slot number — as plain numbers, without /state at the end. Your CampMatic does not send values that have no valid content:
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/pv_power PV power in W, integer
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/battery_voltage battery voltage in V, 2 decimals
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/battery_current charge current in A, 1 decimal
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/yield_today yield today in kWh, 2 decimals
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/state charge state as a number, see below
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/error error code, 0 = no error
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/load_current load output current in A
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/rssi signal strength in dBm
campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/product_id model ID in hex, e.g. A075
yield_today to zero at midnight but at the next sunrise. So in the evening and at night it still shows the day's yield, even after midnight. That is not a fault — and it makes no difference to the energy dashboard, more on that below. load_current only arrives on chargers that have a load output. If yours has none, that sensor simply stays empty.
state is the charge state as a number. A template sensor below turns it into plain text:
0 off
1 low power
2 fault
3 bulk
4 absorption
5 float
6 storage
7 equalize
245 starting
247 auto equalize
252 external control
error is the charger's error code. 0 means no error. Any other number is the one VictronConnect shows as Err N — for example:
0 no error
2 battery voltage too high
17 charger overheated
33 PV voltage too high
Whether your CampMatic can decrypt the charger at all is shown on a topic of its own. It holds a state st for every slot number:
campmatic/<GERAETE_ID>/victron/status
{…,"state":[{"slot":6,"st":"ok",…}]}
ok all fine, readings are arriving
key the key does not match the charger
off Instant Readout is switched off in the charger
none nothing has arrived from the charger yet
raw a Victron device that is neither a solar charger nor a SmartShunt
Creating the sensors
Again under the existing mqtt: sensor:. Replace <GERAETE_ID> and <SLOT_SOLAR> with your values.
- name: "Solar Charger PV Power"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_pv_power
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/pv_power"
unit_of_measurement: "W"
device_class: power
state_class: measurement
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "Solar Charger Battery Voltage"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_battery_voltage
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/battery_voltage"
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "Solar Charger Charge Current"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_battery_current
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/battery_current"
unit_of_measurement: "A"
device_class: current
state_class: measurement
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "Solar Charger Yield Today"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_yield_today
# The charger resets this at sunrise, not at midnight.
# total_increasing: Home Assistant detects the reset by itself.
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/yield_today"
unit_of_measurement: "kWh"
device_class: energy
state_class: total_increasing
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "Solar Charger Load Current"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_load_current
# Only on chargers with a load output — otherwise no value ever arrives.
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/load_current"
unit_of_measurement: "A"
device_class: current
state_class: measurement
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "Solar Charger Signal"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_rssi
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/rssi"
unit_of_measurement: "dBm"
device_class: signal_strength
state_class: measurement
entity_category: diagnostic
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
expire_after seconds without a new value a sensor turns "unavailable". 2700 seconds are 45 minutes — around eight readings from your CampMatic. Only when nothing arrives for that long is the charger really gone, for example out of range, Instant Readout off, or VictronConnect possibly still connected. It is the same value as for every other sensor in this guide.If you want to notice sooner that the charger is missing, you can go down to 1800. Do not go shorter: individual readings do get missed, after a restart of your CampMatic for instance, and the sensor would then flicker for no reason.
Charge state and faults
For the charge state and the error code you first create two diagnostic values, again under mqtt: sensor:. They keep the number, which automations can work with easily. On top comes a sensor that picks the reception state for your slot number out of victron/status:
- name: "Solar Charger Charge State Code"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_state
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/state"
entity_category: diagnostic
icon: mdi:numeric
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "Solar Charger Error Code"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_error
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/error"
entity_category: diagnostic
icon: mdi:alert-circle-outline
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "Solar Charger Reception"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_link
# State of this slot number from victron/status.
state_topic: "campmatic/<GERAETE_ID>/victron/status"
value_template: >-
{% set s = value_json.state | default([]) | selectattr('slot', 'eq', <SLOT_SOLAR>) | list %}
{% set st = s[0].st if s else 'none' %}
{{ {'ok': 'ok', 'key': 'key does not match', 'off': 'Instant Readout off',
'none': 'nothing received yet', 'raw': 'other device type'}.get(st, st) }}
entity_category: diagnostic
icon: mdi:bluetooth
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
A template sensor works out the plain-text charge state. It belongs under template: sensor: — you probably have that section from chapters 6 and 9 already, in which case the entry simply joins it:
template:
- sensor:
- name: "Solar Charger Charge State"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_state_text
icon: mdi:solar-power
availability: >-
{{ states('sensor.solar_charger_charge_state_code') not in ['unknown','unavailable'] }}
state: >-
{% set c = states('sensor.solar_charger_charge_state_code') | int(-1) %}
{{ {0: 'off', 1: 'low power', 2: 'fault', 3: 'bulk', 4: 'absorption',
5: 'float', 6: 'storage', 7: 'equalize', 245: 'starting',
247: 'auto equalize', 252: 'external control'}.get(c, 'unknown (code ' ~ c ~ ')') }}
The fault comes as a binary_sensor. If you already have that section from the chapters Truma LevelControl or Gas scale, add the entry there. Otherwise create it once now, at the same level as sensor:.
# Separate section — same level as "sensor:"
binary_sensor:
# Goes on as soon as the charger reports an error code (error not 0).
- name: "Solar Charger Fault"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SOLAR>_fault
state_topic: "campmatic/<GERAETE_ID>/victron/solar_<SLOT_SOLAR>/error"
value_template: "{{ 'ON' if value | int(0) != 0 else 'OFF' }}"
device_class: problem
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
Energy dashboard
Solar Charger Yield Today is set up so that Home Assistant accepts it as solar production: device_class: energy, unit kWh and state_class: total_increasing. Add it as solar production in the settings of the energy dashboard.
total_increasing a drop in value counts as a new start of the meter, not as negative yield. So it does not matter that the charger jumps to zero at sunrise rather than at midnight — Home Assistant adds up the days correctly. The finished dashboard from the chapter Building the dashboard also has a Solar group with PV power, battery, today's yield and the history of the last 48 hours.
SmartShunt and BMV-712 Smart
Your CampMatic also reads the SmartShunt and BMV-712 Smart battery monitors. Setup works the same way: switch on Instant Readout, copy the key, close VictronConnect. In the CampMatic app you then choose Victron SmartShunt / BMV. The topic uses the word shunt instead of solar:
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/soc state of charge in %
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/voltage battery voltage in V
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/current current in A — negative means discharging
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/consumed_ah consumed amp hours, negative
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/remaining_min time left in minutes
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/alarm alarms as a bit mask
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/aux_mode what the aux input is used for
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/starter_voltage starter battery in V } depending
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/midpoint_voltage midpoint in V } on the
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/temperature temperature in °C } aux input
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/rssi signal strength in dBm
campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/product_id model ID in hex
You create the most important values like this — again under mqtt: sensor:, with the shunt's slot number instead of the solar charger's:
- name: "SmartShunt State of Charge"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SHUNT>_soc
state_topic: "campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/soc"
unit_of_measurement: "%"
device_class: battery
state_class: measurement
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "SmartShunt Voltage"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SHUNT>_voltage
state_topic: "campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/voltage"
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "SmartShunt Current"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SHUNT>_current
# Negative means: the battery is being discharged.
state_topic: "campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/current"
unit_of_measurement: "A"
device_class: current
state_class: measurement
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "SmartShunt Consumed"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SHUNT>_consumed_ah
state_topic: "campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/consumed_ah"
unit_of_measurement: "Ah"
state_class: measurement
icon: mdi:battery-minus
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "SmartShunt Time Left"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SHUNT>_remaining
state_topic: "campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/remaining_min"
unit_of_measurement: "min"
device_class: duration
state_class: measurement
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
- name: "SmartShunt Signal"
unique_id: campmatic_<GERAETE_ID>_victron_<SLOT_SHUNT>_rssi
state_topic: "campmatic/<GERAETE_ID>/victron/shunt_<SLOT_SHUNT>/rssi"
unit_of_measurement: "dBm"
device_class: signal_strength
state_class: measurement
entity_category: diagnostic
expire_after: 2700
availability_topic: "campmatic/<GERAETE_ID>/status"
payload_available: "online"
payload_not_available: "offline"
Then check the configuration and restart Home Assistant.
- Instant Readout is switched on, the charger is paired in the CampMatic app and VictronConnect is closed
- PV power and battery voltage show values, Solar Charger Reception reads ok
- Solar Charger Fault reads OK