The Android App is available on the Google Play Store:
https://play.google.com/store/apps/details?id=de.cubeworksgmbh.android.piconfigurator
Install the following dependencied on your Raspberry Pi
sudo apt-get install pi-bluetooth
sudo apt-get install bluetooth bluez
sudo apt-get install bluez python-bluez
sudo python server.py
There are basically two important command to handle from the server:
get
save [...]
Commands are seperated by a new line ('\n').
The server should allways respond to these commands with
values [...]
All values provided by the values
response will be showed to the user.
Values are JSON encoded objects containing the following keys
- label (only required field): Text to show
- value: current value of the text input field (default: "")
- unit: Text to show behind value field (default: "")
- type: "text", "label", "error", "success", "readonly" (defult: "text")
- App -> Pi:
get
- Pi -> App:
values [{"label": "Value 1", "value": "42", "unit": "x"},{"label": "Value 2", "value": "23", "unit": "y"}]
- App -> Pi:
save [{"label": "Value 1", "value": "1", "unit": "x"},{"label": "Value 2", "value": "2", "unit": "y"}]
- Pi -> App:
values [{"label": "All values saved!", "type": "success"}]