MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Profile switcher and adafruit fingerprint

    Scheduled Pinned Locked Moved Solved Requests
    7 Posts 2 Posters 2.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      jmalco
      last edited by

      Gracias por la respuesta, lo probaré y comentaré el resultado.

      Thanks for the reply, I’ll try it and comment on the result

      1 Reply Last reply Reply Quote 0
      • J Offline
        jmalco
        last edited by

        Buenas tardes:
        He estado probando con MMM-remote-control y no hay manera, no sé como hacer que simplemente muestre una alerta desde my módulo python. Os pongo lo que envío:
        headers={“Content-Type”:“application/json”}
        payload = {
        “action” : “SHOW_ALERT”,
        “message” : “adios”,
        “timer” : 4,
        “title” : “hola”,
        “type” : “alert”
        }
        r = requests.get(“http://localhost:8080”,data=json.dumps(payload), headers=headers)
        y recobo una respuesta 200 http pero no muestra nada en el espejo.
        Tampoco he sabido encontrar cómo llegan o dónde llega la notificacion.
        ¿Como debo actuar? ¿Que hago mal?

        Saludos

        Good afternoon:
        I have been testing with MMM-remote-control and there is no way, I do not know how to make it simply show an alert from my python module. I put what I send:
        headers = {“Content-Type”: “application / json”}
        payload = {
        “action”: “SHOW_ALERT”,
        “message”: “goodbye”,
        “timer”: 4,
        “title”: “hello”,
        “type”: “alert”
        }
        r = requests.get (“http: // localhost: 8080”, data = json.dumps (payload), headers = headers)
        and I pick up an answer 200 http but it shows nothing in the mirror.
        Neither have I been able to find how they arrive or where the notification arrives.
        How should I act? What do I do wrong?

        regards

        1 Reply Last reply Reply Quote 0
        • J Offline
          jmalco
          last edited by

          Buenos días:
          De momento he conseguido poder mostrar alertas a traves de curl, reinstalando todo desde cero e instalando primero mmm_api y despues mmm_remote_control, ahora la duda la tengo con la forma de enviar mediante peticiones get o post desde requests en python. ¿Alguna sugerencia o ejemplo?
          Gracias por adelantado

          Good Morning:
          At the moment I have managed to show alerts through curl, reinstalling everything from scratch and installing first mmm_api and then mmm_remote_control, now I have the question with the way to send via get or post requests from requests in python. Any suggestions or examples?
          Thanks in advance

          ? 1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User @jmalco
            last edited by A Former User

            @jmalco

            import requests
            response = requests.get('http://localhost:8080/endpoint')
            print response.status_code
            
            1 Reply Last reply Reply Quote 0
            • J Offline
              jmalco
              last edited by

              Bueno, volvemos al tema:
              Ahora estoy probando con el modulo MMM-Page-Selector, y no tengo nada claro como debo mandar la petición request.
              La que mando es:
              r = requests.get(“http://192.168.xx.xx:8080/api/modules/MMM-Page-Selector?PAGE_SELECT=xxxxxx”
              A lo que se me responde un http 400 (¿bad request?)
              ¿En que me equivoco?

              Saludos y gracias por adelantado

              Well, we return to the topic:
              Now I’m testing with the MMM-Page-Selector module, and I’m not sure how to send the request request.
              The one I command is:
              r = requests.get (“http: //192.168.xx.xx: 8080 / api / modules / MMM-Page-Selector? PAGE_SELECT = xxxxxx”
              To which I answered an http 400 (bad request?)
              What is wrong?

              Greetings and thanks in advance

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy