This might be a simple architecture question but I can't figure it out.
What I have:
Basically I have two apps running locally on my Raspberry pi:
- One C++ app (Voicecommand) that allows me to execute commands from my microphone and run various python scripts. On certain keywords, I can run a python script to open the browser or do anything.
- One simple Flask app, with a couple of basic views
What I want:
When I say a keyword (e.g. weather), I want my local Flask app to return the weather (already have the function and view for this), ideally in small frame without reloading the whole page.
What I thought about:
I thought about having my local app making JS calls within the browser but couldn't really figure out how. Best thing I could think of was an equivalent of Applescript to inject the JS call in the browser... From then, I could easily make an ajax call to my weather view and return the result without refreshing the page. I also thought about using something like React or Angular, or connecting the two apps but I'm not 100% sure on how.