Android App Beta

I made a cronjob for testing, which will post the value to the logfile every 5 seconds, so i can see all changes on the item.

This in my logfile:

2019-10-14 14:17:55.001 [INFO ] [eclipse.smarthome.model.script.RULES] - AlarmClock Handy - übergebener Wert: 1571082720160

2019-10-14 14:17:55.002 [INFO ] [eclipse.smarthome.model.script.RULES] - AlarmClock Handy - alarmtime 2019-10-14T21:52:00.160+02:00

Very strange, now i get a real time, but i don´t have any alarm times at this time… Look at the miliseconds from the datetime-item - i can´t set an alarm to this time with .160 miliseconds.

Last week when i tested this last, date was ok but time was always 00:00

First line of the log is the miliseconds since 1972? (is this called epoch time or joda time???) and second log line is the readable format as datetime.

Maybe an app on your device mis-uses this api. The sender of the time is logged (openhab-android/mobile/src/main/java/org/openhab/habdroid/background/BackgroundTasksManager.kt at main · openhab/openhab-android · GitHub), so can you post the log file of the app here?

A sitemap item thats a setpoint, eg:

Setpoint item=HotTub_Set_Temperature icon=“temperature” label=“Set Temperature [%.1f °F]” minValue=90 maxValue=106 step=1

Will return a value of 102.0 or 103.0 though the Android Beta App.

When i increment the item up via BasicUI webbrowser it works correctly without adding a decimal .0 to the value.

For example.

From the APP:

2019-10-14 20:04:48.092 [INFO ] [me.model.script.19-BullFrog.rules.R6] - ### Set Hot Tub Temperature via Openhab Slider ###

==> /var/log/openhab2/events.log <==

2019-10-14 20:04:48.092 [vent.ItemStateChangedEvent] - HotTub_Set_Temperature changed from 103.0 to 104.0

==> /var/log/openhab2/openhab.log <==

2019-10-14 20:04:48.147 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine ‘/usr/bin/python3 /etc/openhab2/scripts/spa.py settemp 104.0’

And when i do it from BasicUI via my browser:

2019-10-14 20:06:09.494 [ome.event.ItemCommandEvent] - Item ‘HotTub_Set_Temperature’ received command 103

2019-10-14 20:06:09.496 [vent.ItemStateChangedEvent] - HotTub_Set_Temperature changed from 104.0 to 103

==> /var/log/openhab2/openhab.log <==

2019-10-14 20:06:09.496 [INFO ] [me.model.script.19-BullFrog.rules.R6] - ### Set Hot Tub Temperature via Openhab Slider ###

2019-10-14 20:06:09.547 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine ‘/usr/bin/python3 /etc/openhab2/scripts/spa.py settemp 103’

2019-10-14 20:06:09.548 [INFO ] [arthome.model.script.-18-bullfrog.R6] - → Setting Hot Tub Temperature to: 103°F

This occurs on both the Official and BETA Android app.

This is in my logfile:

Alarm sent by com.android.providers.calendar

Both 102 and 102.0 are correct behavior in that case…that’s a statement I got from @Kai in the past; I just can’t find the reference at this moment :-/
The bindings are supposed to deal with that correctly. In what case does this not work for you? I remember the KNX binding receiving a fix for this lately. In case you’re dealing with a broken binding, you can work around this by adding integer formatting to the item’s label (“My Item [℅d]”).

Thanks – I pass the value over to a python script that controls my hot tub temperature and it bombs/doesn’t set the temperature when it has a decimal.

I’ll put some code in place in the script to strip the decimal if it exists then.

EDIT: doing int(variable thats passed) to my python script fixed it. Simple and easy solution :slight_smile:

Thanks,
Python

Can you try out the following patch (apk is added there)? https://github.com/mueller-ma/openhab.android/commit/327b1d32a22ae0748ed4f7adad39177419ccdd3b

Thanks for this update, great improvement and it looks great. There is one thing I’m really missing compared with the previous version: The oled dark theme. On oled screens black is not really black when using the current dark theme.
Not sure if android’s dark mode changes anything here, but if it does androids dark mode is still not available in older android versions (AFAIK). Any ideas how to get oled dark mode with the current app?

Now i can see com.alarmclock.xtreme in the log, this is my alarm-app on my android phone.

I set up a new alarmtime on my phone in about 2 hours - It changed to the new alarm time inside openhab.

After that, i deactivated the alarm in 2 hours and my next alarm is tomorrow morning in about 22h. I can see in the log: com.android.providers.calendar, igrnoring

–> The alarm inside openhab is still on the old alarm in about 2h - but this alarm is not active on my phone anymore…

So i can say, it is working only partly with your changes.

The Android dark mode is basically a global switch between light and dark theme for all apps. For Android versions that don’t have this dark mode, the battery saver controls if the app is bright or dark.

It would need to implemented in the app. I haven’t seen many apps with amoled themes, so I’m not sure if this is wanted by many people.

I see. Let’s say you have the following alarms. Current time is 7:00.
9:00 ignored alarm
12:00 alarm

Create an alarm at 8:00 and the app will send this alarm to the server as it’s the next alarm and not ignored.
Delete this alarm and the app won’t send the 12:00 alarm to the server as the next alarm is at 9:00 (earlier than 12:00), but ignored.

Yes, you got the error.

But even if the 9.00 alarm in your example - which is ignored - is over, it is still visible in my item.

Now it is 16pm and my ignored alarm (today morning 09:59am), which was removed imediately, is still stored in the alarmtime-item.

After the test-alarm today morning (in my case at 10am) it should change to the next one tomorrow morning, but this is not the case.

My daily alarm at 6.15am is an alarm-series, not only one single alarm.

It’s only possible to get the next alarm. So the app cannot know about alarms after the ignored one.
I can think of storing the sent alarm time and if the next alarm clock changes, check if the previous alarm was reached and executed or not reached and thus canceled. If canceled, send 0 as alarm time to cancel server-side alarms.

The optical experience when it’s dark, is major. I have a Galaxy Tab S2 on the wall. With the old version with Oled/amoled theme the background is invisible. With the new app it looks like a bad LCD TV with a lot of back light bleeding. I haven’t looked at the code yet, but would it be hard to implement?

It’s not hard per se, it’s just quite a bit of boring and annoying theming work, as we can’t use a Google provided base theme for that…Google’s base theme for the ‘night’ mode provides that dark gray background.
Maybe it’s just a matter of getting used to the changed look though? :wink:

(BTW, I wonder … did we really use black as background color for the frame background ‘cards’? I thought it also was a dark gray, something among the lines of #111111)

But the ignored alarm is no real alarm… I don´t know, why there is this alarm at this time…

But the old alarm stays in the item, the alarm time of the removed alarm is over but there is no new alarm time… So i can still see the old alarm from yesterday in openhab log.

Hi mueller-ma,
I’m having issues installing the current beta on my desk phone while trying to install from f-droid.

Unfortunately, my beloved phone is still on Android 4.2.2 and will never get an update again from the manufacturer :frowning: :


You said last year:

… is this still valid?

The current official (non-beta) version 2.8.0 is running nicely on it. But the the installation of the current beta from f-droid is throwing a minimum-sdk-error.

While I can understand to abandon support for stone age Android versions, I’d be really happy to prolong the life of it… :wink:

So, what’s the current minimum api version?
If higher than mentioned above, is there a technical reason which prevents you from supporting older api phones?

It’s 19 (Android 4.4).

Yes. We fixed video views, and for that we needed a library which requires API 19. See Use new androidx.media2 video playback library by maniac103 · Pull Request #1503 · openhab/openhab-android · GitHub

Please also note we’ll bump the min API level to 21 (Android 5.0) soon … see [SOLVED] Raise minimum supported Android version to Android 5 for the rationale.

O.k. got it. Thank’s for clarifying :+1: