## 4 Software
### The App  
An app has been developed to make the hardware functional, which is the so-called \"Digi Gas Gauge\". At the moment, it has only been developed for the Android operating system and allows you to remotely view the percentage of LPG level inside a domestic stationary tank, and displays a battery level icon. For the app to work, the mobile device where it is installed must have an Internet connection, otherwise it will not be possible to consult the data measured by the IoT-GL-Sensor.  
The main instructions for using the \"Digi Gas Gauge\" app are described below.  
(1) The app home screen (see Figure 10a) requests a tank nickname and the registered password to display the percentage of LPG level in the tank. A valid tank nickname and password are required to access the system, so that only registered users can enter.  
(2) When the app is accessed for the first time, the user must create an account. Clicking on \"create account\" will open a new screen (see Figure 10b), which requests access to the precise location where the IoT-GL-Sensor is installed so that the gas company will be able to assign its nearest filling plant to provide the home refilling service. If the necessary permission is not granted, the app cannot be used.  
Figure 9: (a) Wi-Fi settings screen; (b) sensor ID generation.  
It should be noted that the exact location where the IoT-GL-Sensor has been installed is set by the location of the mobile device, so the tank user's mobile device must be very close to the IoT-GL-Sensor to be registered, since these data will be stored in the server warehouse.  
(3) Once the app is allowed to establish the exact location of the mobile device, a registration screen will open (see Figure 10c), where the requested data must be entered to register the IoT-GL-Sensor and have access to the app. It is worth mentioning that all fields  
Figure 10: Mobile application developed for the IoT-GL-Sensor: (**a**) app home screen; (**b**) request for permission to share the location of the mobile device; (**c**) registration screen; (**d**,_e_**) warning messages; (**f**) waiting screen; (**g**) app home screen with valid data; and (**h**) screen with the graph of the percentage of LPG level in the tank and the battery level icon.  
are required, that is, if any of them are missing, then you will not be able to continue with the registration process.  
(4) Validations have been included during registration that allow the user to visually confirm that the data entered are correct. For example, if a user tries to register a sensor ID that is already in use or has not yet been generated, then a warning message will be displayed, as shown in Figure 10d. Likewise, if an invalid phone number or email is entered, warning messages will also be displayed, as shown in Figure 10e. The password must have at least one uppercase letter, one lowercase letter, one number, and a minimum length of eight characters. Otherwise, the application will not allow user registration and will display an error message.  
(5) When all entered data are valid and the \"Register\" button is pressed, a waiting screen is displayed as shown in Figure 10f. Once the IoT-GL-Sensor is registered, the app returns to its home screen.  
(6) By accessing the \"Digi Gas Gauge\" app with a valid tank nickname and password (see Figure 10g), a screen opens showing the percentage of the LPG level in the stationary tank in a graphic and understandable way for the user, as shown in Figure 10h. In addition, this screen displays the battery charge level of the IoT-GL-Sensor.  
In the case of the gas company's web platform, to access the gas level data of each tank, a username and the ID sensor to be displayed are requested.