did you also try com.android.alarmclock.ALARM_ALERT
and com.android.deskclock.ALARM_ALERT
?
Permissions are not needed for alarm clock intents as far as I know. Only for special intents, like when someone calls e.g.
did you also try com.android.alarmclock.ALARM_ALERT
and com.android.deskclock.ALARM_ALERT
?
Permissions are not needed for alarm clock intents as far as I know. Only for special intents, like when someone calls e.g.
ok got a bit closer. I have a huwai phone with EMUI. ANd I installed the stock clock app of android.
If I’m using the Emui alarm clock:
com.android.deskclock.ALARM_ALERT
Seems to work.
But still wondering why the stock app is not throwing the intent.
How to set up with Tasker + MQTT:
mosquitto_sub -h HOSTIP -t "#" -v -u USER -P PASSWORD
replace “obi1” by “sonoffs” or “sonoff”. For service you may add the name you gave to your switch. I am not familiar with automation.conf yet. Got it to work by copy&paste and try&error.
you can use this instead if you use a tasmota sonoff switch:
This is my first post on the HA forums, so thank you to everyone.
I have been using this android app for a few weeks now and everything has been working great. The lights in my bathroom turn on to a dim setting when our alarms go off in the morning.
@corneyl I have a feature request if this is still being actively developed. It would be nice to have the daily alarm count instead of a running tally of the overall number of events since inception. The JSON payload on my current version includes a “count” variable which is the overall count since inception and an “android.intent.extra.ALARM_COUNT” variable which seems to stay at 1 regardless of how many times the alarm is triggered.
The use case for this would be triggering an action in the house to forcefully help to wake someone up after, perhaps, 3 alarms are triggered within a set amount of time.
Thank you again for the great app. It is simple to setup and very intuitive to use.
It’s not actively developed, but so now and then I spend some time on it.
For clarity: would you like to have a count of the past 24 hours, or one that resets at midnight?
A reset at midnight would work for my use case. Perhaps resetting the count after no alarm activity for a set period of time, say 1 hour, would also work. This would allow you to keep track of snooze events in a given alarm ‘session’ if there were multiple alarms used in one day.
Either way having a count of snoozes would be useful.
Thank you again. Cheers.
@corneyl, this is awesome.
The intent “android.intent.action.ACTION_PHONE_STATE_CHANGED” needs some privileges declared in the app manisfest file. I need this intent for automations related with phone calls.
Would you be available to add the ability for listening broadcasts about calls and telephony, please?
Thanks.
Cool option , but isn’t this all easier with the new routines function in the Google clock? Then you don’t need an extra app and mqtt? It’s a built-in feature now… ?
I was looking for a native android way to do this so i could use my voice to activate my alarm.
Unfortunately i discovered that my previous way was way more flexible and offered more features, you might find it interesting.
I use an app called ‘sleep as android’ that is hooked into ifttt by using webhooks. Besides all the default triggers, this has some smart triggers build in giving much more posiblities to automate things.
For example, it has a webhook tigger called ‘smart_period’ that fires 45m before my set alarm goes off. This allows for my thermostat to be set to a temperature and thus making sure it’s nice and cosy when the alarm rings without having to set a thermostat schedule. This also initiates a wake up light and turns on the coffee maker 30 minutes after the trigger went off.
It also fires an event at the moment you should go to bed to meet your sleep targets which you might find interesting.
The setup is quite simple and well documented for IFTTT and hooking IFTTT into hass.
Some examples:
Just FYI.
Sorry, I don’t have time at the moment to work on this.
But I’ve put the code on github so if you want to add something yourself you’re welcome to create a PR .
Those who already have Tasker or an automation app compatible with Tasker (e.g. Automate) or would rather use something else than IFTTT might like to know that they can use a Tasker task (or, e.g., an Automate flow) to act on Sleep as Android events. I have a setup in which Tasker triggers HA scripts when I start sleep monitoring (to turn of my night stand lamp) and when I stop sleep monitoring (to turn on my coffee machine and turn on some lights if it is dark outside).
I understand, but for those who do not specifically look for a tasker way, IFTTT is an alternative that works great for me to do tasks like these.
If u do not mind using IFTTT, this works wonders. Unfortunately, you will be bound to the internet. Then again, on the very rare occasion that this would happen to me, I guess I would survive to not having a wake-up light and flipping the switch on the coffeemaker myself.
Edit: Excuse me, I now see that I misinterpreted your reply. The text above might still be valuable.
Anyone managed to use it with Google Clock? It works ok with Samsung clock but I can’t figure out which intent should be used for Google Clock.
It might now be easier to just install the Home Assistant app and use the next alarm sensor it provides.
I gave up on tasker and alike. Switched over to Google Assistant Routines which are available in Google Clock. It seems to work when I test it with either switches or scripts during the day, but when set up for morning wake up alarm it does not work. The phone shows notification that the routine is running but actually is not doing anything. Has anybody faced similar issue?
Did you see what Corneyl suggested?
Yes I did. Haven’t tried that yet. How would the automation look like? Can I schedule an action for the time when coming from this state? What would be the best way to do that?
OK, I have found a topic on that with a few alternatives:
So after a few days of trying here is my experience, trying to automate wake up routine in line with my Samsung Galaxy S8 alarm clock (stock Google Clock app):
I have noticed this too.
It would have been great if you could force update the sensors every now and then.
Just like you can force the location.