freaktechnik / Webthingify

Turn your Android phone into a Web of Things thing
MIT License
35 stars 3 forks source link

cool project to re-purpose an old android phone -- what capabilities are possible? #3

Open kgiori opened 5 years ago

kgiori commented 5 years ago

cool idea to re-purpose an old android phone!

some ideas for how to take advantage of one as a web thing: camera: take snapshots or stream video on demand; run ML apps to detect/count people vs animals, measure luminosity motion: if attached to a door, garage door, window, or other movable object it can trigger upon detected motion sound: listen for loud alarms (security alarms, smoke or fire alarms) camera and speaker: use as smart intercom system between two of them

freaktechnik commented 5 years ago

One of my main goals is definitely to expose the camera. I haven't really taken a dive into what that ensues on the android side, waiting to see what the security camera schema will end up being.

It'd be really neat to run some image recognition, too, though I'm fairly inexperienced with that, but there surely are some very usable java/android libraries for that.

Brightness is already exposed if the device has a dedicated sensor for it (most devices have one for screen brightness adjustment).

I hadn't thought of the motion detection aspect, that's a really neat idea!

I've been planning to add a "loudness" property, which would return the noise level as measured by the microphone of the device. However I haven't looked into this so far, and I worry refresh rate and accuracy may be a bit lacking. This is based on other existing apps that attemot this functionality.

Lastly, speakers are not something that are easy to use with the wot, especially not to send audio to. However I guess the app could have some kind of "action" editor that lets you add actions to play a sound the user selects in the app.

freaktechnik commented 5 years ago

Update: it now exposes a "inMotion" property that indicates when the device is being moved. This should cover the motion part.

I've also added a loudness measurement, which are decibels relative to the maximum amplitude that can be measured. This should allow listening for loud things based on some testing with ambient values.

kgiori commented 5 years ago

So cool! Is there a minimum Android version that webthingify will support? I have an old Samsung tablet (doing nothing). Wondering if it can be upcycled...

freaktechnik commented 5 years ago

Currently it's targeting Android 8, but I may give it a compatibility pass to install on an older phone of mine, not even sure what that'll be.

freaktechnik commented 5 years ago

Newest feature: image property with the rear facing camera.