I was wondering if someone had managed already to retrieve data from phones, for example alarm clocks, and how. My goal would be to use people’s alarm clocks to trigger some events. E.G.: I wake up at 6 am, it would be nice to automatically trigger a smart plug to launch my coffee machine at that time so by the time i go downstairs, my coffee is already hot. Stuff like that.
If anyone has ideas about this, I’d love to read them.
Retrieving alarm clock data from an android phone is possible with the app Tasker and a plugin AutoAlarm both can be found in the Playstore. Once date is recieved by Tasker there are multiple ways to send it to Home-Assistant. Ben got a nice video of a way to do it here. https://www.youtube.com/watch?v=CvSYZnKS0es
I used to use tasker to read the from field from whatsapp and texts when driving, years ago.
Now i use it to backup my phone at night, but this alarm function could be very useful indeed !
I use the “Automate” app from Llamalabs for this. Basically i let my phone send the alarm time to home assistant when i set or change the alarm. And then Homeassistant takes care of playing music and lighting up the room slowly until its time for wakeup. Similar to a wakeup light from philips.
That looks cool - would you mind sharing one or more of the http requests as well?
I have created a few buttons/shortcuts on my Android phone with the ‘HTTP Shortcuts’ app, but I always struggled to get the syntax right
I was excited to be presented a solution based on Automate since I already use it to send TTS to my devices from HASS. I tried this setup yesterday and it works flawlessly. Thank you very much!
Btw, I first tried to create the sensors with Template then update them via Automate, so I always have them on my dashboard even if my phones haven’t sent their data yet, but when I create the sensors first, Automate doesn’t seems to update their respective data. Weird. Am I missing something?
Thanks for the idea with automate by llamalabs. I’m not great with coding and sort of just copy paste and fumble my way through.
With your example above would it be possible to use it to toggle an input Boolean switch? And what would the Jason code look like.
Basically I have an automation set up and I want it to flag to HA that I’m sleeping and to inhibit some of my other automations. I work shift work so am often sleeping during the day.
Also I notice at the end it’s has the API password but that is now being replaced with the new loving method is that correct? So this part will have be changed too?