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

no regulation in off-grid operation? #65

Open
pvdeye opened this issue May 19, 2024 · 5 comments
Open

no regulation in off-grid operation? #65

pvdeye opened this issue May 19, 2024 · 5 comments

Comments

@pvdeye
Copy link

pvdeye commented May 19, 2024

Is there a way to get the control to work when I don't send any electricity into the grid?

@Maik7
Copy link
Contributor

Maik7 commented May 20, 2024

yes. The details depend on what you want to use as the base for the control. Normally the script is using the solar excess (= the electricity you send into the grid). I assume you are using a battery and you want to control the load of the battery to keep the load within an optimal range to not overstress the battery? If this is the case you can create a virtual sensor "actual_load - maximum_load", where maximum load is the load you do want to exceed, and actual load is the measured load. This sensor is used for "import_export_power". With this the script tries to keep your load below maximum_load

@pvdeye
Copy link
Author

pvdeye commented May 21, 2024

Yes, that's exactly what I want to do. Do you have an example of your sensor please?

@Maik7
Copy link
Contributor

Maik7 commented May 21, 2024

HI, not exactly the sensor you need, but I am using this sensor for simulating a total power sensor. You need to subtract the maximum_allowed_battery_discharge_power in the last line, too.

In configuration.yaml:

template:
  - sensor:
      - name: "Gesamtleistung"
        unit_of_measurement: "W"
        state: >
          {% set power1 = states('sensor.tasmota1_energy_power') | float(default=0) %}
          {% set power2 = states('sensor.tasmota2_energy_power') | float(default=0) %}
          {% set power3 = states('sensor.tasmota3_energy_power') | float(default=0) %}
          {% set power4 = states('sensor.tasmota4_energy_power') | float(default=0) %}
          {% set power5 = states('sensor.tasmota5_energy_power') | float(default=0) %}
          {% set power6 = states('sensor.tasmota6_energy_power') | float(default=0) %}
          {% set power7 = states('sensor.virtueller_kuehlschrank_sim_energy_power') | float(default=0) %}
          {% set power8 = states('sensor.virtuelles_aquarium_sim_energy_power') | float(default=0) %}
          {% set power9 = states('sensor.virtueller_akku_energy_power') | float(default=0) %}

          {% set zusatz = states('input_number.zusatz_power') | float(default=0) %}
          {% set zufalls_power = states('input_number.zufalls_power') | float(default=0) %}
          {% set solar_power = states('sensor.ap1_total_power') | float(default=0) %}

          {{ power1 + power2 + power3 + power4 + power5 + power6 + power7 + power8 + power9 + zusatz + zufalls_power - solar_power }}

@pvdeye
Copy link
Author

pvdeye commented May 21, 2024

Danke Maik
ich versteh irgendwie nicht für was ich das brauche? Bitte um Erklärung kann ich nicht einfach den battery sensor als im-export power einsetzen?

@Maik7
Copy link
Contributor

Maik7 commented May 21, 2024 via email

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

2 participants