Code Monkey home page Code Monkey logo

Comments (8)

alexpthe1 avatar alexpthe1 commented on July 20, 2024 1

or just the possibility to run a shell script #61

from moonraker.

tayanov avatar tayanov commented on July 20, 2024

or may be add simple pull http url e.g. wget or curl as [power printer]

from moonraker.

Arksine avatar Arksine commented on July 20, 2024

As mentioned in issue 61, simple url's won't work with the power plugin, as it must be able to query the state of the device. The tasmota device was contributed by a user. Someone who owns a "esphome" device is free to contribute an implementation.

There are major security implications with running configurable scripts, so it is unlikely that I add that ability.

from moonraker.

tayanov avatar tayanov commented on July 20, 2024

As mentioned in issue 61, simple url's won't work with the power plugin, as it must be able to query the state of the device. The tasmota device was contributed by a user. Someone who owns a "esphome" device is free to contribute an implementation.

There are major security implications with running configurable scripts, so it is unlikely that I add that ability.

ok, im migrate to tasmota, but its not work, with any config i see that

Fluidd warnings found.
Moonraker has failed plugins, please check your logs, update your configuration and restart moonraker.
power
Moonraker plugin configuration can be found here.

its my config
[power printer]
type: tasmota
address: 10.0.0.100
output_id: 1

i try anything config but hope is die)

and if i go to
http://10.0.0.100/cm?user=admin&password=&cmnd=Power1%20off printer is off. tasmota work

from moonraker.

Arksine avatar Arksine commented on July 20, 2024

Moonraker.log should tell you what the error is. I suspect it is because device query failed, but I won't be able to tell without the log file. If that is the case, you need to make sure that SetOption26 is set in Tasmota.

from moonraker.

tayanov avatar tayanov commented on July 20, 2024

i comment 13 line at power.py #import gpiod
and all works. its trouble as #75
then i try ./install-moonraker.sh -r
uncomment 13 line at power.py import gpiod

and all ok. but...

i can turn off printer from web fluiid macros button, but cant POWER ON from macros button.
!! Lost communication with MCU 'mcu'

macros for power on not work with power_off mcu.

But all work from top/right popup menu.
Thanks ...

from moonraker.

Arksine avatar Arksine commented on July 20, 2024

You can't power on with a GCode Macro as Klipper can only execute RESTART and FIRMWARE_RESTART when it is in the shutdown state. You must use the API to power on.

from moonraker.

iJebus avatar iJebus commented on July 20, 2024

Not to go resurrecting a dead issue, but on the basis of the title, I think this can be closed. I'm controlling an ESPHome power plug using the generic HTTP config, e.g.

[power SV06]
locked_while_printing: True
restart_klipper_when_powered: True
type: http
on_url: http://x.x.x.x/switch/athom_smart_plug_v2/turn_on
off_url: http://x.x.x.x/switch/athom_smart_plug_v2/turn_off
status_url: http://x.x.x.x/switch/athom_smart_plug_v2
request_template:
  {% if command in ["on", "off"] %}
    {% do http_request.set_method("POST") %}
    {% do http_request.set_body({}) %}
  {% endif %}
  {% do http_request.send() %}
response_template:
  {% if command in ["on", "off"] %}
    {% do async_sleep(1.0) %}
    {% do http_request.set_method("GET") %}
    {% do http_request.set_body(None) %}
    {% do http_request.set_url(urls.status) %}
    {% set response = http_request.send() %}
    {% do response.raise_for_status() %}
  {% endif %}
  {% set resp = http_request.last_response().json() %}
  {resp["state"]}

from moonraker.

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.