Your APP is awesome.
But it seems not to work with my AlarmClock APP (AlarmDroid).
I have there multiple alarms configured, each (or most of them) for more then one day.
But the current behavior is, that after the current alarm is triggered, the Item change to 0.
2018-12-05 06:00:03.869 [vent.ItemStateChangedEvent] - AndroidAlarm changed from 1543986000 to 0
Only if i open your APP, the item will get the next alarm, but after this one triggered i have the same problem again…
since I also use AlarmDroid, I exclude that. I’m too running Android 8.0.0 (although on a Sony device). I know that the current alarm is not always sent to the server, but right now I’ve got no real clue why.
I guess that the app gets unloaded by the os and therefore receives no alarm anymore (Although this should actually not happen, because the app should be started on any alarm change) or is unloaded while trying to sent the next alarm to the server (which is more likely)
There are multiple things that are happening in the app. When the alarm is scheduled, the app is called and reads the next alarm from the AlarmManager. If the app, that scheduled the alarm, is allowed to do so, the rest call is made. Now things get tricky as this might fail due to numerous reasons. If that happens, the request ist scheduled to run again after 30s (but android can decide to delay that, as long as it wants :/). WLAN has to be on, assuming that openhab is running in a home network.
If the rest call is answered with anything but 200 HTTP OK by the openhab server, this alarm will be disregarded.
Is there any error message displayed in the app?
Is there any app disallowing “Home Automation Alarm Sender” to run?
Is WLAN on?
Thanks for the reply.
You are right, my OH is running in a home network, but WIFI was enabled all the time.
I see no App which is disallowing HAAS to run, also i don’t see any error in the APP (when i’m in the wifi).
I tested it yesterday also with an other APP, which should detect the alarm and send the info via MQTT to Openhab.
But this app also failed…
I only get the new AlarmDate when i open your APP (also tested with other Alarm Clocks).
I think the problem is that i have a Samsung phone.
I will test it again in the evening with my old LG, maybe i’m lucky…
another idea: there might be something about power management. Maybe allowing background activity for HAAS or excluding its background activity from power saving is helping.
I noticed that also some other apps (wifi badger) where not working probably…
The problem was that i had enabled the “power saving” mode…
After i disabled it, all apps which should work in the background where working again.
But i think this is a Samsung Bug, cause i added them to be allowed to run in the background.
Hello,
does anyone have the error that is sent in the time to Openhab is an offset of about 5min (299 seconds)?
Now and then comes the right value.
And if I set an alarm in the next 5 minutes, the time will be sent for the next week.
You likely do not do anything wrong. My guess is that your alarm clock app does weird stuff. The OH app uses this API whose return value is what was previously set by the alarm clock app via this API … so I’m pretty sure what’s reported equals what your alarm clock app is doing.
You are not doing anything wrong. I guess it is the alarm app: Wake up is “difficult” for an app, and there is no guarantee your app is woken up by the AlarmManager on time. So you schedule an alarm 5 min before you want to wakeup. The device awakes from deep sleep and sets an alarm in 5 minutes. As it takes some time for the device to go into sleep again, the next alarm will most certainly be on time.
I’m relative new to openhab, so sry when this is some kinde of a noob question.
But the non beta version of the openhab app now has also the option to send the alarm time to OH, but I can’t get it to work.
I constantly get an error message that the Item couldn’t be updatet (http error 400).
To me this sounds like a connection problem but the rest of the app works just fine no matter if I am in my local network or vie the remote adress.
I hope someone can help me.
OK, I found the misstake…
the item hast to be of number type and not DateTime.
But can eventually someone tell me how to convert the time which is given in ms into an normal Time/date fomat to show it in my sitemap and/or HABPanel?
Can you please tell me how to use it? Im really pretty new to OH and try to learn .
My solution would be to create a new Item with DateTime as type called “AlarmClockDT”.
Also I would create a rule that would look something like this:
rule "Alarm convert"
when
AlarmClock changed
//Rule gets triggerd when AlarmClock is changed by the app
then
AlarmClockDT.setCommand(Date = new Date((long)AlarmClock))
end
Everytime the App sends a new time to the Item AlarmClock the rule will update the Item AlarmClockDT with the converted value.
The Item AlarmClockDT can than be used in a sitemap or HAB Panel, correct?
I found a multitool for detecting events on the phone, i.e. alarms and sent it over to openHAB using MQTT as protocol. Maybe a bit technical solution but simple in design and works for all kind of alarm-apps.