The frontend is served from the backend, therefore, there is no need to download the frontend files.
Note that the application is running on the wazigate ip address, to access the application you must have your gateway powered.
The application can be accessed from https://wazigate.local:8081
In place of wazigate.local, you can key in the ip address of your gateway followed by the port number the app is running on.
Example http://192.168.0.104:8081
Clone the Majiup repository
git clone https://github.com/Waziup/majiup-backend.git
Navigate into the repository
cd majiup-backend
docker pull waziupiot/majiup:v1.1
Confirm that the image is pulled successfully
docker images
The Majiup image should be among the images
docker-compose up -d
The container is build and run in detached mode
docker ps -a
Confirm the container ID
You can check the container logs by running the following command
sudo docker logs <majiup-container>
The api is served by http://wazigate.local:8081/api/v1/
Open the gateway UI dashboard from http://wazigate.local and navigate to the dashbaord
Create a new device and assign unique adresses to the device.
Make the device LoRAWAN and allocate XLPP for data transmission.
On setting up the device on the gateway. Proceed to setup the hardware and wait for the sensors to be allocated automatically when the hardware on the tank sends data.
Upload this https://github.com/Waziup/majiup-hardware/tree/main/majiup-hardware code to your hardware. Normally, the sensor sends data at inteval of 5 minutes.
Note: Edit the sensor pins defined in the code and the device address as connected to your hardware before uploading.
When done changing the necessary fields, upload your code and set the device ready to make measurements. Turn the device on when you are done mounting to avoid streaming false value. Even though, this has been catered in the code to reject sending outlier values (false data).
After receiving sensor values on the gateway, edit their Kinds respectively
Normall,the sensors will have name like temperature sensor 1,....
Sensor with ID of temperature_sensor_0 is water level sensor -> Assign kind to WaterLevel
Head over to majiup application and set the dimensions and capacity of your tank under settings.
- The base url for the API is
localhost:<PORT>/api/v1/
- Retrieving and posting gateway information
This endpoint takes bothe POST and GET methods
/gateway-profile
- Sending notification
/send-notification
- Retrieving battery info
/tanks/{tankID}/battery-info
- Retrieving analytics from a particular tank
/tanks/{tankID}/analytics
- Listing all tanks connected to the gateway
/tanks
- Retrieving a particular tank by ID
This endpoint takes Get, Delete,
/tanks/{tankID}
- Retrieving all sensors for a specific tank
/tanks/{tankID}/tank-sensors
- Retrieving all pumps connected to a specific tank of the given id
/tanks/{tankID}/pumps
- Changing/updating tank name
/tanks/{tankID}/name
- Obtaining meta infor for a given tank
This endpoint takes Post and Get method
/tanks/{tankID}/profile
- Retrieving water levels from a tank
NB: Kind should be set to WaterLevel
/tanks/{tankID}/tank-sensors/waterlevel
-> Water Level Sensor information/tanks/{tankID}/tank-sensors/waterlevel/value
-> Current value for the water level sensor/tanks/{tankID}/tank-sensors/waterlevel/values
-> List of water level values
- Retrieving the pump state from a given device
NB: Kind should be set to Motor
/tanks/{tankID}/pumps/state
-> Shows the recent value/tanks/{tankID}/pumps/states
-> Includes historical values
- Perform an actuation
- One can send a 1 or a 0
/tanks/{tankID}/pumps/state