HaKuNa
(Remo M)
March 18, 2023, 3:01am
6
I setup webhook and nginx with the doorbell and it works fine for instant notification. I use the httplistener binding. I do not have access easly atm because I‘m travelling.
Here you find the details:
Here is my thing configuration (replace the xxxxxxxxxx with your thingId)
UID: httplistener:HttpListener:xxxxxxxxxx
label: Doorbell Webhook
thingTypeUID: httplistener:HttpListener
configuration:
jsonConfig: |-
{
"channels": [
{
"key":"user_id",
"kind": "STATE",
"state": "req.body.json.user_id"
},
{
"key":"event_type",
"kind": "STATE",
"state": "req.body.json.event_type"
},
{
…
The netatmo binding also have a bug regarding delivering the correct values for some channels. There is an open issue in github for that.
opened 11:59AM - 24 Jun 22 UTC
bug
Issue came-up during the webhook investigations in :
https://github.com/openhab… /openhab-addons/pull/12972#issuecomment-1164042787
### Expected Behavior
Periodical polling should deliver the values from /getevents
### Current Behavior
Polling does update the following channels with NULL:
```
sub-event#snapshot
sub-event#snapshot-url
sub-event#event
sub-event#event-url
sub-event#message
```
### Possible Solution
Values must be taken from /getevents call.
Example (I left 1 event in, but all the follwowing events also contain the same attributes and all with values):
```
{
body: {
home: {
id: "xxxxxxxxxxxxxxxxxxxxxxxx",
events: [{
id: "xxxxxxxxxxxxxxxxxxxxxxxx",
type: "outdoor",
time: 1655917778,
module_id: "xx:xx:xx:xx:xx:xx",
video_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
video_status: "available",
subevents: [{
id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
type: "human",
time: 1655917778,
verified: true,
offset: 1,
snapshot: {
url: "https://netatmocameraimage.blob.core.windows.net/production/xxxxxxxxxxxxxxxxxxx",
},
vignette: {
url: "https://netatmocameraimage.blob.core.windows.net/production/xxxxxxxxxxxxxxxxxxx",
},
message: "Person erfasst"
}]
},
.. around 40 entries, all with the same attributtes and values are present in all ..
]
}
},
status: "ok",
time_exec: 0.042575836181640625,
time_server: 1655967343
}
```
If required, I can also post examples from:
/homedata
/homestatus
According to the documentation, all other GET API's are deprecated
https://dev.netatmo.com/apidocumentation/security#documentation
### Steps to Reproduce (for Bugs)
1. Install/configure netatmo binding incl. webhook
2. add all available channels
3. add item to the channels
4. check the values after polling