HABPanelViewer

android
habpanel
Tags: #<Tag:0x00007f18269daf40> #<Tag:0x00007f18269dadb0>

(mimuni) #121

Hello,
Thank you very much for the great app, it’s exactly what I’ve been looking for. But I have a small problem. For external access I use the Habpanel over SSL with a Htaccess authentication. Is there a way to deposit the username and password in the app. Passing the password via the URL (https://username:password@myServer) does not allow the app.


(Volker Bier) #122

That is not possible. Can’t you use VPN for external access?


(mimuni) #123

That might be a solution, but since I run with multiple sites this authentication was the best solution so far. Then I have to reuse WebView, at least on external devices.


(Ray) #124

Not a current feature but I’m guessing something that could be added? The standard openHab android app is effectively doing this on the remote url (and plenty of other apps do it) so I suspect it’s in the libraries routines somewhere just need to find someone interested in coding it.


(Volker Bier) #125

I have just submitted an update that allows to send brightness average only. Interval can be set in the preferences.


(Volker Bier) #126

Another update. Added a connected indicator that propagates the current timestamp to openHAB at a configurable interval.


(Michael Ritterbusch) #127

@vbier Are you planning to publish to the Play store now that this is getting more mature? Is that something you would like me to help with?


(Rob Pope) #128

I’m struggling to get the motion detection to work on my Nexus 7 2013.

I can see in the camera preview window that motion is detected.
Device Control is enabled and the Item shows white when typed into the selected item text box.
Sensor Reporting is enabled and the Motion Contact value is set to the same as the Device Control Item
I’m using the Lollipop API

However the item isn’t being updated. It only shows as CLOSED. I’ve seen the tablet wake twice so far, which I think is by motion, but it doesn’t seem consistent. Is there an option I’m missing?


(Rob Pope) #129

I’ve used adb logcat and can see the state is updated, but this doesn’t appear to be reflected in the app or via persistance. I’ve updated the log in case there are any clues

logcat.xml (787.8 KB)


(Volker Bier) #130

@vbier Are you planning to publish to the Play store now that this is getting more mature? Is that something you would like me to help with?

We can do that (and it would be nice if you help me) in due time.

However the item isn’t being updated. It only shows as CLOSED. I’ve seen the tablet wake twice so far, which I think is by motion, but it doesn’t seem consistent. Is there an option I’m missing?

Looking at the logcat, the app updates the contact to be OPEN (no motion) on startup:
12-03 21:09:56.624 11014 19370 V Habpanelview: Sending state update for Tablet_Motion_Detected: OPEN

then to CLOSED a little bit later when motion has been detected:
12-03 21:09:58.322 11014 19342 V Habpanelview: Sending state update for Tablet_Motion_Detected: CLOSED

During the rest of the log, motion is detected before the motion timeout (which is 1 minute, if my memory serves me right), so the contact is not updated to OPEN any more.


(Rob Pope) #131

Thanks @vbier - That makes sense. My screen is set to timeout after 15 seconds so I’ll increase it to a minute so I don’t get a confilct.

That said, I’m seeing it trigger to OPEN every minute. I’ll try reducing the sensitivity as the sun was rising over this period but I’m a little suspicious that something else is going on due to its regularity.

image


(Volker Bier) #132

This looks as if two devices are running at the same time on the same item, is that possible? The trigger to OPEN should only be performed if the current state is CLOSED and if there has been no motion event in the last 60 seconds.

From looking at the code i do not see how the above state changes should be possible with a single device.

Edit: you can look at https://github.com/vbier/habpanelviewer/blob/master/app/src/main/java/vier_bier/de/habpanelviewer/reporting/motion/MotionReporter.java and check if I overlooked something.


(Rob Pope) #133

I set up the contact item especially for this and it is the only thing updating it. Your code looks fine to me too.

I’ll reduce the sensitivity and log again but over a longer period


(Rob Pope) #134

OK, I’ve disabled Motion Detection in Sensor Reporting and the item is no longer being updated. So that’s other things updating the contact item ruled out.

I’ve also put tape over the camera and it’s still triggering the rule after a minute has elapsed. Very strange!


(Volker Bier) #135

If it updates the contact to OPEN after a minute that means no motion. I would expect no motion if you taped the camera. But I am wondering why it sets the contact to CLOSED in the first place. Does it do that once after start or continuously?


(Rob Pope) #136

Oh! So closed means motion detected? I’ve been doing my test in the wrong order. I assumed open meant motion had been detected.

When I launch the app it is immediately set to closed.

Should my REGEX be set to OPEN or CLOSED? It’s currently set to OPEN


(Volker Bier) #137

If you want the tablet to turn on when motion is detected, set it to CLOSED.

If the tablet is detecting motion when there is none, try to reduce the sensitivity in the settings. Enable the preview and tweak values until you get satisfactory results.

Edit: if you open the Status Information you can see the current states of all items used by the app.


(Rob Pope) #138

It’s working now. Many thanks @vbier

I’m also going to setup a wireless power switch with a rule based on battery % with a check to see if the tablet is in the dock.

Thanks for the app, it’s really impressive!


(scott dee) #139

wow, this will be a nice alternative to FKB, thanks for making this.
I have a question after a brief explanation. I’m using an Amazon fire for one of my panels (got it free) and after it goes to sleep it has a “lock” screen that cannot be turned off. This is a pain for motion detection. In FKB the tablet turns back on but it’s stuck at the “lock” screen. The way around this in FKB is to use a screensaver that basically blanks the display. The backlight is still on and the tablet never really sleeps.
My question is: could you make an option that instead of putting the tablet to sleep, could you set the backlight to 0 until motion is detected and then set the backlight to a defined value once motion is detected? I know it wouldn’t be as popular as putting it to sleep but it would be helpful for Amazon Fire tablets.

Further, could you also make it so if the display is touched it turns back on?

thanks!!


(Hallo Ween) #140

Connection control gives me a long number, is this the timecode in seconds?

How can i change this to a readable format?