Solax PV no longer shows up in the device list.
Closed this issue · 1 comments
Version
0.6.5 (current)
What version of VenusOS are you running on your GX device
3.21 (current release)
Does this issue occur during installation or at runtime ?
Runtime
Is there a Discussion thread for this issue? Please paste a link.
No response
What is the issue you are actually experiencing?
Hi,
I'm using a ESP device to read the values from my solax X1 mini PV inverter and provide the values via dbus mqtt to the Cerbo GX.
Unfortunately with the change to Firmware 3.21 the connection broke (upating from 3.14). The entry was still there but no values where received. I switched back to 3.14 and it worked again. So I assumed I probably need update the dbus-mqtt-devices to version 0.6.5.
This is the MQTT code from the ESPHome:
mqtt:
broker: 192.168.1.61 # +++ MQTT-Server
port: 1883
discovery: false
birth_message:
topic: device/${client_id}/Status
payload: '{"clientId": "${client_id}", "connected": 1, "version": "1", "services": {"${sensor_name}": "pvinverter"}}'
will_message:
topic: device/${client_id}/Status
payload: '{"clientId": "${client_id}", "connected": 0, "version": "1"}'
on_json_message:
topic: device/${client_id}/DBus
then:
- globals.set:
id: vrm_portal_id
value: !lambda |-
return x["portalId"];
- globals.set:
id: sensor_id
value: !lambda |-
return x["deviceInstance"]["${sensor_name}"];
- mqtt.publish_json:
# Anzeigename in Venus OS
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/CustomName", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = "Solax X1 boost";
- mqtt.publish_json:
# 0=AC input 1; 1=AC output; 2=AC input 2
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Position", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 1;
- mqtt.publish_json:
# Nennleistung des Wechselrichters in W
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/MaxPower", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 2000;
and the corresponding sensor data:
`sensor:
- platform: solax_x1_mini
ac_power:
name: "${name} ac power"
id: inverter_active_power
on_value:- mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/Power", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = id(inverter_active_power).state; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L1/Power", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = id(inverter_active_power).state; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L2/Power", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 0; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L3/Power", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 0;
energy_today:
name: "${name} energy today"
id: inverter_daily_energy
on_value: - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/Energy/Forward", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = id(inverter_daily_energy).state; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L1/Energy/Forward", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = id(inverter_daily_energy).state; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L2/Energy/Forward", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 0; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L3/Energy/Forward", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 0;
energy_total:
name: "${name} energy total"
dc1_voltage:
name: "${name} dc1 voltage"
dc2_voltage:
name: "${name} dc2 voltage"
dc1_current:
name: "${name} dc1 current"
dc2_current:
name: "${name} dc2 current"
ac_current:
name: "${name} ac current"
id: inverter_grid_current
on_value: - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/Current", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = id(inverter_grid_current).state; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L1/Current", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = id(inverter_grid_current).state; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L2/Current", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 0; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L3/Current", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 0;
ac_voltage:
name: "${name} ac voltage"
id: inverter_grid_voltage
on_value: - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/Voltage", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = id(inverter_grid_voltage).state; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L1/Voltage", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = id(inverter_grid_voltage).state; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L2/Voltage", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 0; - mqtt.publish_json:
topic: !lambda return str_sprintf("W/%s/pvinverter/%d/Ac/L3/Voltage", id(vrm_portal_id).c_str(), id(sensor_id));
payload: |-
root["value"] = 0;
ac_frequency:
name: "${name} ac frequency"
temperature:
name: "${name} temperature"
runtime_total:
name: "${name} runtime total"
mode:
name: "${name} mode"
error_bits:
name: "${name} error bits"
grid_voltage_fault:
name: "${name} grid voltage fault"
grid_frequency_fault:
name: "${name} grid frequency fault"
dc_injection_fault:
name: "${name} dc injection fault"
temperature_fault:
name: "${name} temperature fault"
pv1_voltage_fault:
name: "${name} pv1 voltage fault"
pv2_voltage_fault:
name: "${name} pv2 voltage fault"
gfc_fault:
name: "${name} gfc fault"`
- mqtt.publish_json:
I don't know if this is related to the driver or to the code I use. I can see the messages comming in with the MQTT Explorer.
If this is not installation related, what does the status payload look like that you are publishing to the driver to register your device?
I'll update the issue with some screenshots tomorrow from the MQTT Explorer in Cerbo Firmware Version 3.14 and 3.21
After the VenusOS upgrade did you run setup.sh again? You really need to check the log file in var/log/dbus-mqtt-devices/current to check for errors. Please attach the relevant section of the log.
From 0.6.5 onwards, you no longer need to run setup.sh after a venusOS upgrade. I have just released v0.6.6 I suggest you upgrade to that then check your system again.