Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    send the flic button and action in http request body

    Flic Hub
    2
    2
    774
    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.
    • karajito
      karajito last edited by

      Re: HTTP 'apply default settings' and 'Flic ID' variable?

      Is there a way to automatically include the flic button id into the body of a http request and also the type of clic that has triggered the button?

      I have several buttons, and hate to create separate bodies now for each button when they all need to access my own raspberry pi. Would be nice if it could be done with default variables like $ID and $ACTION

      1 Reply Last reply Reply Quote 0
      • michael
        michael last edited by

        The HTTP header does contain the following information: button-serial-number; button-battery-level; button-name. I agree it would be nice if it also included the button-action. I just put the info in the URL (eg flic/1/click) so I don't have to set a body. I then handle this in Node Red where I can specify the endpoint as flic/:from/:action and it pulls the parameters out for me automatically.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post