Giter VIP home page Giter VIP logo

Comments (7)

JohanAlvedal avatar JohanAlvedal commented on July 4, 2024

Got it working here.
https://github.com/JohanAlvedal/homeautomation/tree/main/Emhass/Shell

from emhass.

renaatdb avatar renaatdb commented on July 4, 2024

https://github.com/JohanAlvedal/homeautomation/tree/main/Emhass/Shell

Thanks,
I'm going to study it

from emhass.

renaatdb avatar renaatdb commented on July 4, 2024

@JohanAlvedal
Looks too complicated for me.
tried to change this

shell_command:
  dayahead_optim: "curl -i -H \"Content-Type:application/json\" -X POST -d '{\"pv_power_forecast\":{{states('sensor.solcast_24hrs_forecast')}}}' http://localhost:5001/action/dayahead-optim"
  

into

dayahead_optim_v2: 'curl -i -H ''Content-Type: application/json'' -X POST -d ''{
  "load_cost_forecast":{{ ((state_attr("sensor.nordpool_tibber", "raw_today") | map(attribute="value") | list) + (state_attr("sensor.nordpool_tibber", "raw_tomorrow") | map(attribute="value") | list))[now().hour:][:24] }},
  "prod_price_forecast":{{ ((state_attr("sensor.nordpool_tibber", "raw_today") | map(attribute="value") | list) + (state_attr("sensor.nordpool_tibber", "raw_tomorrow") | map(attribute="value") | list))[now().hour:][:24] }},
  "prediction_horizon":{{ min(24, (((state_attr("sensor.nordpool_tibber", "raw_today") | map(attribute="value") | list) + (state_attr("sensor.nordpool_tibber", "raw_tomorrow") | map(attribute="value") | list))[now().hour:][:48] | list | length)) }},
  "pv_power_forecast":{{ ([states("sensor.solcast_pv_forecast_power_now") | int(0)] + state_attr("sensor.solcast_pv_forecast_forecast_today", "detailedHourly") | selectattr("period_start", "gt", utcnow()) | map(attribute="pv_estimate") | map("multiply", 1000) | map("int") | list + state_attr("sensor.solcast_pv_forecast_forecast_tomorrow", "detailedHourly") | selectattr("period_start", "gt", utcnow()) | map(attribute="pv_estimate") | map("multiply", 1000) | map("int") | list) | tojson }},
  "delta_forecast":2
  }'' http://localhost:5000/action/dayahead-optim'

i'm trying to find simple configurations

from emhass.

purcell-lab avatar purcell-lab commented on July 4, 2024

There is no doubt adding in these additional forecasts with some json foo can get quite complex quickly.

It would be useful if we could provide a blueprint/ template for some of the standard suppliers; nordpool, Amber, octopus. So the end user could just tick a check box, rather than having all this yaml fun.

The other consideration is each time you modify the shell_command or rest_command you need to restart HA, it would also reduce complexity if you could just reload a template/ script each time you needed to modify the payload.

from emhass.

JohanAlvedal avatar JohanAlvedal commented on July 4, 2024

Absolutely, I agree with you. Someone talented who could create a blueprint so you can enter your electricity supplier solcast and the most relevant parts, I think it would help many users of emhass. It was/is the part that many users struggle with to get emhass up and running, because it is precisely that part that is extremely complex. When and how should all scripts be run and how should they be configured.

from emhass.

renaatdb avatar renaatdb commented on July 4, 2024

Thanks, I thought I was the only one having trouble with this. It's amazing how Emhass was made. However, it is difficult for a beginner to get started and difficult to understand the manual.
Hopefully I'll manage to get everything working in the future.
I want to purchase a battery in the future and see what a dynamic rate (with Nordpool) can teach me.
I am now trying to predict what the use of a battery can bring me. I assume Emhass can help me with this. Thanks

from emhass.

renaatdb avatar renaatdb commented on July 4, 2024

Hello,
This is also an interesting tool from Thermia .
https://classiconlinestorage.blob.core.windows.net/web-resources/SmartPrice_Info_and_FAQ_NL.pdf

from emhass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.