Apr-16-2018, 01:57 PM
Hello there
So this is my first thread
I'm currently making a interface for managing our building. The scope of this project is getting a smarter building. My code is basically ready but there's always room for improvement. Never be satisfied
These are the tasks i'm currently running:
I'm not really satisfied of the project right now because I have 2 running back-ends. I have 1 back-end in NodeJS for communicating between my UI (written in Angular5) and DB which serves for getting data and communicating to the webrelais (CORS and security), and I have 1 for saving data to the DB in Python.
The problem is that when I decide I want to remotely override the python webrelais decision with the UI, i really can't do it without using the database as kind of "broker". I don't think this is the best way to do this.
So what I'm basically searching for is a python framework or solution, which allows me to run recurring background tasks (multiple at once) and serving an API at the same time in 1 script.
If my question wasn't clear or you need more info just ask me
I'm sorry if my English is kinda hairy
Thanks in advance!
So this is my first thread
![Smile Smile](https://python-forum.io/images/smilies/smile.png)
I'm currently making a interface for managing our building. The scope of this project is getting a smarter building. My code is basically ready but there's always room for improvement. Never be satisfied
![Big Grin Big Grin](https://python-forum.io/images/smilies/biggrin.png)
These are the tasks i'm currently running:
- Getting temperature and setpoint data from about 50 rooms [every 5 minutes] ==> database
- Decide whether the building needs to be cooled or heated based on my own algorithm (looks more complicated then it is) and change a webrelay based on this decision [every 15 minutes]
- Getting flowmeter data because the building gets it's heat throug series of heatpumps with ground water [every 1 minute]
- Sending a monthly report for deciding whether a maintenance is nescessary on the ground water pumps [every 1st of the month]
- In case of errors or warnings on the flowmeter ==> email [every 5 minutes]
I'm not really satisfied of the project right now because I have 2 running back-ends. I have 1 back-end in NodeJS for communicating between my UI (written in Angular5) and DB which serves for getting data and communicating to the webrelais (CORS and security), and I have 1 for saving data to the DB in Python.
The problem is that when I decide I want to remotely override the python webrelais decision with the UI, i really can't do it without using the database as kind of "broker". I don't think this is the best way to do this.
So what I'm basically searching for is a python framework or solution, which allows me to run recurring background tasks (multiple at once) and serving an API at the same time in 1 script.
If my question wasn't clear or you need more info just ask me
![Big Grin Big Grin](https://python-forum.io/images/smilies/biggrin.png)
I'm sorry if my English is kinda hairy
Thanks in advance!