New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OH App problem with Android 9 -10 and 11 #2538
Comments
In this case does the server receive the correct time (the alarm on the next day)? |
Hi mueller! The alarm sent in de android app is shown in what I think is UTC (I just accepted that, but not sure), so my answer might not be clear; it shows a different time than the real time here in my country (Argentina) BUT the OH3 server log shows the correct time and acts like the alarm has been fired at the correct time, however as I said the actions are not being fired but the rule acts like if it has been successful and reprograms the alarm for the next day. The alarm I set is repetitive. This is the rule, just in case it helps:
|
Just to add something now, the rule now doesn't trigger actions even if I set the alarm to current time + 1 minute on the Note 10 but it works perfectly with older phones running older android versions. |
I have the same problem, the problem is when the alarm on the phone goes off the openhab app on the phone sends 'UNDEF' to the server and cancels the timerAlarm before it can trigger the action. |
I have same problem : when I lock my phone, the phone sends 'UNDEF' I found a workaround :
The OH server and phone must be on the same time zone (or have a differents hours beetwen your phone alarm and OH server) Warning : If you set true alarm beetwen this fake alarm and a manual lock / unlock phone, OH will be ignore your true alarm. |
Whenever an alarm time is sent there should be a log line |
Openhab server log
|
|
When I set an alarm closer (<10min) : The app send correct value. When I lock or unlock, nothing is send When I set an alarm not closer (>10min) : The app send correct value. When I lock,the UNDEF value is send. When I unclock, the app send correct value When I set an alarm not closer (=12min) : The app send correct value. When I lock,the UNDEF value is send. When I wait 4 min and unlock my phone (time before next alarm < 10min), the correct value is send. After when I lock or unlock, nothing is send |
hi there, getting worse. Even on my old Note 4 I miss the alarms. Sometimes it works, sometimes it doesn't. This happened a couple of times. The phone is always connected to power and is online (I use it as a remote control). |
bump— Just to add some more information: I flashed my old note 4 (OH app working) with an AOSP android 9 ROM and it doesn’t work with the alarms anymore so there is definetly some issue between OH app and android 9 onwards. |
I just tested on an Android 11 emulator and the default clock:
It fails, because I don't have this item at the server, but it would send the correct time. |
Here is the log today:
|
I don't see any line associated to the alarm clock. Can you set a new alarm in the near future and post the log again? |
The app doesn't and shouldn't save the alarm time in any way. What's shown there is the data of the previous update. If nothing is shown there, it has no information (meaning you cannot tell what the last update was or if it happened). |
Well I'm confused... I don't know what could be the cause. Maybe the problem is on the server side then? right now I'm on 3.1.0 M3 (but it was the same with last stable version) So far:
I'll keep adding tests I make here. |
Tried again with the note 10 with android 11 yesterday(configured an alarm for today) and it didn't work. here is the OH3 server log:
|
Today it happened again: 2021-06-29 07:30:00.079 [INFO ] [org.openhab.core.model.script.alarm ] - Alarm canceled The alarm gets cancelled, don’t know why. 2021-06-28 07:30:00.894 [INFO ] [org.openhab.core.model.script.alarm ] - Alarm expired However this line doesn’t show when the alarm doesn’t fire in OH, instead it goes straight to “cancelled” for some reason. Here is an “it worked!” log for reference:
|
EDIT 23/06/2021 : This problem is happening on other devices as well (in my case Samsung note 10 and note 4 (with android 9 rom) so I think its an android version related problem.
Actual behaviour
The OH app seems to be sending the alarm configured on the phone to my OH3 server, however for some reason it doesn't trigger the actions configured in the rule (taken as is from the documentation). The OH log shows that the alarm is being registered, but no actions are triggered when firing the alarm.
Weird things happen here since:
1- If I configure the alarm just a couple of minutes ahead to the current time to test, everything works as expected.
2- If I set the "real" alarm (to the next day) it doesn't work, but all the above happens (it sends the alarm, it is shown in the OH3 server log, but it doesn't trigger the configured actions)
3- Testing with an older phone (Samsung Note 4) running android 6.0.1, everything works as expected.
4- Using Google Clock app on both tested phones.
5- Both phones configured in "Spanish (United States)" language.
6- Made sure the "optimization" and "battery optimization" are disabled for OH app in the Note 10 phone.
Expected behaviour
To fire the actions configured in the rule.
Steps to reproduce
Will NOT work:
Will work:
Environment data
Client
Server
openHAB Cloud
Logs
openHAB Server log
The text was updated successfully, but these errors were encountered: