For phase II of the project (late April) we need to discuss how to deploy new access boxes.
What the user experience should look like for MakerSphere staff:
This must be accomplished by non-technical staff.
Open Nexudus and pick the machine that will receive the new access box.
Look at the machine's properties (on Nexudus) to see what kind of relay it needs (e.g. amperage and voltage).
Select a prebuilt access box with an appropriate relay, or have a technical person build one for you.
Open the access box.
Connect the Arduino unit to the computer (the regular staff computer) with a USB cable.
Copy the machine's unique id that is in its properties on Nexudus.
Open the deployment wizard. (***)
Paste the machine's unique id. Click to start deployment process.
Deployment wizard writes the necessary UniqueMachineId.h file for the Arduino code, compiles the Arduino code, and uploads the bytecode to the Arduino unit.
Deployment wizard reports the result of the deployment to the user (success or error).
Requirements for the Deployment Wizard:
Ask for the unique machine id.
Write the UniqueMachineId.h file.
Run the Arduino compiler.
Run the Arduino deployment executable.
Display a status message to the user.
Options for implementing Deployment Wizard:
Run a local Python server on the staff computer.
Pros:
It's Python so it will run on any operating system (Windows, MacOS, Linux, etc.).
We can put a link in Nexudus to the URL "localhost" so users don't have to leave Nexudus to activate it.
We might be able to put a link within Nexudus that sends the unique machine id automatically inside an HTTP GET request.
The server would just run on localhost and not interact with other servers. Doesn't even need internet access.
It can run local executables.
Cons:
Staff computer required to have Python installed.
Must keep documentation on how to autostart the server for a few different operating systems. We can probably ask IT to update the scripts and instructions but we should write the first ones.
Requires 3rd party libraries which may "need" updating or become incompatible because of an update.
Program written in C++ run on the staff computer.
Pros:
Being in C++ it can be compiled for any system (Windows, MacOS, Linux, etc.).
It is likely to be easily supported since there is a lot of support for C++ on the internet.
Staff can easily run the program since it (or its icon) can live on the desktop.
Does not depend on 3rd party libraries, which may need updating or getting ruined by an update.
Runs locally on the computer and does not rely on internet technology.
Cons:
Must be compiled. This means installing a compiler on the staff computer, which is not ideal.
Can't be linked to directly from Nexudus.
Separate Raspberry Pi running a Python server.
Pros:
Doesn't matter which OS the staff computer is running.
We can put a link in Nexudus to a specific IP address (local router only) so users don't have to leave Nexudus to activate it.
We might be able to put a link within Nexudus that sends the unique machine id automatically inside an HTTP GET request.
The server would not interact with other servers. Doesn't even need internet access.
It can run local executables.
Theoretically can stay powered on indefinitely.
Cons:
Requires a separate machine with a separate OS that staff will not be able to support.
Raspberry Pi requires proper shut down for integrity of memory / hard drive. Does not like sudden power outages.
Relies on network connectivity would be more easily implemented as option #1.
Connecting Raspberry Pi directly to staff computer.
Cons:
While this addresses some of the cons of option #3 it is simply a complicated combination of options #2 and #3.