maximkulkin / esp-homekit

Apple HomeKit accessory server library for ESP-OPEN-RTOS
MIT License
1.1k stars 168 forks source link

Timer Switch option? #178

Open Maarten-s92 opened 3 years ago

Maarten-s92 commented 3 years ago

Hi,

Maybe I’m not looking in the right place, but I can’t find any option to set a or program a timer.

I use the esp as a switch for my audio, but my girlfriend forgets to turn it off. So having a timer would be a great solution. Anybody that can help me?

Thanks a lot in advance!

maximkulkin commented 3 years ago

Could you be more specific on what you're trying to achieve? For example, if you want to create an automation that will turn off a switch after 1 hour, you can do it with automations and new Shortcuts app:

Now it will automatically turn off after an hour after it was turned on.

Maarten-s92 commented 3 years ago

Thanks A lot for the tip and the great discription Maxim.

I tried to use your set-up and got it working for a minuten than I made some changer and it all went downhill from there. The thing I would like is that the moment someone turns on the switch trough their iPhone the timer starts running. The problem I now have is that I can activate the timer but only trough the automation it’s self. I got some succes with scènes but somehow I could not get it working fully automatic. Maybe it’s the problem that I don’t have a HomeKit hub. I tried using my iPad mini2 as one but it only has iOS 12 which doesn’t allow me to use the option “an accessory is controlled”. I have an old iPhone which I maybe could jailbrake to iOS13 so that will be the next thing to try.

Thanks a lot!

maximkulkin commented 3 years ago

Oh well, you do need a hub to be able to do HomeKit automations. You can try HomePod mini as a hub, they cost much less than other alternatives ($99).

Maarten-s92 commented 3 years ago

Ah that’s the thing. Isn’t it possible to “build” a hub? I’m not sure iff I want te voice control stuff

maximkulkin commented 3 years ago

No, you can not build a hub.

Maarten-s92 commented 3 years ago

Hi Maxim,

So i tried to make 2 hub's one with my ipad (Ios12) and one with and old iPhone jailbroken on ios 13. In bots cases I can't select "an accessory is controlled" it's grayed out. Do you maybe know why that would be?

Maarten-s92 commented 3 years ago

After adding a homebridge for some other sockets it works now! So thanks for your tips!

yeffal commented 3 years ago

Hi Maxim,

Is there a way that I can ask Siri (In homekit) turn the switch (any switch) for 10 minutes? I got what you explain in:"Could you be more specific on what you're trying to achieve? For example, if you want to create an automation that will turn off a switch after 1 hour, you can do it with automations and new Shortcuts app:"

But I do not want to turn off always in 10 minutes, maybe this time a just want to turn off, but in other time to turn on and turn off after 10 minutes or any timer at that time.

I can do this very easy with Alexa and I´m trying to just use siri.

Thanks a lot for your help.