Dear all Hello
I need to appologize, if I have not used the correct Category to place my rewuest and question.
I´m pretty new in Home assistand and I also have not really a clue how to Edit or create any code for Home assistand.
I like to integrate my Solar ( PV) inverter with all parameters from Huawei.
in addition I have an Askoma Heat heating device plced in my Water buffer.
Now I have allready tryed to integrate the Solar ( Huawei) all worked good and easy.
There was one Issue, if all was connected, the Data was not longer availeble in the Askoma APP, where I could see production and consumption from House and Heating device. If I disable it in Home assistant data is back inside the APP.
Now my question will be, if there is any one here Who is also using an Askoma Heating devive in combination with my Solar.
or use the external API of solarmanager Solar Manager External API (solar-manager.ch)
You find there all different informations that you know from the app.
then you can create sensor with restful like:
- resource: https://cloud.solar-manager.ch/v1/info/sensor/64afe69befd4f3376603db85
method: GET
scan_interval: 240
timeout: 20
headers:
accept: application/json
Authorization: Bearer {{ states('sensor.sm_accesstoken') }}
sensor:
- name: "sm_charging_mode"
value_template: >
{% if value_json is defined and value_json.data is defined %}
{{ value_json.data.chargingMode }}
{% else %}
none
{% endif %}
the calls for the tokens are in external API swagger explained…
HI There many thanks for your help and Support.
Unfortunally I´m a rookey in this thinks, and need some help to implement this code.
Is there a chance that you can give me some guidance ?
The 65535 is 0 in the weird formatting of int16 in modbus.
So you essentially ADD the total power flowing out or coming in to your house.
I have the shelly for that reporting negative numbers for export and positive for import.
The rest of the value definition is to make sure that it stays in the bounds allowed for int16 (should not be necessary, but if you don’t do that, HA throws an error.
Now this value (available power) gets sent to address 202 of your askoma heater.
It should then automatically select the right heating level within the bounds of available surplus power.
I have two askoheat+ devices turning on automatically if my PV produces enough power, and I was able to integrate (read) the sensors (temperatur, power) via modbus in home assistant. Now I would like to add a switch to be able to turn off the device. Can anybody help me with that? The following code is not working for the switch:
I was in touch with the manufacturer and if i got them correctly, you cannot switch the heater on or off via modbus. it might work through REST?
What i did instead:
2 numbers in HA to set temperatures for minimum and temperature for “power to heat” - mode and submit the spare-energy every second.
to turn off askoheat i just reduce the numbers respectively and it stops heating
see above for implementation.
Try to set up 2 things:
a script to send the modbus command, and an automation to trigger it once you change the value:
Set Minimum Temperature: it will keep this no matter if you have solar or not.
I have set this to 25 degrees so the heater doesnt run at night:
alias: Boiler Set Min
sequence:
- action: modbus.write_register
metadata: {}
data:
hub: Askoma
address: 595
slave: 1
value: |
{{ states('input_number.boiler_temp_min') | int }}
description: Send the boiler minimum temperature to Modbus
icon: mdi:water-boiler
The script to set the “Power to heat” temperature (i have that at 55).
Askoma will try to reach that, if enough power is produced by solar.
alias: Boiler Set PTH
sequence:
- action: modbus.write_register
metadata: {}
data:
hub: Askoma
address: 597
slave: 1
value: |
{{ states('input_number.boiler_temp_pth') | int }}
description: Send the boiler PTH temperature to Modbus
icon: mdi:water-boiler
The last script you need, sends the spare energy you have to askoma (see in my former post.
Now we need to somehow trigger these scripts. So i created 2 values as “helpers” and everytime i change them, an automation triggers to send them to askoma on modbus:
to set power to heat → see former post.
to change the minimum temp and PTH temp (power to heat), use this:
alias: Set Boiler Temps
description: ""
trigger:
- platform: state
entity_id:
- input_number.boiler_temp_min
- input_number.boiler_temp_pth
condition: []
action:
- action: script.toggle
metadata: {}
data: {}
target:
entity_id:
- script.new_script_2
- script.boiler_set_pth
mode: single
This automation sends the 2 values set above to askoma. i guess you can use the same pattern to send anything to the unit.