Need advice on raspberry Pi remote management application

Ok well as the title states I need some advice for a new project I am developing.

I am building a new product for our company that will be embedded into our product using raspberry pi. I have a working application already programmed for the raspberry pi using a python/flask/html/css environment and I am thinking of programming a command/control app that the user can install on a pc or phone.

Overview of what I have / what I am building / trying to build.

I am building a kiosk control device with a touch screen, that controls 16 relays, which are connected to 8 LED devices.

The control device pi/app has a timer to allow for stop/start functionality. It also has controls to set the individual relays to achieve the desired led setting. The program initially loads the relays to display the LED in the "OFF" state. When the timer is clicked on the relays initiate into the desired LED setting. When the timer ends the LEDs go back into the "OFF" state.

I can currently achieve this using a flask web app to control the states of the relays and store variables such as the current time, timer running/stop status, and the setting of each LED device.

I can control the device remotely and read its current state simply by loading the IP address of the pi from another computer on the network. But the start/stop functionality will not stop the timer on the device if I press Start/Stop on the computer as the timer is coded to work in javascript. I cannot simply refresh the page on an interval because it is clunky and does not work well. (trying to fix this through API calls)

I am trying to create a control app from a computer and/or web interface that will see the number of devices on the network/ones already connected to the internet. That has the ability to see the current state of those devices and have control of those devices as well as alert the attendant that a timer is running low.

I also want the ability to control these devices from anywhere in the world/track their usage and update the app hosted on them.

The individual control device needs to still function as it is currently coded if not connected to the internet.

I am going to be integrating this device with an API from a third-party web app to set the current "preferred settings" for the LED devices when a customer is scheduled to have their session.

I understand I can achieve this using API calls but I am unsure what is the best way of building the architecture so that I don't end up having to recode something/everything just because simple functionality won't work right.

What I need some advice on is: Should I program a python app to be used on the raspberry pi and design the interface in PyQt designer, or should I stick with my current html/css/js version?

Would it be easier to code the functionality of updating the app ie pushing a new release of the software on intervals in a pure python only app or should I just run a cron Job to check for updates every 24 hours and update the program on the PI, or should I release a custom distro or package that will automatically update by running the check/update command on turning on the device / opening the app?

Should I program a Web interface to control the functionality of the raspberry pi remotely using purely API calls (and if so what should I program the PI in HTML or a python app) or should I create a desktop version and web interface to cut down on the server/network traffic? (mind you we are going to have 1000's of these devices making requests and saving data/current states of the timers/timer times)

My current thought process of how this needs to be coded is as follows. Raspberry PI - has program running sends an API call every second the timer is running sending the current time state of the timer and the current led device settings to the server/app running on the raspberry pi, and send a duplicate API call to an external server (our company server).

In addition to this, I would like to push commands to the raspberry pi to update its state or create a listener to loop at one-second intervals to check the current status of the server variable/database value and reload the page if changed.

How would I set up a "push" call to the raspberry pi? Do I instruct the server hosted on the pi to listen to any open api calls from the company webserver?

Web Application on a computer - Retrieves the current state of timer, time and led device settings from our company servers and provides functionality using api calls. Also alerts the attendant/user when the timer is about to run out to deal with the client.

or and in addition to a web application.

Desktop app - looks for current Rpi's on network hosts an iframe of the Pis index.html allows for control etc or pulls an api call from the pis database stored values and presents them in the desktop app.

I am really looking for best practices / what is the best method of doing this.

I have HTML css javascript PHP background but can easily pick up python or any other coding platform just need some advice on this project is all thanks for all your help!

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum