-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(senML): handle timestamp only object
- Loading branch information
1 parent
1ebabf0
commit 55a4547
Showing
3 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
exampleContext: | ||
fingerprint: 92b.y7i24q | ||
fingerprint_deviceId: oob-352656108602296 | ||
ts: 1694503339523 | ||
APIURL: https://api.hello.nordicsemi.cloud | ||
--- | ||
|
||
# Publish Button presses | ||
|
||
> Button presses are special in that they only have a Time resource and use the | ||
> instance ID to signify the ID of the pressed button. | ||
## Background | ||
|
||
Given I have the fingerprint for a `PCA20065` device in `fingerprint` | ||
|
||
And I connect to the websocket using fingerprint `${fingerprint}` | ||
|
||
## Receive published button press | ||
|
||
Given I store `$millis()` into `ts` | ||
|
||
When the device `${fingerprint_deviceId}` does a `POST` to this CoAP resource | ||
`/msg/d2c/raw` with this SenML payload | ||
|
||
```json | ||
[ | ||
{ | ||
"bn": "14220/1/", | ||
"bt": "$number{$floor(ts/1000)}" | ||
} | ||
] | ||
``` | ||
|
||
Soon I should receive a message on the websocket that matches | ||
|
||
```json | ||
{ | ||
"@context": "https://github.com/hello-nrfcloud/proto/lwm2m/object/update", | ||
"ObjectID": 14220, | ||
"ObjectInstanceID": 1, | ||
"Resources": { | ||
"99": "$number{$floor(ts/1000)}" | ||
} | ||
} | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters