HABPanelViewer 0.9.27

OK, making progress, but the contact item is always set as closed. I’ve tried changing the three parameters in the sensor settings with no joy. The only time it changes is when I restart the app.

EDIT: It’s now changing the value but HabPanel Viewer isn’t seeing the SCREEN_ON command. Nothing is reported in the command log at all

I assume you have created the appropriate rule that actually sends the command (and does not post an update instead).
Check that you have an entry like the following in your events.log:

Item 'Tablet_Control' received command SCREEN_ON

If you have, does the menu show that the app is connected? The connection status from the menu is directly derived from the SSE connection to the openHAB server. So if it shows the server URL, commands should come in.

One more thing that came to my mind. If you have Android 7+ try to change the webview implementation in the android developer settings. I had missing updates with the default AOSP webview. The “Google Webview” seems to work best for me.

Yes, that is probably the case for me as well. I have two old Note 8.0 tablets, updated to 7.0 (Linage OS) they work perfectly with instant updates. It’s the 4.4 tablets that does not work satisfactorily…

Sorry, I started an update last night but forgot to finish it.

After a bit of playing I’ve got it working, but I find the application is crashing quite often. I’ll grab the debug APK off Github and see what’s what.

Have you tested if your problems are fixed with the new apk?

No not yet. I was keeping an eye on the issue you created on Github so I didn’t want to bother you while you were working on it. I didn’t notice you already fixed it.
I guess that this commit will probably fix it? https://github.com/vbier/habpanelviewer/commit/9b0cd2cb85f8cc49de344a5ed6d774ed606f2ade

I’ll test later today when I’m home.
Thanks!

I tried to reproduce the issue without succes so that’s good!
I will keep an eye on it for a couple of days.

I’ve had the auto-on working briefly. Using the debug APK and turning off hardware acceleration resolved the crashes, however the motion detection contact is always closed. I turned on the camera preview (I’ve tried both lollipop and non) I see that to start with the camera is working but after a while it goes to a black screen.

Sorry folks, am I being really dumb?

I have the command item setup and single commands work fine. Example SCREEN_DIM works fine.

What do I do if I want to run something with a parameter? SET_BRIGHTNESS=10 SET_BRIGHTNESS 10 SET_BRIGHTNESS:10 all turn yellow in habpanelviewer log meaning they’re not understood.

Thanks

Ignore me… quotes :slight_smile:

Hello,

in my case I realized that the sensor reporting from the tablet stops working after one or two days. If I reboot the app I can see the value of the items sent to openhab, but after one-two days it does not work and I have to reboot it.

Francesco

How long does it take until the preview gets black? Can you upload an adb log somewhere?

Have you checked if the app still shows new values in the status information? Is the app still connected? With reboot the app you mean restart the app or reboot the tablet?

I’ve did a few other tests and I could not reproduce the crashes anymore so I think we can conclude that that issue has been solved.
But… I’ve encountered another issue. If the screen is off and I restart OpenHAB then the tablet doesn’t react when I send the screen on command. Also the connected indicator is updated rarely. I guess something like 3 or 4 times over a period of 8 hours. Normally when the screen is off, the indicator is updated every ±4-5 minutes.
When I turn the screen on manually I see habpanel updating after a few seconds and also hpv responds normal again. Once the screen is turned off again, the problem occurs again. The solution to this problem is to close hpv and start it again.

I don’t know if this makes sense but that’s how I’ve experienced the issue. I also uploaded the log file. You can find it here:
https://pastebin.com/yYeBadDW

It looks like power saving features are enabled on your tablet:

06-21 19:45:45.954 1412 1412 D wpa_supplicant: wlan0: Control interface command ‘DRIVER SETSUSPENDMODE 1’

Wifi seems to be connected only after the screen has been turned on:

06-21 20:54:36.233 1412 1412 D wpa_supplicant: nl80211: Associated with ac:22:0b:31:fc:22

There is nothing in the app that reduces sending of the connected indicator when the screen is off. It should report the time stamp to openHAB every 60 seconds (if you have not changed the interval). This has to be caused by the OS, most likely this is some power saving feature. Check that you have disabled all power saving settings for HPV.

There are different settings: WIFI has to be on in stand-by, and battery optimizations have to be turned off for the app. This depends on the OS, you should maybe google for instructions for your OS or device.

As a side note: you are sending way to many commands to HPV:

06-21 20:55:34.096 6463 21148 V HPV-ServerConnection: propagating item: Tab_Command=KEEP_SCREEN_ON
06-21 20:55:34.096 6463 24879 V HPV-ServerConnection: propagating item: Tab_Command=KEEP_SCREEN_ON
06-21 20:55:34.099 6463 21199 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.099 6463 21149 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.102 6463 21220 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.102 6463 25403 V HPV-ServerConnection: propagating item: Tab_Command=KEEP_SCREEN_ON
06-21 20:55:34.104 6463 21198 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.105 6463 25408 V HPV-ServerConnection: propagating item: Tab_Command=KEEP_SCREEN_ON
06-21 20:55:34.105 6463 25407 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.106 6463 21148 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.106 6463 21645 V HPV-ServerConnection: propagating item: Tab_Command=KEEP_SCREEN_ON
06-21 20:55:34.107 6463 28638 V HPV-ServerConnection: propagating item: Tab_Command=KEEP_SCREEN_ON
06-21 20:55:34.108 6463 21200 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.108 6463 24966 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.108 6463 25403 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.110 6463 24879 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.110 6463 21664 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.112 6463 21645 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.116 6463 25408 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100
06-21 20:55:34.119 6463 28638 V HPV-ServerConnection: propagating item: Tab_Command=SET_BRIGHTNESS 100

Can you provide a new log and whitelist HPV for chatty? Many log entries have been swallowed, which does make troubleshooting hard. This should be possible by using the -P parameter for logcat. See https://developer.android.com/studio/command-line/logcat

Hi Guys, using this on an Android tablet.

No matter what I do, even on my Note 8m it shows ‘not connected’

I’ve got it set to http://192.168.0.3:8080 and then I have my start page as the main dashboard as per the instructions.

Any thought?

Makes sense… I forgot to disable the power saving functions for the debug apk I installed.
Strange that these commands arrive all at the same time. I guess these must have been buffered somewhere in the tablet and were processed when I enabled the screen because I only send these command on state changes like coming home and leaving or when the connected indicator updates outside the expected time frame (60 seconds or ±5 minutes when screen is off). Thanks for your help and hint to the solution!

Was that directed at me? :slight_smile: