Please help fix my laundry piston


#1

1) Give a description of the problem
The only problem is, that EACH time the washing machine goes above 1100 watts, the daily/weekly/monthly washer count goes up each time, so 3/4 times on each cycle.

2) What is the expected behavior?
I only want it to register the FIRST time it goes above 1100 watts, then to carry on with the piston.

I tried creating a local boolean variable “Washer started”, hoping it would help the following time the washing machine went above 1100 watts, but it doesn’t, please help.


#2

See my post here…dryer piston that uses variable to only respond to first instance of button “push” from device. Might help you. @ipaterson is good with this stuff. :slight_smile:


#3

It looks like your first set of conditions should check Washer_Is_On is false rather than (or in addition to) Washer_started is true to avoid counting multiple starts.


#4

Thank you so much @ipaterson, sometimes you can’t see the wood for the trees! The piston is a mix and match of some minions work I put together, and that last one was really holding me back.
I love the way the piston name updates in blue when it’s active, across the main screen, no idea what that’s called, but I want to incorporate it into other pistons, thanks again.


#5

Here is a guide on piston state


#6

Forgot to ask…can you tell me what all are the switches doing in this piston? The Switch 10, 11, etc.?

What info/state data or? are you capturing/restoring w/them?


#7

They’re for my Samsung multiroom speakers, I have about 10 virtual switches of the radio stations I listen to, and a speaker mute virtual switch among others. And as these Samsung speakers can’t play a TTS message and restore like the Sonos and Bose do, so this system let’s a TTS message come through and have the previous ratio station play again, or if it was muted, it stays muted. Only the capture and restore of “switch state” works with these speakers.


#8

Thanks for the explanation.


#9

That sounds like a useful thing to pull out into its own piston so that you can just use the “Execute piston” action to control that behavior from any other pistons that want to use TTS with an argument like message for the text to announce.


TTS device: one piston interrupts another piston. Is there a way to prevent this?
#10

Sounds very useful, I created a stand alone TTS piston, I left the speak text blank ($args.undefined), and I can call it from another piston “execute piston” but I can’t get it to speak text I’ve sent to it. How do I do that? Under execute piston, Arguments (optional) I left blank because I can’t input text, below that I see Argument I wrote text in both Expression and Argument, save. The piston runs, just no TTS comes through, any ideas? Do I need to use brackets or something?


#11

Close, your pistons will use the Arguments input for values passed into it from another piston or from calls to its External URL (e.g. use myArgName in the Arguments input and/or $args.myArgName in expressions).

To pass an argument into a piston the caller needs to have a variable by the same name then select that variable in the execute piston dropdown.

So you can add a message variable to this piston, set its value, then select it in the execute piston statement. Your new piston will then use $args.message rather than undefined.


#12

@ipaterson Hey I’m trying to take your advice about calling one piston to send a voice message to the speakers, rather than each time saving states to local store… But I’m at a loss, I can only get the word “null” coming across to the other piston and via the speakers, please tell me where I’m going wrong.
This is the main piston…

And this is the piston when something happens I want to announce it.


#13

Looks like your capitalization in the variable, text_message, will need to match the arguments that the other piston expects, textMessage. Also, did you set the variable manually? Otherwise there is nothing setting a value for the message in the second piston.


#14

That did it! thank you!