Skip to content

Syntax Question when using Alpha Anywhere #10

@skurimski

Description

@skurimski

This is not an issue rather a request for some assistance on the syntax required to write a value to a Pin on the Pi using Alpha Anywhere and passing a URL to it.

I have the Pi-GPIO-Server running on a RPi 3 and everything is running as it should be. I can hit the default webpage and turn my LED on and off. I am now trying to use my existing application Alpha Anywhere to "talk" to the server using the API and need help with the URL syntax.

In the examples below you will see I can pass an URL's via http_get command and get data back from the Pi-GPIO-Server on the pins I have setup. Now I would like to turn pin 18 on and off by passing a URL and need help constructing the proper URL syntax.

Any suggestion, ideas and examples are welcome. This is an awesome project and I can't wait to get a better understand of how I can interact with it through my application.

If interested in Alpha Anywhere, the doc for the HTTP_GET can be found here ...https://www.alphasoftware.com/documentation/pages/Ref/Api/Functions/System/HTTP%20Functions/HTTP_GET%20Function.xml

Example #1 (Get all pin status)
URL Sent....
http_get("http://10.10.17.11:5000/api/v1/pin")

Response....
= body = [{"event": null, "num": 18, "name": "Test", "initial": null, "bounce": 0, "resistor": null, "value": 0, "mode": "OUT"}, {"event": "RISING", "num": 23, "name": "", "initial": null, "bounce": 200, "resistor": "PUD_DOWN", "value": 0, "mode": "IN"}]

Example #2 (Get Pin 18 data)
URL Sent...
http_get("http://10.10.17.11:5000/api/v1/pin/18")

Response....
= body = {"event": null, "num": 18, "name": "Test", "initial": null, "bounce": 0, "resistor": null, "value": 0, "mode": "OUT"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions