Smart Poi

Google Play Store Says NO!

Google Play Store is the portal through which all successful Android Apps have to travel, in order to reach their audience. The last two Apps I tried to upload there were refused, one on the valid grounds of being just a web view. The other, most recently was mistaken by what I can only imagine is an AI to be an Augmented Reality App.

Here is the offending app. Apparently I need to notify people about the confusion that augmented reality can cause. Is this Augmented Reality?

Well try the app out for yourself and see: https://circusscientist.com/SwipeCard.apk

I have changed the age limit to over 18, hopefully this will get my app accepted. Otherwise the only recourse is sending an email to request a review (probably from a bot)

How To Fix the dreaded “Error Establishing A Database Connection” In WordPress

This is just a quick post to note what worked for me. I found loads of tutorials online but none of them had the full story.

Essentially I had to change my database password. Here is what I did:

Assuming you have ssh access to your DigitalOcean Ubuntu droplet:

Fictional Database Name: wordpressDB

Fictional WordPress User Name: wpUser

Fictional Password: 12345

Open your wordpress wp-config.php (usually located at /var/www/html) and change the password, and make a note of the database name and user.

nano /var/www/html/wp-config.php

define( 'DB_PASSWORD', '12345' );

Now change the mySql database details:

mysql -u root -p

use wordpressDB;

UPDATE wp_users SET user_pass = MD5('12345') WHERE ID=1 LIMIT 1;

grant all on wordpressDB.* to 'wpUser'@'localhost' identified by '12345';

flush privileges;

exit;

Conclusion

Anyway that’s what worked for me, hope it helps someone at some point (probably me, in the future). Generally WordPress is pretty stable, this is the first time I encountered this problem.

Legal Animation

A friend who is a graphic artist contacted me, he has a client who is looking for some complex animation of legal transaction history, to illustrate corrupt dealings I imagine.

Anyway, here is the work I’ve done so far.

Hypothetical scenario: There are some terrible things going on at Google, FaceBook and Monsanto. Not to mention the USA, what are they doing with their finances? Check out the attached video to find out!

Corrupt Companies and dodgy dealings

Think I am going to get the gig? At this point I am enjoying creating this program enough not to care.

For those who are interested, the data comes from .csv files – transactions and accounts. Also there are different types of transactions, indicated by a different coloured line. Still a lot to do, but I’m quite proud of this one.

FaceBook is killing me

Here is a tip guys, don’t rely on those big third party services for your livelihood. Due to circumstances beyond my control (coronavirus) my family business has been forced to sink or swim online. We have been doing a ton of marketing, on FaceBook, Instagram, YouTube and the like. Now some bot at FB has flagged my company for “Unusual Activity” and removed my page and also suspended my account.

I’m pretty sure that asking for donations from our followers was the root cause of all this. Whether or not we get back online doesn’t matter, the damage is done. All the links that bounce will reduce our potential to survive the financial squeeze.

All because we used a big, free service, and thought that it was “ours”

Well that is a lesson I won’t need to learn twice. Or at least three times, having already been burned by Google constantly shutting down or ‘upgrading’ services.

UPDATE: Facebook re-instated my account and our business page, no reason given. We removed the reference to paypal payment link, for video show bookings, maybe that was what it was?

Making a Living during the Coronavirus Outbreak, part 2

A CLOWN’S QUEST TO SURVIVE LOCKDOWN

In case you missed the last post, the Corvid-19 epidemic has reduced my income to zero. This is what I am doing to survive.

My best show, now on your TV

The Problem:

My wife and business partner came up with the idea, and did a whole load of FaceBook, Instagram and email marketing, so all of a sudden we had bookings, quite a lot of them. Right now I still have to do 4 more personalised kids show video’s by the end of tomorrow.

This is great, they are only R200 each, about $11 US, but everything counts at the moment. The problem is that each video is 30 minutes long, and on my dual core celeron laptop that equates to 3 hours of rendering each if you want HD.

Get the gig first, now learn how to do it!

So I have google. I have used Kdenlive before which amazingly turns out to be a front end to a command line video editor, “melt“, who knew!

My plan (now working) was this:

  1. Render all the non-changing parts of the video (using a script – you can generate melt .mlt render files for pieces of a project inside Kdenlive and que them with bash)
  2. Script the rendering of personalised voice-over parts of the video
  3. Script the audio from the left stereo channel voice recordings over to being on both sides (why did Kdenlive do this to me?!)
  4. Script all the different pieces getting put back together (1GB file in 15 pieces takes 10 minutes, using ffmpeg)
  5. I used YouTube to help me reduce the quality (for someone who didn’t have bandwidth for 1.2GB download), uploaded to YouTube Studio and set the video to unpublished. Then downloaded lower quality again with youtube-dl, share using Google Drive.

It works, more please!

Now each new video takes about 20 minutes to do, instead of 3-4 hours previously. I am hoping to streamline this even more. I guess if I really needed to I could cobble together a system where all I have to do is say the recipient’s name and their video is generated automatically. Of course that would defeat the purpose of a “personal” video. I really do like to feel like I am giving attention to each order.

Why not order your own video for the kids? Email info@bigtop.co.za to book your personalised show!

*Update: our President just announced an extra two weeks of lockdown for everyone.

Making a living during the Corona virus outbreak..

My whole country is in lockdown right now. As a professional circus performer I am particularly affected by the order to stay at home…

As of writing this post, my last paying function, a small birthday party show, was a week and a half ago. I initially started uploading some crazy stuff to YouTube in the hopes that somebody might notice and donate to my family:

Then my wife had a great idea, why not offer an online show. Skype or Whatsapp video is a bit unreliable, so we came up with the idea of a custom, personalised video for parties, available as an mp4 download. Here is the trailer for our offering:

We have already received some enquiries about this video, here’s hoping enough people want one to make a difference to our financial situation here. I am charging $11 (US) for the full 20-25 min custom show video which will be available as a private download from my server (DigitalOcean of course)

If you are interested in booking the show, please check out https://bigtop.co.za for more details.

Finally, I uploaded an entire show I did for an audience of one (my son) last week. For all the kids who are bored at home:

I am going to continue making video’s and practising for the duration of the lockdown here, as well as working on my new CoronavirusSA tracking android app and other projects.

What are you doing to keep busy in these trying times?

tomjuggler at gmail dot com to get in touch

Remember, stay safe and wash hands people!

postmarketOS first look

At home we have a bunch of old Android devices and laptops. The laptops all have some version of Linux running on them by now, but so far I have only had limited use for the oldest Android devices. I have an old S3 mini for example which has a great screen, but unfortunately LineageOS (the Android Upgrade) latest version available is Nougat, and that runs rather slowly. Besides, I already have two Android devices working with later versions.

PostmarketOS is a fairly new project with the goal of porting Alpine Linux (really small) with mainline kernel to ALL Android devices. Also you can run all types of UI on top of postmarketOS for example Plasma Mobile. I just wanted to see if I could have a device with WiFi which I could use to run some Bash scripts, c programs and possibly Python.

Here is how it works:

  1. You need a computer running linux – install the pmbootstrap program
  2. put phone into fastboot mode – making sure to follow instructions on postmarketOS wiki – S3 mini page was here
  3. after following the install guide (really comprehensive and simple), and choosing the kernel (mainline or the old one from Android), the Desktop (mate, xfce, plasma mobile, and many more), just run the install scripts
  4. ssh into phone via usb (or just use the phone touch screen)
  5. to install any program (from alpine linux) type apk add <program>
  6. a good one to have is corekeyboard (onscreen keyboard for phone)

So here it is then: Mate desktop running on postmarketOS in my S3 mini. (not mainline kernel though):

This is my phone screen now. The menu works and everything! (date and time no)

So far I have not been able to get WiFi working, or Bluetooth, however there is an option to share the laptop internet via USB, so I can still install programs. I installed gcc and compiled and ran a c program, and of course a shell script. This is really a great project and worth checking out if you have an old phone or two lying around.

Monkey Detector Circuit and App

It’s been a while since I was so excited about a project. After much struggle (to do with a very hot voltage regulator) I have come up with a working circuit for the hosepipe tap trigger.

I was hoping to power the whole thing from 12 volts but the voltage regulator was getting a bit hot, and my main directive for this whole project is to not spend any money (otherwise I would have a relay shield like this one instead of the bare 5v relay which I had to trigger with a transistor)…

The other exciting thing was the Android app. I decided to create a stand-alone app which recognizes monkeys to put on the play store. Right now it plays a loud siren sound when a monkey – or baboon – is detected. I can’t even count how many times it would have been useful to have a simple alert which would warn me about vervets attempting to break in on the other side of the house.

Don’t get me wrong, I love the monkeys. They are really interesting to watch, their kids play in our yard, they do tight-rope on the telephone wires, and the troupes have all-out warfare sometimes on the road. The other day we found out that our neighbor’s dog has a pact with the monkeys: they open the bin for him and he helps them eat the contents. Just some monkeys and a dog getting along just fine!

So the Android app is pending review, it’s called Monkey Detector, I will add a link to it when available. My third play store app!

Update: Monkey Detector on Google Play Store – unfortunately some devices are having a problem where the app isn’t playing the alert sound. I am looking into this (it works on my phone…)

Monkey Detector – image for app icon

Mobile Monkey Detector

It’s amazing how machine learning has improved over the last few years. I was dabbling with TensorFlow for a while, then moved on to look at pyCharm, but ultimately I was going to go with the easy-to-use Google image recognition API for the mobile version of my monkey detector.

Then a few days ago I stumbled upon fritz.ai and their even easier-to-use pre-trained mobile classifier. Unfortunately the example was written in Kotlin, but anyone developing an Android app today should know that, so I gave it a go. Here is the tutorial on Medium (with link to Kotlin code on GitHub) https://heartbeat.fritz.ai/image-labeling-on-android-in-kotlin-using-fritz-ai-and-camerax-1466089b2e34

The current version of the app (detects monkeys but doesn’t send a signal to my WiFi connected sprinkler system yet) is here: circusscientist.com/seeMonkey.apk – now available on the Google Play Store!
In order to use it you need to give camera permissions before first run, otherwise the app will force close. Just point it at a monkey and get alerted* (pictures of monkeys work fine)

*If you are wondering what happens, my 6 year old son shouts “Hey you, get away from my lunch!” when a monkey is detected.

The next step is to adapt my Arduino controlled tap valve (more on this to come soon) to receive WiFi (using ESP8266 of course) and then send the signal from the app (in Kotlin…!)

I can’t wait to make the demo video, those monkeys are trying to get into the bin (and our house) every day, and they hate getting squirted.

SmartPoi Code Dump!

2020 is the future! In the future I want to have many projects complete and be working on something new. So here is the everything I have been working on for the past few years, all in one go. Is this complete? You tell me!

I have uploaded the code to github, and some programs to my site, all is explained, although possibly in a rather rushed way.

Significant things which I have finally open-sourced (as promised) are the Android App (for streaming images and patterns to the poi), the full firmware for ESP8266, the circuit and PCB I used, CAD files for 3d printing and more.

Still to come is the code for uploading the backup images to the poi (an old windows .exe is available for now).

To read about how all of these programs work together check out the SmartPoi menu option above, which include the following 3 new pages:

  1. https://www.circusscientist.com/smart-poi-android-app/
    – description and code for android controller app
  2. https://www.circusscientist.com/smartpoi-full-circuit/
    – PCB, breadboard, parts and CAD files to make the hardware
  3. https://www.circusscientist.com/smartpoi-firmware/
    – ESP8266 code and description

If anyone is interested in making their own streaming poi all of the parts are linked.

Affiliate links are included on this website. Please support my future projects! Another way to support my work, and help yourself to free stuff at the same time, is to check out DigitalOcean with their promotional 2 months free hosting. If you haven’t yet heard of them, they are the best and cheapest virtual server on the market right now, use the link!

If you are trying to make the poi please consider signing up to the mailing list, I am emailing updates to quite a few interested parties right now. No spam, just updates. In the last two years there have been only four emails, so not a whole lot…

UPDATES:

Sign up for our update alerts: