Giter Site home page Giter Site logo

Comments (9)

davidusb-geek avatar davidusb-geek commented on June 30, 2024

Hi, you should be more specific here. What is the shell command that you are trying to use? What are you trying to achieve, what kind of optimization?

from emhass.

tomekl1978 avatar tomekl1978 commented on June 30, 2024

Shell command from instructions in Home Assisstant.

shell_command:
  dayahead_optim: curl -i -H "Content-Type: application/json" -X POST -d '{}' http://localhost:5000/action/dayahead-optim
  publish_data: curl -i -H "Content-Type: application/json" -X POST -d '{}' http://localhost:5000/action/publish-data 

from emhass.

davidusb-geek avatar davidusb-geek commented on June 30, 2024

Ok, you'll need to provide more information, otherwise it'll be very hard to help you solve this. Please post the complete logs from the "Log" pane in the add-on.

This fails when running the "dayahead-optim" or the "publish_data"?

May be share you yaml add-on configuration...

from emhass.

davidusb-geek avatar davidusb-geek commented on June 30, 2024

Hi, just closing this as no more information was provided and impossible to solve (if it is a real issue) as it is.

from emhass.

henne49 avatar henne49 commented on June 30, 2024

when entering the shell_command statement into Visual studio, you get the following error message displayed: incomplete explicit mapping pair; a key node is missed.

Also the check config yaml element shows: Error loading /config/configuration.yaml: mapping values are not allowed here

the provide shell code command does not work in latest home assistant 2022.8.2

from emhass.

davidusb-geek avatar davidusb-geek commented on June 30, 2024

Hi, I'm just reopening this issue to see if we can get somewhere on this issue.
I have Home Assistant 2022.8.3 installed, the lastest version, and the shell_commands are working just fine.
What I can't understand is what are you trying to achieve here, in what context this is not working?
Is the EMHASS add-on loaded and running?

Maybe I can just repeat the same questions that remained unanswered with @tomekl1978:

Please post the complete logs from the "Log" pane in the add-on.
This fails when running the "dayahead-optim" or the "publish_data"?
May be share you yaml add-on configuration...

There is a lot of information missing here in order to try to help you.

from emhass.

henne49 avatar henne49 commented on June 30, 2024

Got it fixed, you have to remove the space after the Content-Type: application does not work, the below commands work, please just adjust the documentation.

thx

shell_command:
dayahead_optim: curl -i -H 'Content-Type:application/json' -X POST -d '{}' http://localhost:5000/action/dayahead-optim
publish_data: curl -i -H "Content-Type:application/json" -X POST -d '{}' http://localhost:5000/action/publish-data

from emhass.

davidusb-geek avatar davidusb-geek commented on June 30, 2024

Ok perfect. Thank you.

I actually realized that the documentation was outdated, I actually implemented those shell_command using this syntax:

shell_command:
  dayahead_optim: "curl -i -H 'Content-Type: application/json' -X POST -d '{}' http://localhost:5000/action/dayahead-optim"

So I wasn't having any problem with that.
And your solution is also valid I guess.
I just updated the documentation

from emhass.

henne49 avatar henne49 commented on June 30, 2024

I tried that as well, but it did not work for me. Thank you for your great tool! I was trying to find exactly what you are doing, as this is last bit to fully automate and save energy.

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.