One of the positive things that came out of the difficult time period that was the early 2020s was that hackers and tinkerers everywhere found themselves with lots more time for their hobbies, many of which were open source/made public. I was no exception.
When I introduced Raspberry Pis as a way to enable remote access to our smart apartments' systems I was bothered by the complexity of it all - most of my neighbors would not be able to do it on their own and I was not interested in doing much more than the 10 already done house calls to equip the others.
I wanted to develop a way that would ideally be a software-only solution and should be as simple as my original Android app tool (documented in my first project's logs here on Hackaday.io).
I was aware that every apartment already had a low-power computer that was powered on 24/7 which could be turned into a server - the wall-mounted Android tablets! (Though I had mixed feelings about the device being a mid-range model - and since it was introduced, 7 years have already passed.)
Some things needed to be considered:
- The vendor only provided a python HTTP-to-UDP bridge to access the PLCs - I needed to find a way to run it on Android, and support the x86 architecture of the specific models used (would be problematic if only solutions for ARM could be found)
The solution: An old version of python-for-android (0.6.0) compiled using an old version of Android NDK - 10e (and SDK Tools 25.2.5). The only build fix needed was to use version 1.1.1 of the pyjnius component. And I did it all on Ubuntu 16.04 LTS running via WSL1! - The tablets in question only have 1 GB of RAM and have laggy performance even after factory reset - would it be even possible to run an additional python-based service on it without things getting killed in the background?
The solution: Already implemented in my original app tool :) - use the debloat feature to disable all unnecessary services/apps and optionally schedule an automatic weekly reboot to keep things stable. The python service is actually quite lightweight and luckily there were no memory leaks. - That left one final detail: how would one access the python service on the device? And how to secure it so only the apartment owner would know the password?
This I explain in the next project log :)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.