Line 87: |
Line 87: |
| ... | | ... |
| | | |
− | If fails, you will see error output:
| + | On success pairing new device info will be written in '''blesem''' service config: |
| | | |
| ... | | ... |
− | {
| + | config device |
− | "error": "failed to pair because…."
| + | option address "FF:CB:FA:6A:23:CB" |
− | }
| |
| ... | | ... |
| | | |
− | * On success pairing new device info will be written in '''blesem''' service config: | + | * Device unpairing command: |
| | | |
| ... | | ... |
− | config device
| + | ubus call blesem unpair '{"address":"FF:CB:FA:6A:23:CB"}' |
− | option address "FF:CB:FA:6A:23:CB"
| |
| ... | | ... |
| | | |
− | Unpair komanda tiesiog ištrins config device sekciją.
| + | * To get statistic from paired devices, use '''stat''' command: |
| | | |
− | Supai’rintų device stat gavimas ubus komanda:
| + | ... |
| + | ubus call blesem stat '{"address":"FF:CB:FA:6A:23:CB"}' |
| + | ... |
| | | |
− | ubus call blesem stat '{"address":"FF:CB:FA:6A:23:CB"}'
| + | You should see output: |
| | | |
− | Kuri parodys prietaiso stats,
| + | ... |
− | | + | { |
− | klaidos atveju bus:
| |
− | | |
− | {
| |
− | "error": "failed to retrieve status because…."
| |
− | }
| |
− | | |
− | sėkmingu:
| |
− | | |
− | { | |
| "success": "successfully requested status", | | "success": "successfully requested status", |
| "model": "3901", | | "model": "3901", |
Line 125: |
Line 116: |
| "humidity": 20, | | "humidity": 20, |
| "firmware": "23", | | "firmware": "23", |
− | ….
| + | . |
− | } | + | } |
− | | + | ... |
− | | |
− | * stat komanda kol kas dar nerealizuota, todėl gali keistis.
| |
− | | |
− | | |
− | | |
− | | |
− | tuoj pasižiūrėsiu pas sau dar kartą. Bet vakar tai tikrai veikė ir dar su JSON RPC padariau
| |
− | Galėsi irgi į instrukciją įtraukt
| |
− | | |
− | { "jsonrpc": "2.0",
| |
− | "id": 1,
| |
− | "method": "call",
| |
− | "params": [
| |
− | "727d2dd26ed722a202a3daf2db8fcbcf", "blesem", "scan.result",
| |
− | {}
| |
− | ]
| |
− | }
| |