.
OverviewThru continuous monitoring and analytics, patients will be informed of potential risks of illness so that preventive measures can be taken.
I will build a dashboard which logs and monitoring incoming data from medical devices. Those data will be inputed to a AI model to do prediction of illness.
The solution will use the IoT dev kit to send data to a back-end where AI model will do prediction using the data. Any illness alerts will be highlighted in the dashboard and patients will be notified of such alerts.
My original design was to use the pulse sensor and DM990013 - CEC1x02 Development Board. But I have problem getting the required debugger/tools for the development with the CEC1702 Development Board. Instead I decided to use the MKR1000 which is based on the SAMW25 Wi-Fi SOC and a temperature sensor for the simulation.
.
.
.
Technology StackThe following image show the technology stack used and how the components work and exchange data.
.
Setup Grafana and InfluxDBI am using the stack of Telegraf, InfluxDB and Grafana to make the Dashboard. The Grafana and InfluxDB instance runs in a Docker container. There are lots of tutorial of how to setup this infrastructure. Here is the docker-compose.yml
:
version: "2"
services:
grafana:
image: grafana/grafana
container_name: grafana
restart: always
ports:
- 3000:3000
networks:
- monitoring
volumes:
- grafana-volume:/var/lib/grafana
influxdb:
image: influxdb
container_name: influxdb
restart: always
ports:
- 8086:8086
networks:
- monitoring
volumes:
- influxdb-volume:/var/lib/influxdb
networks:
monitoring:
volumes:
grafana-volume:
external: true
influxdb-volume:
external: true
.
Create docker network and volumes:
sudo docker network create monitoring
sudo docker volume create grafana-volume
sudo docker volume create influxdb-volume
.
Create database and user:
sudo docker run --rm \
-e INFLUXDB_DB=telegraf -e INFLUXDB_ADMIN_ENABLED=true \
-e INFLUXDB_ADMIN_USER=admin \
-e INFLUXDB_ADMIN_PASSWORD=supersecretpassword \
-e INFLUXDB_USER=telegraf -e INFLUXDB_USER_PASSWORD=secretpassword \
-v influxdb-volume:/var/lib/influxdb \
influxdb /init-influxdb.sh
.
Use the following command to start the containers:
sudo docker-compose up -d
.
Visit the server_ip:3000 Url to create a database source and build or import a dashboard:
.
.
.
Install TelegrafFollow this document to install the Telegraf.
.
Setup MQTTSetup and run a MQTT server in a Docker container:
sudo docker run -it -p 1883:1883 -p 9001:9001 -d eclipse-mosquitto
.
Health Monitor Dashboard.
ConclusionThe project is partially complete. I just manage to make the ingestion of data to MQTT server work. An AI model yet to be added to do the illness prediction.
.
Comments