By the time I asked in webdev related subs, I’ve been making an IoT app with my friend who handles computer vision (mostly object detection).
So basically I’ve made an app with Flask framework + MQTT for sensor/actuator transmission and then displays their statuses in a dashboard such as person count, temperature, and power management. For features, it can do automatic (from sensors) and manual (from web input) response for actuators which has to be signed in to do full control. The sensor values will be displayed in graphs which require database.
For display, I think this will illustrate my simulation:
I’m learning graphs, but I haven’t display here yet. Those features are in full control as i logged in
A couple of questions I want to ask and say, i think mostly from data storage and display stuffs:
For sensor data. It should be stored on database. SQL should be enough for this, but i believe realtime DBMS should be ideal (and stored in a cloud service instead locally), doesn’t it?. I think I need explanation for database stuffs. Currently I’m still learning with flat csv
For account management. With sensors already in database, should account management merged with sensor data? I assume sensors use RT-DBMS whereas account can simply use SQL
Is CORS a must for web app, or otherwise? I have issues when calling local files (i still use csv) until i use CORS.
Are there tool recommendations for calling the database (csv or dbms) where i can display later on to the graph?
(later implementation) what kind of security to use to deal with those data?
(later implementation) If I want to deploy in production, let’s say in heroku, what are best practices for deployment stuffs?
I think making an IoT app should be light data usage, shouldn’t it, if mobile is a concern? This leads me to pick how to display sensors in a graph. I’m currently use plotly (~2 MB? i forgot) but that library size is big. I saw amcharts too but the size is even worse (~7 MB). My wanted high end feature will be adjustable date range to see data in a period of time. Other solutions i searched are using lightweight chart library like chart.js or c3.js added with separate date range picker. Currently data usage isn’t on the concern as my app develops until time i actually completed the feature
I’d welcome for general suggestions for making basic IoT web apps, UI stuffs are welcome too (Bootstrap at least works for now, no plans to change though).