AmbiBox IOS Remote Control App
With this iOS app you can control your AmbiBox from your iPhone or iPad. I am going to talk about the app and how it communicates with the AmbiBox server, if you want to know how to install AmbiBox and the led strips, there are several tutorials in Instructables.
Here you can watch a video with the result and a more graphical demonstration of how the app works.
With the latest version, you can create your own static and dynamic backgrounds, select profiles and also turn on/off the led strip.
More information here.
Enable AmbiBox TCP API
First of all, you need to be sure that the AmbiBox has the API enabled so the app can communicate with it.
Now you can open a TCP communication with that IP and port. Before you do it with the app you can try with your computer, with Mac you can execute in terminal nc your_ip your_port and if you are in Windows you can use telnet your_ip your_port (telnet is not activated by default in Windows, there are several tutorials that show how to do it).
Here you have the API Documentation, where you can see all the commands available to communicate with the AmbiBox server.
******* The setbrightness command doesn't work for me.
Start the App and Connect to the API
Create Backgrounds
From the initial menu you can select My backgrounds or Dynamic backgrounds.
If you choose the first option you will create and save a static background, it can have one or multiple colours. Actually, you can set the colour of every led individually.
See video in 00:15.
If you choose the second option you will create and save a dynamic background. In the top bar of the screen you'll see a REC button, so you can record sequences of backgrounds and the will play in loop.
To know how to set a dynamic background, check the video in 03:23 and 06:21.
Set a Profile
Depending on the film or video we are watching, maybe we want to capture colours from different parts of the screen, to avoid black bars in the sides or top/bottom of the screen that will set our leds colour to black.
To solve this, we can create different profiles in AmbiBox and select them from My Profiles option of the the home menu.
See the video in 04:57.
******* If you have a profile with colon characters in its name, the profiles functionality of the app will not work due to a bug. It will be fixed in future versions.
Considerations
Due to iOS limitations, when the app goes to background (when we press Home button or we lock the device, for instance) the communication with the AmbiBox server lasts about three minutes, after that the TCP sockets will be closed in order to save battery.
This is a problem because we need a constant connection to maintain our backgrounds playing, so after 2 minutes in background a notification will pop up to inform about this fact.
The best solution found to respect battery life, is to turn black the screen and set the minimum brightness when the app is playing a background or a profile, without sending it to the background. This happens automatically after five seconds of inactivity and the screen will turn on again when you touch it.