Virtual Contact - Alexa


#1

1) Give a description of the problem
I have a ST Multi sensor. I have created a Simulated Contact Sensor. I am looking for WebCoRE to change the status of the Simulated Contact Sensor to open or closed based on if the physical sensor is open or closed.

2) What is the expected behavior?

  1. Physical contact sensor opens.
  2. Change Simulated Contact Sensor to open
  3. Send push notification with message that sensor is open

  1. I also have an Amazon Alexa routine that is looking for the Simulated Contact Sensor to be open. When it is open for Alexa to announce that contact is open.

3) What is happening/not happening?
Points 1,2,3 are working. I can see the Simulated Contact Sensor open and close based on what the physical sensor is doing. However Alexa never seems to run the routine. However if i manually run the routine in the Alexa app then Alexa does announce the contact is open.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
+1ms ╔Received event [Kitchen Fridge Sensor].contact = closed with a delay of 701ms
+66ms ║RunTime Analysis CS > 16ms > PS > 36ms > PE > 15ms > CE
+69ms ║Runtime (38450 bytes) successfully initialized in 36ms (v0.3.108.20180906) (67ms)
+70ms ║╔Execution stage started
+82ms ║║Comparison (enum) closed stays (string) open = false (2ms)
+85ms ║║Cancelling any timed trigger schedules for condition 4
+86ms ║║Cancelling statement #4’s schedules…
+87ms ║║Cancelling condition #4’s schedules…
+88ms ║║Condition #4 evaluated false (12ms)
+89ms ║║Cancelling condition #1’s schedules…
+90ms ║║Condition group #1 evaluated false (state changed) (14ms)
+98ms ║║Comparison (enum) closed changes_to (string) closed = true (1ms)
+100ms ║║Cancelling condition #13’s schedules…
+103ms ║║Cancelling statement #18’s schedules…
+146ms ║║Executed physical command [null].close() (38ms)
+147ms ║║Executed [Virtual-ST-Sensor-Fridge].close (41ms)
+149ms ║║Condition #13 evaluated true (55ms)
+150ms ║║Cancelling condition #11’s schedules…
+151ms ║║Condition group #11 evaluated true (state changed) (58ms)
+154ms ║║Cancelling statement #12’s schedules…
+168ms ║║Executed virtual command sendPushNotification (7ms)
+172ms ║╚Execution stage complete. (101ms)
+173ms ╚Event processed successfully (174ms)
01/11/2018, 14:08:49 +635ms
+2ms ╔Received event [Kitchen Fridge Sensor].contact = open with a delay of 657ms
+66ms ║RunTime Analysis CS > 16ms > PS > 33ms > PE > 16ms > CE
+68ms ║Runtime (38453 bytes) successfully initialized in 33ms (v0.3.108.20180906) (65ms)
+69ms ║╔Execution stage started
+83ms ║║Comparison (enum) open stays (string) open = true (2ms)
+86ms ║║Adding a timed trigger schedule for condition 4
+89ms ║║Condition #4 evaluated false (13ms)
+91ms ║║Condition group #1 evaluated false (state did not change) (14ms)
+98ms ║║Comparison (enum) open changes_to (string) closed = false (1ms)
+101ms ║║Cancelling condition #13’s schedules…
+102ms ║║Condition #13 evaluated false (8ms)
+103ms ║║Cancelling condition #11’s schedules…
+105ms ║║Condition group #11 evaluated false (state changed) (11ms)
+108ms ║║Fast executing schedules, waiting for 979ms to sync up
+1096ms ║║Cancelling condition #4’s schedules…
+1099ms ║║Cancelling statement #16’s schedules…
+1205ms ║║Executed physical command [null].open() (102ms)
+1206ms ║║Executed [Virtual-ST-Sensor-Fridge].open (104ms)
+1208ms ║║Condition #4 evaluated true (113ms)
+1210ms ║║Cancelling condition #1’s schedules…
+1211ms ║║Condition group #1 evaluated true (state changed) (116ms)
+1214ms ║║Cancelling statement #2’s schedules…
+1228ms ║║Executed virtual command sendPushNotification (8ms)
+1231ms ║╚Execution stage complete. (1162ms)
+1233ms ╚Event processed successfully (1232ms)

Please let me know if can provide any more information


#2

What does your Alexa routine look like?

I just created this one for testing…


#3

Hello mate.

Yep same as yours. If i run the Alexa routine then i hear it say the command.

  1. When the physical contact opens i can see the virtual contact open as well.
  2. I can run the Alexa routine manually

So its like Alexa is not seeing the contact open or close.


#4

I will have to check at lunch time if mine works.


#5

Thanks mate. appreciate any assistance.


#6

Guys.

Any further ideas? I just can’t seem to get Alexa to pick up that the virtual contact switch is open. Even through in the ST app I can see it open and close. I must be missing something.


#7

Not sure if you have already done this, but after adding new devices, I have to say, “Alexa, discover my devices” so she can link up with the new device.


#8

Thanks mate. Yes I have performed a discovery. Only once it has been done can I see and select the virtual contact switch to use.


#9

I just remembered this, the routine I created earlier worked for me when I tested it.


#10

Thanks mate.

Not sure what i am doing wrong then? I can see the physical contact open which then opens the virtual contact. Close is the same. I get the push notification but no Alexa voice notification.

I am in the UK if that makes any difference to anything? I am a little stuck as to where to look next or try.


#11

So this might be working. I created a new Piston which didn’t work but was more clear in its layout. I removed the Alexa ST skill and then connected it back up. Did another scan. My Mrs says it worked. I am at work so cant confirm. She is going to do some testing later for me.

Any ideas why removing the skill and then attaching again would work? Before doing this i could see all devices including the virtual contact.

Cheers

Craig


#12

I honestly do not have a clue. When this first became available one of the things that people noticed is their simulated devices is not visible within Alexa and one of the first suggestions that seemed to fix it is disabling/enabling skills or logging out and back in to the Alexa app. This might be similar to one of those cases?


#13

Thanks mate. Possibly i guess. As long as i know i need to do that to get it working then fine. I mean once stuff is setup its done and dusted.


#14

I am curious why Amazon only allows contact switches and motion detection to trigger their smarthings based push notifications? Seems strange. It would help me a lot if I could trigger off of switches turning on and off as well.

Anyways… I too need to create a virtual contact switch and have WebCore open it when my dryer is done so I can create an Alexa Routine off of it. I created the virtual contact switch using the zwave door/window sensor DTH like all of my other contacts have. But when I create my Piston, Webcore does not allow me to Open (or Close for that matter) the contact switch. Its just not an option. I see @McTechSolutions has a piston that does allow him to Open/Close his contacts but I dont see that option when creating mine.

Any ideas? Please help :slight_smile:


#15

Edit the device and for the type, try Simulated Switch… sorry Simulated Contact Sensor :slight_smile:


#16

That was it! Thank you. Never knew all of those ‘simulated xxx’ DTH existed…