Price fluctuations implies a highly varying value, changing sometimes dramatically many times within the standard forecast period of 12-24 hours. I don’t know the price to come unless I look it up, but Home Assistant knows - after installing the NordPool Integration with a trigger that fires when the price reaches a 6,12,18 or 24 hours low. That trigger is used to start the washing machine. However, it fails because the machine resets and shuts itself off unless someone press start with a certain amount of time after loading and turning it on.
Home Assistant can still start the machine, but it has no way of knowing what it is loaded with, what program to choose and select the right cycle duration. spin speed etc.
You can configure the washing machine to auto disable remote control in the end of each washing cycle and then use the “remote control” value together with the “job state” to know whether the machine is ready to start a new cycle.
Same possible solution as my previous message: if you set your washing machine to turn off remote control at the end of the wash cycle then the way to signal to HA that it’s ready to start could be to put the laundry in the machine and press the remote control button on the machine. Then HA could use the remoteControlStatus value as an additional requirement for a trigger.
No, because when the machine times out, also the ‘remote control’ is reset.
I’ve turned on the washing machine accidentally before. Even less desirable with a dryer. I’m thinking of simply putting a simple switch on the wall which will serve as a trigger to set a boolean called autostart to true. If the solar panels produce enough and the boolean is true, it should start and reset the boolean to false.
Slightly less elegant, but I do not have to rely on statuses of the appliance itself. That should do to load the machine, press the switch to indicate that it should start at some point during the day at the right time.
My only problem is the delivery delays with home assistant yellow which I’m waiting for… I’ve got the switch. Just no support yet to connect the switch.
After lot of trial’n’error along with some intense reading, I’ve finally found a method that works.
As it turns out, my Samsung washing machine doesn’t time out and reset itself as I thought. It just “falls asleep” which implies that the display is turned off, but it remains “awake” in the background, and most important of all, the remote control still works. Thus, I can contol it using the REST API:
rest_command:
washer_start:
url: "https://api.smartthings.com/v1/devices/4ffb6b63-XXX-XXX-XXXX-67421a52a09c/commands"
method: post
content_type: 'application/json; charset=utf-8'
headers:
Authorization: Bearer 9c2cf8cd-XXXX-XXXX-XXXX-6c98ab0873f1
payload: '[{"capability":"washerOperatingState", "command":"setMachineState", "arguments":["run"]}]'
And this works well in combination with the Low energy price binary sensor when used in an automation. Now we can load the washer with our laundry, switch it on, shut the door, select the desired program and activate the remote control. The HA will do the rest.
How does HA knows if “remote control” is enabled in your case?
A combination of the “power” switch and “machine state”?
Only when the “remote control” is enabled, the automation will trigger. So, once triggered - HA just waits for the right moment ( when the energy price is at its lowest) before sending the start command to the washer. There’s no need to check if the remote control is enabled.
Not sure I follow.
Only when the “remote control” is enabled the automation will trigger
I see is no remote control status entity of the washer in HA
What triggers the automation?
Edit:
I get it now.
Created a virtual switch for the “smart controle remote status” in the SmartThings Groovy IDE and created a routine in de SmartThings app. Turning it on and off.
After a HA restart it shows up in HA.
Now we have the automation trigger
Fyi
You can request the remote control status with rest api as well
https://api.smartthings.com/v1/devices/<DEVICE ID>/components/main/capabilities/remoteControlStatus/status
Great stuff!
Thanks for that, seems like that might be a good candidate to wrap in a RESTful switch and then have a notification for when we’ve forgotten to enable remote control.
Thanks to all the great info in thread, I finally have the ability to pause and restart the washer in Home Assistant to automate long soak cycles. We’ve had good results using OxiClean (aka Oxygen Bleach) but it needs a long time to fully desolve and be most effective.
For soaking, we usually let the wash start and run for 10 minutes, the pause to soak for an hour, then run for 5 minutes to agitate. The pause/run is then repeated depending on the the soil level and some guess as to how long it would be best to soak for.
Currently I’m using REST command to issue pause and run requests, so I don’t have any dependency on adding any entities to SmartThings.
I first tried to use RESTful Switch, which would have been a very natural control to add to the dashboard, but this fails because the switch wants to be able to query state to initialize itself. The general status command response looks too long to reliably (or easily) parse with a template.
There may be a way to query just washerOperatingState but I haven’t found it yet.
Also, has anyone figured out how to query the selected cycle to figure out how long any of the stages will take? It would be useful in the automation to know not just that the wash is going to take 1:38, but to know that the wash cycle length is X minutes of that.
You can use this request for any capability status
https://api.smartthings.com/v1/devices/<DEVICE ID>/components/main/capabilities/<CAPABILITY ID>/status
So washerOperatingState as well.
There’s no point in using a REST call to check if the remote control is on. Cause if it isn’t on, then the REST API doesn’t work. It’s like turning on the light to check if the light is on
That isn’t true with my washing machine. It’s always connected
Well, I don’t know about your machine, but mine certainly doesn’t respond to anything unless the remote control is enabled.
What’s the purpose with a dedicated remote control button if you can control the machine wether remote control is enabled or not?
That doesn’t seem to be completely true. The REST api, fortunately or unfortunately, is to the smartthings cloud service, not the actual local device. The cloud service has the last state. Even if I never activate remote control, the device does seem to update smart things cloud service for the switch, job state, machine state, and energy.
Edit: I’m not saying that it is possible to tell the remote control status for my (or other) devices since I haven’t done that work yet, but the evidence seems to be there that there are responses from the smartthings rest service with or without remote control being on.
Well, maybe I was somewhat unprecise; Of course the REST API works. What I meant is that you can’t control the machine with it unless the remote control is activated.
[Edit] What response would be meaningful from a device that cannot be controlled?
Right, what I was thinking of was being able to send a notification that you forgot to enable remote control (so that could be fixed before say leaving the house).
The RESTful switch I was talking about was for being able to toggle pause/run for soaking, which of course does require remote control.
@eldigo - Thanks for the tip. That response looks manageable. Also looks like I might need to check washerJobState
first to know if operatingState
is valid.
Aha, now I see your point. Yes, it makes sense to check the remote control status immediately following a ‘Turn-on’ and then send a reminder/warning/message if it’s not enabled.
But I guess it’ not possible to enable remote control via REST ?