1) Give a description of the problem
I’m trying to build a piston to monitor when the door is unlocked - when it IS unlocked, I’d like to send a notification stating how (manual, keypad, etc.) and by who (assigned code). I can access the data I need through the lockcodes and $args, but I don’t understand the format of the data. I am familiar with programming data types like lists, dictionaries, etc. - the results look like these, but I don’t get how to access the items.
2) What is the expected behaviour?
I get back what look like a list and a dictionary. I’d like to access items from them both. Examples: lockcodes: {“1”:“Matt and Christine”,“2”:“Housecleaner”,“3”:“Rosie”}; args: [codeId:1, codeName:Matt and Christine, lockName:Front door lock, method:keypad, usedCode:1]
I’d like to access elements like in python (dictionary.get(“1”) and list[1]) if possible.
3) What is happening/not happening?
I don’t get how to access these items!!
**4) Post a Green Snapshot of the piston![image|45x37]
5) Attach logs after turning logging level to Full
4/18/2020, 11:11:26 AM +178ms
+2ms ╔Received event [Front door lock].lock = unlocked with a delay of 807ms
+67ms ║RunTime Analysis CS > 47ms > PS > 6ms > PE > 13ms > CE
+69ms ║Runtime (38846 bytes) successfully initialized in 6ms (v0.3.110.20191009) (67ms)
+70ms ║╔Execution stage started
+76ms ║║Comparison (enum) unlocked changes_away_from (string) locked = true (1ms)
+77ms ║║Cancelling condition #2's schedules...
+78ms ║║Condition #2 evaluated true (5ms)
+79ms ║║Cancelling condition #1's schedules...
+80ms ║║Condition group #1 evaluated true (state changed) (6ms)
+81ms ║║Cancelling statement #3's schedules...
+87ms ║║[codeId:1, codeName:Matt and Christine, lockName:Front door lock, method:keypad, usedCode:1]
+88ms ║║Executed virtual command log (1ms)
+93ms ║║1
+94ms ║║Executed virtual command log (1ms)
+103ms ║║{"1":"Matt and Christine","2":"Housecleaner","3":"Rosie"}
+104ms ║║Executed virtual command log (1ms)
+106ms ║╚Execution stage complete. (37ms)
+107ms ╚Event processed successfully (107ms)