API for accessing RTC devices implemented with kore
Helmut Pozimski bce724bd7b add automatic updates to the html page | 5 years ago | |
---|---|---|
html | 5 years ago | |
jsonrtc | 5 years ago | |
.gitignore | 5 years ago | |
COPYING | 5 years ago | |
README.md | 5 years ago |
DISCLAIMER: This Code has been written for demonstration purposes only, it offers no authentikation at all and should not be used in production!
Simple http API to read and write RTC data via JSON implemented with kore and cJSON. The directory html
contains a simple web site to demonstrate the possibilities of the API.
Execute kodev run
to start the web service. You can then issue requests to the following endpoints:
A GET request generally requires no parameters, for POST you have to pass a JSON object that follows one of the following formats.
For /time:
{
"seconds": int,
"minutes": int,
"hour": int,
"mday": int,
"month": int,
"year": int,
"wday": int,
}
For /wkalrm:
{
"seconds": int,
"minutes": int,
"hour": int,
"mday": int,
"month": int,
"year": int,
"wday": int,
"enabled": int,
"pending": int
}
For /nvmem:
{
content: string
}
The string has to be exactly 56 characters representing hexadecimal values.
You will need the following packages installed on your system:
You also should have a compatible RTC device with the rtc-ds13307-driver loaded on your system.
This project is licensed under the GNU General Public License, Version 2 - see the COPYING file for details
TBD