Power Button


I'm using power on/off button with mqtt topic. 

Is it possible to have a button reflecting power status. (maybe by changing color of the button)



  • You have the power state in the state property of your printer as field powerOn in SERVER_ID/state/<slug>/state like this:


    So you can just use that to do whatever you want in your mqtt client. How you do that depends on your mqtt client I guess. In homeassistant for example you could define a binary_sensor with

    "value_template":"{{ value_json.powerOn }}"

    and then use this in your button logic.
  • edited June 2022
    Yes, i use that. But I speak in repetier-server application. I see the on/off button, but i can't see the state of my power.

    It's a toggle button without visible state.
  • Ok, mqtt brought me to wrong direction:-) Coloring is a nice idea. Added for next release so it is green for enabled and red for disabled.
  • Hello, sorry for this old subject, is it possible to use home assistant to publish a powerOn / powerOff command ?
  • All api commands not requiring files are available via MQTT which you use to connect to home assistant, so yes should be possible. See https://prgdoc.repetier-server.com/v1/docs/index.html#/en/web-api/mqtt for mqtt integration details. Use command to send gcode and send

    @runButtonCommand togglePower

  • and the oposite, send a command from Home assistant to repetier ?
  • Same. Topic RepetierServer-1/cmd/gcode/<slug> can be used to send gcode directly to printer from home assistant. Just ensure that executing send gcodes is enabled in server mqtt settings.
Sign In or Register to comment.