Profilo di bossmaple

Nome bossmaple
Indirizzo email n/a
Messaggi2
  • Re: WEBCAM visionabile da web
    Forum >> Programmazione Python >> Web e Reti
    To view your USB webcam feed outside your home Wi-Fi network, you'll need to make the feed accessible on the internet. Here's a summarized plan:

    1. Set Up Motion with Flask for Web Access

    Use the Motion package to stream your webcam feed locally (as you've already done).
    Create a Python Flask app that serves the Motion feed.

    2. Expose Your Local Server to the Internet

    Use a tool like ngrok to expose your local server to the internet securely.

    Install ngrok: pip install pyngrok.
    Expose your Motion feed running on port 8081:
    from pyngrok import ngrok
    public_url = ngrok.connect(8081)
    print("Public URL:", public_url)





    3. Forward Port via Router (Optional)

    If you want direct access (without ngrok), configure port forwarding on your router for port 8081to your local IP.
    Be cautious of security risks and set up authentication (eg, HTTP Basic Auth).

    4. Simple Python Surveillance App Example
    from flask import Flask, Response

    app = Flask(__name__)

    @app.route('/')
    def webcam_feed():
    return Response(
    "Streaming Motion Feed from localhost:8081",
    headers={"Refresh": "0.1; url=http://localhost:8081"}
    )

    if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)


    Run the Flask app, then expose it using ngrok or your router.


    Hope my sharing is useful with you.
  • Re: Creazione ricezione telefonate in rete
    Forum >> Programmazione Python >> Web e Reti
    To manage phone requests across 10-12 networked computers, you can use a centralized SQLite database accessed via a lightweight Python Flask API hosted on one machine. Each computer runs a small client app (eg, Tkinter or a web-based UI) to interact with the database in real time.
    Google