Power Meter - 3 D Printer - Turn off


#1

1) Give a description of the problem
I have an Aeotech Z-Wave Energy Metering SmartSwitch hooked up to work with my 3 D printer. Its handy to know power consumption during the print and also over time. I got to thinking that I sometimes have prints that last many hours and that can lead into time that stretches past my bedtime. I wanted a way to turn off the printer once its power consumption had dropped and stayed low for a sustained period of time. 10 minutes to be specific. This would allow the heated nozzle and bed to cool down with the aid of the cooling fans. I began to determine that the printer at idle pulls about 20-22 watts of power. When heating up it consumes about 600 watts of power and when maintaining its heat throughout the print it consumes about 200 watts down to about 120 watts. I modified a Piston for power metering which works well for my purposes. Problem : Sometimes I heat the nozzle and/or heated Bed to do calibrations ,etc. This will trigger the Piston and turn off the printer which could cause havoc with the Calibration Process.

2) What is the expected behaviour?
I would like the Piston to work the way it does , BUT only perform the actions if the wattage draw is maintained for over 1/2 an hour. I figure that I wont have prints shorter than 1/2 an hour and that gives me 1/2 an hour to heat the bed and nozzle and configure.

3) What is happening/not happening?
The Piston does not determine if the higher wattage has been present for 1/2 and hour or more

**4)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)


#2

I did not test this but I would try pulling your second IF out from under the first.

If Outlet 1 power rises above 60W
  Then Set variable 3_D_Printer_Printing = true

If Outlet 1 power stays less than 30W for 10 minutes
and
3_D_Printer_Printing is true
Then
  Send SMS
  Set variable 3_D_Printer_Printing = false
  turn off Outlet 1

#3

Thanks for the reply.
Let me restate the logic states I am after.

If the power rises to over 60 watts
and
remains above that level for 30 minutes or more
then set 3_D Printing to a True state
when the power level drops in the future to less than 60 watts
then set 3_D Printing to a False state
Wait 10 minutes after this occurs and turn OFF Outlet 1

The SMS and so forth might be nice , but its not really necessary. It was just in a Piston developed by someone else so I just kept it in there.


#4

I presume you are on Hubitat.
Do you mean something like this?


#5

Smarthings.
Thanks! I think this may be darn near perfect!
I’ll test it tonight and if this solution works I will mark your answer as the solution!


#6

I have not used ST webcore in quite a while. You may have to use the following as your first IF because I don’t think ST webcore has “is greater and stays greater than”…but I’m not sure about this :slight_smile:


#7

It works EXACTLY as intended! Many Thanks for taking the time to help me out!