Good evening, could someone explain to me why my entities are unknown? My broker retrieves the Solix topic with 2 lines but the mqtt integration does not show the battery. I just have entities but none of them give a value. Thanks
- I installed the add-on.
- Entered my username, password and country in the configuration.
- Started the add-on.
- With MQTTexplorer I searched for the data that interests me.
- Created mqtt sensors in my yaml.
Here are my mqtt sensors for my two Powerbank:
# Anker Solix1
- name: "Puissance de sortie"
state_topic: "solix/site/Solix1/scenInfo"
value_template: "{{ value_json.solarbank_info.total_output_power }}"
unit_of_measurement: "W"
unique_id: "puissance_sortie_solix_1"
icon: "mdi:lightning-bolt"
device_class: "power"
state_class: "measurement"
- name: "Puissance d'entrée"
state_topic: "solix/site/Solix1/scenInfo"
value_template: "{{ value_json.solarbank_info.total_photovoltaic_power | float }}"
unit_of_measurement: "W"
unique_id: "puissance_entree_solix_1"
icon: "mdi:lightning-bolt"
device_class: "power"
state_class: "measurement"
- name: "Puissance de charge"
state_topic: "solix/site/Solix1/scenInfo"
value_template: "{{ value_json.solarbank_info.total_charging_power | float }}"
unit_of_measurement: "W"
unique_id: "puissance_charge_solix_1"
icon: "mdi:lightning-bolt"
device_class: "power"
state_class: "measurement"
- name: "Capacité batterie"
state_topic: "solix/site/Solix1/scenInfo"
value_template: "{{ value_json.solarbank_info.total_battery_power | float * 100 }}"
unit_of_measurement: "%"
unique_id: "capacite_solix_1"
icon: "mdi:car-battery"
device_class: "power_factor"
state_class: "measurement"
- name: "Statut charge"
state_topic: "solix/site/Solix1/scenInfo"
value_template: "{{ value_json.solarbank_info.solarbank_list.0.charging_status }}"
unique_id: "statut_charge_solix_1"
- name: "Energie"
state_topic: "solix/site/Solix1/scenInfo"
value_template: "{{ value_json.statistics[0].total | float }}"
unit_of_measurement: "kWh"
unique_id: "energie_solix_1"
device_class: "energy"
state_class: "total_increasing"
icon: "mdi:transmission-tower-import"
- name: "ParamĂštre puissance sortie"
state_topic: "solix/site/Solix1/scenInfo"
value_template: "{{ value_json.retain_load }}"
unique_id: "parametre_puissance_sortie_solix_1"
# Anker Solix2
- name: "Puissance de sortie 2"
state_topic: "solix/site/Solix2/scenInfo"
value_template: "{{ value_json.solarbank_info.total_output_power }}"
unit_of_measurement: "W"
unique_id: "puissance_sortie_solix82"
icon: "mdi:lightning-bolt"
device_class: "power"
state_class: "measurement"
- name: "Puissance d'entrée 2"
state_topic: "solix/site/Solix2/scenInfo"
value_template: "{{ value_json.solarbank_info.total_photovoltaic_power | float }}"
unit_of_measurement: "W"
unique_id: "puissance_entree_solix_2"
icon: "mdi:lightning-bolt"
device_class: "power"
state_class: "measurement"
- name: "Puissance de charge 2"
state_topic: "solix/site/Solix2/scenInfo"
value_template: "{{ value_json.solarbank_info.total_charging_power | float }}"
unit_of_measurement: "W"
unique_id: "puissance_charge_solix_2"
icon: "mdi:lightning-bolt"
device_class: "power"
state_class: "measurement"
- name: "Capacité batterie 2"
state_topic: "solix/site/Solix2/scenInfo"
value_template: "{{ value_json.solarbank_info.total_battery_power | float * 100 }}"
unit_of_measurement: "%"
unique_id: "capacite_solix_2"
icon: "mdi:car-battery"
device_class: "power_factor"
state_class: "measurement"
- name: "Statut charge 2"
state_topic: "solix/site/Solix2/scenInfo"
value_template: "{{ value_json.solarbank_info.solarbank_list.0.charging_status }}"
unique_id: "statut_charge_solix_2"
- name: "Energie 2"
state_topic: "solix/site/Solix2/scenInfo"
value_template: "{{ value_json.statistics[0].total | float }}"
unit_of_measurement: "kWh"
unique_id: "energie_solix_2"
device_class: "energy"
state_class: "total_increasing"
icon: "mdi:transmission-tower-import"
- name: "ParamĂštre puissance sortie 2"
state_topic: "solix/site/Solix2/scenInfo"
value_template: "{{ value_json.retain_load }}"
unique_id: "parametre_puissance_sortie_solix_2"
Many thanksË
Hi, thanks for that post.
I also installed the Add on and followed your sensor code in configuration.yaml.
I get data in MQTT Explorer but the sensors do not update. The Add on is running - I can see no errors. MQTT is updated every 30 sec, but the sensors in HA do not update. Any idea?!
I think I found the issue why the Solix2MQTT is not working out of the box for some of us.
It seems like the âstate_topicâ is hardcoded in that application, but many of us did give a different name to their âsystemâ, which can be configured in the Anker application.
so the Solix2MQTT is announcing the entities on starting the docker app with
âstate_topicâ:âsolix/site/Balkonsolar/scenInfoâ
but in my case the state_topic is âsolix/site/Flirina/scenInfoâ because I named the Solarsystem in ANKER APP âFlirinaâ.
in my case I needed the mqtt explorer to find out the correct state_topic and create the sensors manually in the configuration.yaml
@markusmauch : can you confirm that? should I open a issue in github?
im maybe to stupid or something, it dont work⊠it shows some sensors but all of them âunknownâ . does any (german?) member here, have mercy with me and can tell me wtf is wrong with me (and my config xD)
Use MQTT explorer with a Windows PC to find the broadcast topic and adapt the topic for the sensors in the yaml.
Can someone provide a decoding of the charging status numbers?
I think the API returns 1,2,3âŠbut that should correlate to Off, Charging, Dischargin, Standby somehow.
In Dec I even noticed a deep Standby or full bypass mode when it bypassed solar power < 25 W.
In normal bypass it doesnât even start <25W.
Mine is currently offline, will install it end Feb again. Still developing on an IntegrationâŠ
Good morning,
If it helps, here is my batteryâs day yesterday.
On the horizontal bar, these are the battery mode numbers.
The blue graph corresponds to battery discharge.
The purple graph at the input power. (solar panels)
The cyan graph at the battery output power (to micro inverter)
For information, my battery was set to 150W.
The second graph corresponds to the battery capacity in%.
For my part I deduced for the modes:
1 â Output power <150W without charging the battery
2 â Battery use when more power from solar panels
3 â Battery charge with output at 150W
4 â Sleep?
7 â Deep sleep?
Already tryed and failedâŠ
Very nice. I interpret this as following:
1 = Charge only mode without bypass
2 = Discharge only mode
3 = Bypass (below 50 W without charging) and above home load (with charging)
4 = Another Off mode? Toggles between 4 and 7 for no good reason. Havenât seen corresponding state in App yet
7 = Off
Weird that 3 is not distinguishing between both bypass situations, that can be without charge or with chargeâŠ
To begin with:
- Solix2MQTT add-on installed
- configured with what is needed for the Anker API part and the MQTT Broker part (as in the first image)
- Add-on started
Is there information in the add-on logs like in the second image?
Hi Tholu,
i can partially confirm the states as mentioned by olivr2s.
But i guess
1 = Bypass until the limit to charge is reached (30->150W in my case) (morning case, especially when foggy)
2= Discharge only mode
3= Charge and bypass
4= Charge battery because too few sun (max. 35-40) watts.
7= off
4 i have often in the morning, when the sun rises but its not that strong enough to initialise the HM, so the few watts go directly into the battery. its like when you disconnect cables from the battery to the inverter, you can simulate the same behavior⊠(charging ).
Hm, the detailed chart looks different.
1 (chagring only) starts only above 50 W while it is below set home load. Above Home load it switches to 3 again (Bypass with charing)
Therefore 1 is charging only (No Bypass)
3 Bypass without charging you can see in the morning and evening or cloudy days, when solar power is below ~50 W.
4 is still fussy to me, since you can see short periods in the nightâŠ
Maybe some kind of sanity state for the system, connecting to the cloud (checking firmware updates and so on?
ATTENTION
Todayâs addon v1.2.5 update gives an unknown sensor result.
Now this setting allows you to configure the broadcast topic.
Except that this keeps the previous topic with the new format.
To make it as simple as possible, I configured the add-on topic like this:
AnkerSolix
Which will give a topic for the sensors:
AnkerSolix/site/âyour_battery_nameâ/scenInfo
Remember to update the topic of your sensors in the yaml file according to your configuration.
I have fixed the hard coded state_topic now. Please update to the latest version and try again. I also replaced the mqtt_host with the full URI scheme (protocol + port) so please check your configuration valuesâŠ
I just updated to v1.2.12 and no unknown sensor problems.
Thanks for this quick fix.
after 162 updates, it works⊠but only with the âmain accountâ
is this normal? i also have a second account, to watch the app on my ipad⊠but no permission to set the output (cant find an point to activate it) but from this acc, the addon dont get any dataâŠ
The API in the add on uses the homepage query, which does not provide data for shared Accounts due to permissions. It must be changed to list sites first and then site details for returned site idâs.
I incorporated that approach in the python library and will use that for the Integration too.
Then shared accounts can do monitoring at least.
But they cannot modify anything, neither through API nor through App.
Hi I am very interested in this particular topic regarding the e1600 integration in HA.
First of all I would like to say great work.
but unfortunately Iâm a total noob, and canât get it to work.
maybe you can help me?
in the manual it says something about npm install ?
I canât get that to work and I canât get it to work with Yaml either.
is there something like a step by step guide for dummies ?
I would be very grateful
I hope someone can help me
thanks anyway
Translated with DeepL.com (free version)