RESTful Transfer

Topics about the Software of Revolution Pi
Post Reply
User avatar
jhudson649
Posts: 1
Joined: 01 Mar 2019, 01:11
Answers: 0

RESTful Transfer

Post by jhudson649 »

Has anyone implemented this on the system?

j
Jeff Hudson
Electrical/Controls Engr
Bazell Technologies
User avatar
RevPiModIO
KUNBUS
Posts: 322
Joined: 20 Jan 2017, 08:44
Answers: 0
Contact:

Re: RESTful Transfer

Post by RevPiModIO »

What do you mean?

Do you want to read the IOs via a GET and set IOs via a POST?

For example:

Code: Select all

GET http://revpi.local/api/
> {
    "ioname1": iovalue,
    "ioname2": iovalue2
}
and

Code: Select all

POST http://revpi.local/api/
< {
    "ioname2": newvalue2
}
> {
    "success": true
}
This would be very simple with Python and RevPiModIO. I could try to write an example code, if this is what you mean :D

Regards, Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
Post Reply