Custom button, that fires an html command

So... short feedback: It works.
I just added the system: action: section at the end of my config.yaml, wrote some nice text, at "command" the curl command, saved, restarted octoprint, and... done.

Thanks everyone!

And for everyone with a similar quest:

system:
  actions:
    - name: Drucker an
      action: Drucker an
      command: curl "http://10.10.20.10/config/xmlapi/statechange.cgi?ise_id=15906&new_value=1"
    - name: Drucker aus
      action: Drucker aus
      command: curl "http://10.10.20.10/config/xmlapi/statechange.cgi?ise_id=15906&new_value=0"
      confirm: Drucker wirklcih ausschalten? Laeuft ein Druckjob? Ist er abgekuehlt? Echt jetzt?

1 Like

I love that confirmation message :joy:

1 Like

annnnd I love google translate.

I was getting to that. You then add the Gcode System Commands into the mix and magic happens.

Ah, right, that's of course an option too :sweat_smile:

Hi,
are there any news in connecting Octoprint with Homematic CCU2? I´m new in 3D-Printing and would like to know what kind of plugin I need on Homematic- and Octoprintside to connect them together (e.g. for Power of when ready or in case of a failure)

Best regards and many thanks in advance
Jochen

Hi Jochen,

there ain't any Plugin, neither on the octoprint nor the homematic side for connecting anything.
I'm using a HM-Plug that measures the used power ( HM-ES-PMSw1-Pl ), and switches the printer off half an our after the print is done. If you need help with the CCU2 program let me know.

On the octoprint side i use the tweak mentioned above to switch that plug on or off from the octoprint WEBGui.

That's all, but it works flawless and does all i want.

Regards,
Sven

Hi Sven,

O.K., that means I´ve to use the IP-Adress of my CCU2, that´s clear. But how do you know the id of the HM-Plug; is this the serial number?

http://10.10.20.10/config/xmlapi/statechange.cgi?ise_id=15906&new_value=1"

Best regards

Jochen

First of all you need the XML API Plugin for the CCU2:
https://www.homematic-inside.de/addons

Then you need to find the internal ID of that plug. Right now I'm at my mobile, didn't find the right link. Ether wait till tomorrow, or have a look for "ISEID" at the Homematic forum.

Hth,
Sven

Hi Sven,
since I´ve installed the "XML API Plugin for the CCU2" it works perfect :slight_smile: Thanks a lot.

Do you have some example codes when you use this inside octoprint? I think it would be great in cases like:

  • if Extruder_Temp > 280° orr
  • If Bed-Temp > xxx
  • …..

Do you have some good usecase when you use this? I´ve already used the smoke-warner inside Homematic to power-off the Printer when there is smoke detected :slight_smile:
Best regards and many thanks again
Jochen

Edit: Tested it with TemperatureFailsafe --> works perfect. If you have any additional ideas feel free … :slight_smile:
Many thanks and best regards
Jochen

Nah... as i said: I only have inserted the "Printer On/Printer Off" to the gui, so i can remotly switch on my printer via Octoprint GUI.
And half a hour after finishing a print job (measured by power consumtion of the printer) my CCU switches the printer off.
A half hour is enough to let it cool down, remove the print and start a new one if i want. Otherwise the printer and the lights in the enclosure gets switched off.

Thought about the smoke detector too. But never did it, i had 2 false alarms the past 3 years. And if the printer really starts a fire that the smoke detector starts, it's fucking to late to switch the printer off, nothing to gain here.

Temp Failsafe is a nice idea. But than again: I think it's more likely that the plugin gets a false temp rather then a thermal runaway of the printer. I try to keep things simple.

But great i could help you, you're welcome.

I might disagree with you there. Usually with fires caused by electronics and heating elements, there is smoke before there is fire. And if you've ever tried to start a campfire in the woods, you'll know that it takes a lot to keep a fire going. There will be smoke before the fire is in a self-sustaining mode.

So if you can remove the power then the fire won't get enough of a start to keep going.

Ok, you have a point there. Thanks!
As my printer is in an enclosure i'm still not sure if the smoke would get out before it's to late. But it neverless would be a good idea to implement that.

Put the detector into the enclosure then.

Thought about that. I'm not entirely sure if that is a good idea. Won't there be any false alarms going off while printing? Not that i ever had any smoke from my printings, but there sure a some kind of vapors from the melted plastic. Has anyone done that before?

With anything, test your assumptions/assertions to validate them. "Will this fire off a false-positive?" :test: "Oh, I guess it doesn't..."

To me, this is the fun part of design work, actually testing all these guesses/assertions. It's a big part of programming.

Testing? Fun?
Let me explain the fun I would have:
Aprox. 7 seconds after the initial alarm all 12 smoke detectors at our house would be yelling aloud. At the same time the lights will go on, the windows shutter start going up, my brother in law gets a priority mail.
Next day my wife would probably take the kids and leave me.

So... You see why I ask, don't you? :wink: That's what this board is all about, isn't it?

:laugh: You make a fine point.

So.... i just.... wanted to let you know that i will move that smokedetector into the enclosure... As the printer is next to my workbench.... i did some soldering there... you have to be very dumb to solder directly under a smokedetector... of course it triggered the whole "fun" i described up there...
Just a bit of irony i was making a "fireman sam alarm bell" as a birthday present for my son :rofl:

2 Likes