Suitable Nebula devices can be any of the following:
- Any device with an OS that can run Java. This includes Linux, Windows, Mac, desktop, laptop and local or cloud servers. Single Board Computers (SBC) like Raspberry Pi and Beagleboard are ideal.
- Any phone, tablet or wearable that runs Android version 4.4.2 or higher.
- Any WiFi capable device that can be programmed on the Arduino IDE including the popular ESP series of WiFi/BT modules and Arduino compatible SBCs.
- Sorry not iPhone yet.
Device Class Elements
All elements are String and have associated getter and setter methods.
Developer Device Considerations
- Nebula maintains up to 65,535 devices based on device IDs. Galixsys Andromeda extends that to billions with an extended ID. Careful consideration of network configuration and device lookup is important for commercial users that want to control/monitor a large number of devices. Contact Galixsys Networks for advice on very large networks, you’ll save considerable time and aggravation.
- Device 1 is special. Review the special considerations here .
- Device information and current status is collected and maintained by Nebula. A user provides a name for the device which is really only used for convenient identification and Log purpose.
- Memory requirements - A device occupies between 65 and 200 bytes depending primarily on its name and whether it’s mobile with a long email address. VPN devices are all held in a file and, for APK and JAR, assembled as objects into RAM during Startup . Be especially watchful of BIN devices with limited memory. There are device configuration settings under Tools in the Arduino IDE. User code can be implemented to further reduce what Nebula saves regarding its devices. Generally less than 100 devices on a VPN will not have a memory issue.
Removing Devices from VPN
- Nebula has a native command Remove which will:
- Remove the device from all other devices on the VPN.
- Cause the removed device to delete its Nebula files making it a new device that must be reinstalled.
- Add the removed device’s ID back to the pool of available IDs.
- Leaves the Nebula application intact on the removed device.
- You cannot remove Device 1 with the Remove command.
Besides the Remove command you can use one of the following methods. Doing this will leave a “zombie” device on the other VPN devices. The “zombie” device can still be deleted from the VPN using the Remove command from any APK or JAR device still connected to the VPN.
- For JAR devices you can delete the ~/Nebula directory of the device. When Nebula is restarted it will come up as a new device to be installed.
- For APK devices you can uninstall the Nebula app using the device’s Application Manager then reinstall it using the IDE.
- For BIN devices holding pin [D9(Arduino) GPIO-3(ESP module) RX(pin label)] LOW, then power or reset the module. Hold the pin LOW until Yellow On. This causes Nebula to format the SPIFFS memory and removes the device. If the pin is still LOW after the format completes then the WiFi settings are removed too. There is also an Erase Flash setting under Tools of the IDE. The default is “Only Sketch” but you can select “All Flash Contents” to remove the Nebula files. After removal you will have to Install the module.
Adding or Removing Device Elements
There may be an instance where you want to add a new element to the Device class. Adding or removing an element effects several methods within Nebula. How you use the new element is up to you but the following will show where it MUST be added to work in the Nebula environment as supplied by Galixsys Networks.
THE ELEMENT MUST BE ADDED TO ANDROID, JAVA AND ARDUINO