Wall All, an android sensor and output app

I needed a light sensor in my living room as I can’t trust the sunset data, things get dark well before the sun sets.
Because trees.

I looked into light sensors but quickly realized I already had one, and it was already installed and at the right spot. You see, I have an old nexus 7 tablet mounted to the wall in the living room, and it displays a HADashboard screen with some senor data and switches for light, etc. The tablet has a light sensor and when looking at the android dev docs I saw it reported it’s values in Lux, that’s exactly what I need!
About an hour later I had a proof of concept running as a service on the tablet, reporting the amount of light in the living room. I used a simple rest sensor that performed an http get on the tablet and with a simple automation in HA I had a lighting setup that was aware of the actual light coming trough the windows.

A week later I got a ring.com doorbell and I successfully hooked it up to HA. Unfortunately the existing wiring for the actual chime did not work, we’ll need some rewiring. However, I added a method to my android app that allows it to play a locally stored audio file and with a simple automation monitoring the binary sensor of the ding on the ring I had a chime.
A bit later I started to use the other binary sensor ‘motion’ to play a star trek proximity warning :slight_smile:

After some time I wanted to keep an eye on the cleaners after an incident and I got into the camera2 api on android and added a mjpeg streaming video server to the app.
Then I wanted to monitor the volume, after that the battery level, after that it annoyed me that the screen was too bright in the evening and way too dim during the day so I added a way to change the brightness and once again hooked it all up with HA. Some time later I decided that the volume level for playback should be configurable trough HA as well. I added that. Then I wanted to use text to speech for some custom reporting but my chromecast isn’t always on, … so yeah, I added that as well.

Now I’ve polished it a bit and released this app on Google play, it’s over here

Costs about half a sandwich to own it.

I’m giving 5 licenses away for it, please giving me some feedback here as I don’t have a many devices to test it on.

I’ve also created some homeassistant components, wallallsensor, wallalltts and wallallcamera. You can find them in my homeassistant fork. I’ve quickly cobbled those togheter, they’re in need of some serious tlc but haven’t got the time yet to polish them.

anyways, here are the codes, enjoy.
D5JDSYBUN8HV7PUB2EYFNSC
RX1VUS3QD8YBRG1R1316NMD
FQDBXJR0FYVY8PWWCH5UVDH
0JECFR67N0TTB115RHXKKXM
517D7Y3YY3EC7K8GEGF83TE

2 Likes

Got one!(first code) Cool! Been wanting a way to measure ambient sound in my living room! I’ll try to get this setup asap. I saw your PR on github, think it’ll be in for this Sat?

grabbed the second one

I believe I’ve found a bug. If I enter the settings page and press back to go back to the main page of the app I’m always booted back to my homescreen.

Grabbed the third one! I also have an old Nexus 7 tablet I’m using for a similar purpose. Thanks!

What nexus7 are you guys using?
I have a 2012 literally on my desk waiting for this project, but I saw the app needs android 6.0+
I left my 2012 on kitkat 4.4.4 as the performance after upgrade to LP was awful.

I just realized that too. I have the original Nexus 7, which it wont work with. I have other Android devices with 6.0+ that I’m going to have to try it on. I’m running lollipop 5.1.1

I’ll look into lowering the target SDk, can’t promise anything, I use Jack because of lambda’s in the code. I like lambda’s but they’re just sugar. Maybe 5.x will work with some massaging.

Thank you for testing.

Nice work @drbytes, I’ve got a 2013 Nexus 7 gathering dust that is deserving of a decent use, might give this a go.

Too slow for a code :frowning: :slight_smile:

Even though I understand your ambition in creating your own app, did you consider contributing to the WallPanel app? Admittedly, contributing there won’t buy you sandwiches. But it’s pretty similar and may save you from work that others have done already.

1 Like

I’m a heavy user of wallpanel on my Nexus 7 2013, the only stuff I was missing is control over microphone and speakers + brightness control, so this app seems great.

If OP would join efforts with WallPanel that would be awesome. But if I can turn of the parts of Wall All that I don’t need that’d be okay too.

I’d really love to fully utilize my tablet with home assistant. When these 2 apps join powers it would be an all-in-one solution for home assistant users with android tablets.

I didn’t know about this app, I wouldn’t have started from scratch if I did. But hey, it was a nice learning experience.

I do already have a bunch of features that this other app has in my own custom build, the one on google play is a somewhat stripped down version. For instance, I already played with jjoe64’s ideas of motion detection and I have it running at home. I also have a webbrowser in my cut of the app capable of taking url’s or html (via post). Another thing I have is a way to show dialogs on the screen, you basically send it text to display with a range of button’s.
So one requirement I have is a detection that all tracked devices are at one spot (HA tells me that) and I shoot off a dialog using HA to turn off certain switches. So if I happen to walk by the tablet I’m reminded that the outside lighting is on and if I don’t expect any visitors I can decide to shut it all off for the night.

If you guys can think of any other features you want, please let me know. I’ll release a version totday with the ability to turn off the mjpeg streaming, I didn’t think about that but some of you might not be too happy that the app locks the camera, for me it’s a non issue but I’ll remove the selfish camera grabbing.

rgds

2 Likes

I added mtion detction to the release and mqtt.

I’ll port the webview and dialog options later this weekend or next weekend

1 Like

So the webview is there, you can show a fullscreen browser using /GOTO .
I added mqtt publishing of the Sound, Light and Battery data, you can turn the publishing off.
I also added the Motion event to mqtt, so this way you just monitor mqtt and you can extract the last frame that caused a motion detection event to happen, it’s in the /Sensor/MotionFrame as a base64 jpeg.
Now, I also added that to the http api, /MOTION returns the frame that caused the detection.

I also added /PICTURE which grabbs a picture as a jpeg from the configured camera.

Next I wanted to add my photoframe stuff, so I’ve added that and you can use it by calling /SLIDESHOW, just provide the path to a folder with pictures and complete the parameter seconds, seconds is how long the picture will be shown until it moves to another picture.

Anything else you’d want in there? let me know :slight_smile:

Here’s the API so far :

Supported commands:

Name of the feature Info what
/SOUND Returns the value of the microphone in Amplitude
/LIGHT Returns the value of the lightsensor in Lux.
/BRIGHT Returns the current brightness level
/SAY

Uses Google TTS to speak.
/SAY?what=Hello&lang=UK
/SETBRIGHT
Sets brightness. Automatic brightness should be disabled on the device.
/SETBRIGHT?what=50

what should be a number between 1 and 255
/PLAY Plays a locally stored file.
/PLAY?what=/sdcard/hello.mp3
/VOLUME Returns the current volume level
/VOLUMEDOWN Lowers the volume by one level
/VOLUMEUP Raises the volume by one level
/BATTERY Returns the current battery level in %
/MOTION Returns the last logged frame when motion was detected. The image is a jpeg.
/PICTURE Returns a live snapshot from the configured camera. The image is a jpeg.
/GOTO

Opens a new activity and navigates to the url.
/GOTO?what=http://youtube.com
/SLIDESHOW

Starts a slide show of all images in the specified folder; ie :
/SLIDESHOW?what=/sdcard/test/&seconds=10 what specifies the directory,
seconds specifies how long to wait to show the next image.

A new version is up now, you can now edit all the settings in the app trough the api. Just navigate to the http://deviceip:8080 to see how the /MANAGE tag works.

I added a PIN Code or otherwise text password prompt, the results of pass or failure are posted to MQTT.
Pondering what else I can add.

Maybe I could add a way to post results from sensors or code challenges to an HTTP endpoint.

Added HTTP Post to any url.