Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Actually the automation are set on 2 different state of charge:

1) equal to 80
2) more than 80

Is it correct? There should be no conflict.
I don’t think that was the issue.
 
Last edited:
Yes. I did that in my automations. It won’t hurt.

Just to get it in the right way.
The script you suggest should be add as an extra command?

1642285738634.png


Anyway, I’m pretty sure that 1 automation that cut off power when the level raises up to 80 is enough, what do you think?

Thanks for your support, I’m a newbie in the automations world.

Appreciate it ?
 
Just to get it in the right way.
The script you suggest should be add as an extra command?

View attachment 1944784

Anyway, I’m pretty sure that 1 automation that cut off power when the level raises up to 80 is enough, what do you think?

Thanks for your support, I’m a newbie in the automations world.

Appreciate it ?
Sure, one automation script will work.
 
  • Like
Reactions: Jutah
What does the error message say (in english)?

Try this change:
View attachment 1944692

I can’t make it work.
The sequence starts correctly

47B1A6A3-A1B9-401D-995E-6FBEB05D669E.jpeg

.. but then

77DA096C-72B4-4CC2-A146-A8E6E3F08584.jpeg

Translation:
(An error occurs with the automation “when the libel rises up to 80%”. Accessory not available).

It is not able to turn off the smart plug because it can’t find it.

I tried single automation to turn on / off the smart plug at a specific time and it works properly.

What can I do?
 
Last edited:
I can’t make it work.
The sequence starts correctly

View attachment 1945946

.. but then

View attachment 1945947

Translation:
(An error occurs with the automation “when the libel rises up to 80%”. Accessory not available).

It is not able to turn off the smart plug because it can’t find it.

I tried single automation to turn on / off the smart plug at a specific time and it works properly.

What can I do?
I use a Wemo smart plug. When I added the Wemo smart plug in the Home app, I renamed it to Smart Plug. You will need to use the name of your smart plug that was created in the Home app when you installed it. the easiest way to do this is:
  • In your Shortcuts Automation, select the if statement. You should see this:
if Input Condition
Otherwise​
End if​
  • Select Input.
  • In the Inout Anything menu, choose Select a Home Accessory.
  • Select the name your smart plug device.
 
Last edited:
I use a Wemo smart plug. When I added the Wemo smart plug in the Home app, I renamed it to Smart Plug. You will need to use the name of your smart plug that was created in the Home app when you installed it. the easiest way to do this is:
  • In your Shortcuts Automation, select the if statement. You should see this:
if Input Condition
Otherwise​
End if​
  • Select Input.
  • In the Input Anything menu, choose: Select a Home Accessory.
  • Select the name your smart plug device.

I follow your previous instruction and the name in the Home App is the same I pick up in the automations.

This morning I tried many test.

This may sound weird but if I try without the iOhone attached to the wire .. the automation works as a charm.

If I do the same, but with iPhone plugged in… boom: automation error, accessory not found.

Another thing: the very automation is for turn on the smart plug. It works, with and without the iohone plugged in.
 
I follow your previous instruction and the name in the Home App is the same I pick up in the automations.

This morning I tried many test.

This may sound weird but if I try without the iOhone attached to the wire .. the automation works as a charm.

If I do the same, but with iPhone plugged in… boom: automation error, accessory not found.

Another thing: the very automation is for turn on the smart plug. It works, with and without the iohone plugged in.
Did you create 2 scenes in the Home app, one to turn on the smart plug and one to turn off the smart plug?
 
Did you create 2 scenes in the Home app, one to turn on the smart plug and one to turn off the smart plug?

i have no scene in the home app: i turn the on the plug with an automation.
Here the screen of my home app and of the automation i am testing today.

Nice clue: i tested an automation to turn off the smart plug with the iphone plugged in (trigger; at a specific time) and it worked.2EB694AF-7513-478D-8AAE-8023791D19AC.jpeg

6829A26C-19EC-477A-BE77-069BE1F1587A.png
 
You need to create two scenes in the Home App first.
Then reference one of those scenes to turn the plug on and the other scene to turn it off.
I choose the scenes by choosing the Home App in “Apps” option then the on or off scene.

These are mine for my smart plug

D0620476-B844-4D00-99F5-E3EE97CA296D.jpeg


9120587C-6111-4E28-98BB-5CB1FF093C3F.jpeg


70BE930D-A858-49F3-979F-288F9ED919ED.png
 
Last edited:
  • Like
Reactions: Taz Mangus
You need to create two scenes in the Home App first.
Then reference one of those scenes to turn the plug on and the other scene to turn it off.
I choose the scenes by choosing the Home App in “Apps” option then the on or off scene.

These are mine for my smart plug

Very good point ?
I created two scenes and put them into the automation as you can see in the screenshot.

Let’s hope it’ll work

Ps: I turn on & off the Wi-Fi also, usually I turn off all the wireless devices during night.

2FA547FB-4217-4241-8163-BF3E8FCE51F2.png71783AED-B0E6-4A59-AE55-BE28D336EA2F.png
 
The key for this is to have a "wait" command to wake up your phone otherwise you're going to keep getting the accessory not found error. Spent months trying to figure out a fix then I found it on here, can't remember the OP but credit to them.

So in "search for apps and actions" just search for "wait" and set it to whatever, I got it at 5 seconds, then have your Homekit action.

Mine looks like this:

Wait 5 seconds
Set Smart Plug
Wait 5 seconds
Set Smart Plug

I have an extra set of redundancy just because I struggled with the "accessory not found" error for a very long time lol.

Found it. Credit to @reppans You can ignore step 2 if you would like. Really what you want out of this is just the "wait" script in step 4.
Original Thread


51359328018_ce1e5e8861_o.jpg
 
Last edited:
  • Like
Reactions: Jutah
The key for this is to have a "wait" command to wake up your phone otherwise you're going to keep getting the accessory not found error. Spent months trying to figure out a fix then I found it on here, can't remember the OP but credit to them.

So in "search for apps and actions" just search for "wait" and set it to whatever, I got it at 5 seconds, then have your Homekit action.

Mine looks like this:

Wait 5 seconds
Set Smart Plug
Wait 5 seconds
Set Smart Plug

I have an extra set of redundancy just because I struggled with the "accessory not found" error for a very long time lol.
I have not experienced Accessory not found. Maybe it is related to the actual smart plug. I am using a Weno smart plug. My Automation is:

When Battery Level is 80%:
Set Smart Plug Off
 
I have not experienced Accessory not found. Maybe it is related to the actual smart plug. I am using a Weno smart plug. My Automation is:

When Battery Level is 80%:
Set Smart Plug Off
My post was directed at the OP, @Jutah who seems to have the accessory not found issue. But congrats on not having it yourself!
 
  • Like
Reactions: Jutah
The key for this is to have a "wait" command to wake up your phone otherwise you're going to keep getting the accessory not found error. Spent months trying to figure out a fix then I found it on here, can't remember the OP but credit to them.

So in "search for apps and actions" just search for "wait" and set it to whatever, I got it at 5 seconds, then have your Homekit action.

Mine looks like this:

Wait 5 seconds
Set Smart Plug
Wait 5 seconds
Set Smart Plug

I have an extra set of redundancy just because I struggled with the "accessory not found" error for a very long time lol.

Found it. Credit to @reppans You can ignore step 2 if you would like. Really what you want out of this is just the "wait" script in step 4.
Original Thread


51359328018_ce1e5e8861_o.jpg
Did you create 2 Scenes, one to turn on the smart plug and one to turn off the smart plug?

CBA96303-1AA0-4268-AF9B-5A00B5285DDD.jpeg
 
The key for this is to have a "wait" command to wake up your phone otherwise you're going to keep getting the accessory not found error. Spent months trying to figure out a fix then I found it on here, can't remember the OP but credit to them.

So in "search for apps and actions" just search for "wait" and set it to whatever, I got it at 5 seconds, then have your Homekit action.

Mine looks like this:

Wait 5 seconds
Set Smart Plug
Wait 5 seconds
Set Smart Plug

I have an extra set of redundancy just because I struggled with the "accessory not found" error for a very long time lol.

Found it. Credit to @reppans You can ignore step 2 if you would like. Really what you want out of this is just the "wait" script in step 4.
Original Thread

Thanks a lot, i think this could make the trick!
I suspected the speed of execution was somehow the culprit, this should work.
Anyway i change the automation using the "scenes" instead of the "accessories", as suggested.

I didn't have the chance to test it, i will do it tonight.

PS: did you turn off the optmize charge?

I think the issue the OP has is due to not creating and using a Scene. But rather trying to set the device directly.
Yes probably that was another issue.

Thank you all for the support, i really hope this automation can save my battery life over time.
 
Unbelievable.
Even this night the automation failed.

It wasn't able to turn on the plug.
I added the "wait" option just in the main action on the level rises up to 80, but probably i have to add the "wait" option in EVERY automation before the main one.

Now this my #15 revision set :D

action 1
at 4 a.m, > wait 4 sec + turn on wifi on

action 2
at 4 a.m, > wait 4 sec + run charger on

action 3
at >80% > wait 4 sec + power saving + run charger off + turn off wifi


This thing is driving me nuts!!

If this works ok, otherwise i'll retun the plug and roll back to optmize charge on iphone i think :(
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.