otaviojr / node-red-contrib-smartthings

Allows you to control your devices and get their status using NodeRed
MIT License
32 stars 16 forks source link

Feature Request: Lock to include "description" in payload when available. #34

Open cthierman opened 4 years ago

cthierman commented 4 years ago

Hi, I have a pair of Yale locks and a schlage lock both are programmed with user codes.

I currently have both of these paired with Vera and smartthings (secondary) and am looking to retire my vera, and move to nodered via smart things for managing these locks.

In anycase, currently, when a specific user code is entered in my system, I take different action, and alert myself say when the cleaning lady arrives and let's herself in...

Therefore I was hoping you could make it so that in the payload the "description" field is passed through. I noticed smartapp passes it to the webhook handler in a POST message. So was hoping this wouldn't be a hard change...

Below is a capture of the info caught in the wireshark capture.

POST /smartthings/webhook HTTP/1.1 Accept: / User-Agent: Linux UPnP/1.0 SmartThings HOST: xxxx Content-Type: application/json Content-Length: 359

{"id":"xxxx","date":"2020-05-11T02:07:41.669Z","value":"unlocked","name":"lock","display_name":"Back Door Lock","description":"Unlocked by \"Code 2\"","source":"DEVICE","state_changed":true,"physical":false,"location_id":"xxxxx","hub_id":"xxxxxx","smartapp_id":null}HTTP/1.1 200 OK

X-Powered-By: Express Access-Control-Allow-Origin: * Content-Type: text/html; charset=utf-8 Content-Length: 2 ETag: W/"xxxx" Date: Mon, 11 May 2020 02:07:41 GMT Connection: keep-alive

OK