Skip to content

Add total values to simpleAPI#3568

Open
kevinwieland wants to merge 2 commits into
masterfrom
simpleapi-totalvalues
Open

Add total values to simpleAPI#3568
kevinwieland wants to merge 2 commits into
masterfrom
simpleapi-totalvalues

Conversation

@kevinwieland

Copy link
Copy Markdown
Contributor

@kevinwieland

Copy link
Copy Markdown
Contributor Author

hier ist noch eine Erweiterung um IO Geräte auszulesen und anzusteuern per HTTP simpleAPI:

==== IO (Ein-/Ausgänge) Parameter ====

^ Parameter ^ Beschreibung ^ Beispiel ^
| ''get_io_output_all'' | Alle Ausgänge (digital + analog) eines IO-Geräts | ''?get_io_output_all=2'' |
| ''get_io_output'' | Einzelner Ausgangsstatus (Name über ''io_output'') | ''?get_io_output=2&io_output=DO1'' |

Hinweise:

  • Für Auto-ID kann ''auto'' oder ein leerer Wert verwendet werden (z. B. ''?get_io_output_all=auto'').
  • Bei ''get_io_output'' kann optional ''io_output_type'' angegeben werden: ''digital'' oder ''analog''.
  • Ohne ''io_output'' liefert ''get_io_output'' den gleichen Inhalt wie ''get_io_output_all''.

Beispiele (Lesen):

Alle Ausgänge (digital + analog), IO-ID explizit

curl "http://IPADRESSE/openWB/simpleAPI/simpleapi.php?get_io_output_all=2"

Alle Ausgänge per Auto-ID

curl "http://IPADRESSE/openWB/simpleAPI/simpleapi.php?get_io_output_all=auto"

Einzelnen digitalen Ausgang lesen

curl "http://IPADRESSE/openWB/simpleAPI/simpleapi.php?get_io_output=2&io_output=DO1"

Einzelnen Addon-Ausgang lesen (z. B. LED1)

curl "http://IPADRESSE/openWB/simpleAPI/simpleapi.php?get_io_output=2&io_output=LED1"

Einzelnen analogen Ausgang lesen (Typ explizit)

curl "http://IPADRESSE/openWB/simpleAPI/simpleapi.php?get_io_output=2&io_output=AO1&io_output_type=analog"

Beispiele (Schreiben):

Digitalen Ausgang setzen (0/1 oder true/false)

curl -X POST -d "set_io_output=1&io_nr=2&io_output=DO1"
"http://IPADRESSE/openWB/simpleAPI/simpleapi.php"

Addon-Ausgang setzen (z. B. LED1) per Auto-ID

curl -X POST -d "set_io_output=true&io_nr=auto&io_output=LED1"
"http://IPADRESSE/openWB/simpleAPI/simpleapi.php"

Analogen Ausgang setzen (Typ optional explizit)

curl -X POST -d "set_io_output=45.5&io_nr=2&io_output=AO1&io_output_type=analog"
"http://IPADRESSE/openWB/simpleAPI/simpleapi.php"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant