![]() Your router’s address is sometimes printed on the bottom of the router, and it begins with either 192.168 or 10. Generally, you access your home router through a web browser. There’s usually a firewall embedded in the router you get from your internet service provider (ISP). Internal IP addresses start with 10 or 192 or 172. To reach your Pi from the outside world, open a port in your network firewall and direct incoming traffic to the IP address of your PI, at port 8000.įirst, get the internal IP address of your Pi: $ ip addr show | grep inet ![]() ![]() You must do this any time you’ve rebooted your Pi. To make your API available to the internet safely, you can use the gunicorn production server, which you installed during the project setup stage. ![]() However, as the output of your test advised, running a Flask app from Flask is meant for development, not for production. To reach it over the internet, however, you must open a port in your firewall and forward incoming traffic to the port made available by Flask. You can interact with your API on your local network. Do not run this in a production environment. * Serving Flask app "PiData" (lazy loading) Run the PiData.py script: $ python PyData.py The psutils Python library is useful for monitoring and profiling, and the Flask-RESTful Flask extension creates a REST API.Īppsmith calls the REST API every few seconds to refresh data automatically, and gets a JSON object in response with all desired stats as shown: You need a way to get this data from your Raspberry Pi (RPi) and into Appsmith. It’s a great choice for your dashboard, and reduces the time and complexity of traditional coding approaches.įor the dashboard in this example, I display usage stats for: AppsmithĪppsmith is an open source, low-code app builder that helps developers build internal apps like dashboards and admin panels easily and quickly. If you’re already using Appsmith, you can also import the sample app directly and get started. In this article, I demonstrate how to quickly building an on-demand monitoring dashboard for your Raspberry Pi so you can see your CPU performance, memory and disk usage in real time, and add more views and actions later as you need them. If you’ve ever wondered about the performance of your Raspberry Pi, then you might need a dashboard for your Pi. ![]()
0 Comments
Leave a Reply. |