Piston help, lights flash prescence etc


#1

I am looking to design a piston that:
In away mode will flash my hue lights alternate red/blue ( eventually I want all my hue light to flash, at present I am just working on one set. They should flash for x number of times and then reset to a set colour/level.

I can get one light to flash when I had more lights in the string the lights would all flash differently which was weird.

Once presence is detected, of one the mobile devices, the lights should set themselves to a colour and level.

I tried pasting my piston but it wont paste…

//
/* play */
/
/
/* Author : Gareth T /
/
Created : 12/1/2017, 1:20:24 PM /
/
Modified : 12/1/2017, 2:17:33 PM /
/
Build : 3 /
/
UI version : v0.2.0ff.20171129 */
/**************************************************************/

execute
if
(
Any of Denise Thomas’s Android’s or Gareth Thomas’s Android’s presence is not present
and
Any of Motion Sensor Bathroom’s or Motion Sensor Lounge’s motion is active
and
Smart Home Monitor status is Armed/Away
)
then
with
Front Door Colour 1
do
Flash Red 1 seconds / Blue 1 seconds for 100 times (only while Away);
end with;
with
Front Door Colour 2
do
Flash Blue 1 seconds / Red 1 seconds for 100 times (only while Away);
end with;
with
Denise Thomas’s Android and Gareth Thomas’s Android
do
Send PUSH notification “Motion Detected” and store in Messages (only while Away);
end with;
if
Any of Denise Thomas’s Android’s or Gareth Thomas’s Android’s presence is present
then
with
Front Door Colour 1 and Front Door Colour 2
do
Set color to White;
Adjust level by 25%;
end with;
end if;
end if;
end execute;


#2

Before getting deep into this create a test piston.

There is going to be no condition just an action.

Execute
With hue lights
Flash with your color settings
End execute

Then save it and hit the test button. See how it looks before complicating things


#3

cheers for the reply
I have other pistons that work fine, such as dimming lights through motion etc
I was just trying to improve on the away mode alarm, by having the lights flash, it might at least let the intruder know someone has possibly been alerted to their prescence.

It would be great if my google assistant speaker could advise same, but I dont think were there yet with GA.


#4

Ok so what is the piston not doing correctly?


#5

Hi
The front colour 2 does not seem to flash.
I simplified it down as i was getting inconsistencies across the lights within all rooms so just went down to 1 room
and by my count i got about 8 flashes and it stopped.

not sure how to test the presence turn on part,
without leaving the house and leaving someone in the house to move about, thus setting off the lights and confirming actions and then coming back to confirm the last part of the piston.


#6

It looked like you had the flashing on two separate actions. You should be able to combine them so instead it is using bulb 1, bulb 2 etc


#7

Hi,
Yes I know, but as I have two bulbs in most locations the idea was to try and get them flashing red blue in sync for a better red/blue effect. Hence the each group starts with a different colour, what really wanted was an end command.


#8

Please fill this out to help me understand what you are wanting, problems you are having and what you currently have

1) Give a description of the problem
(PUT YOUR INFO HERE)

2) What is the expected behavior?
(PUT YOUR INFO HERE)

3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#9
  1. Give a description of the problem
    The flashing of the first set of lights does not reach the set number and second set of lights do not flash; I also get notifications of motion all the time

  2. what is the expected behaviour
    Only when away mode is actioned and the two mobile devices are not present and the two locks are locked, and any subsequent movement detected by motion detectors will start one set of lights to flash red and blue and a second set to flash blue and red

3)whats is happening/not happening
see above

  1. Post a Green Snapshot of the piston

  2. Give a description of the problem
    (PUT YOUR INFO HERE)

  3. What is the expected behavior?
    (PUT YOUR INFO HERE)

  4. What is happening/not happening?
    (PUT YOUR INFO HERE)

  5. Post a Green Snapshot of the piston image

  1. Attach any logs (From ST IDE and by turning logging level to Full)
    (PASTE YOUR LOGS HERE BETWEEN THE MARKS)

  2. Attach any logs (From ST IDE and by turning logging level to Full)

(+1ms ╔Received event [Motion Sensor Lounge].motion = inactive with a delay of 994ms
+102ms ║RunTime Analysis CS > 13ms > PS > 28ms > PE > 62ms > CE
+110ms ║Runtime (40434 bytes) successfully initialized in 28ms (v0.2.0ff.20171129) (109ms)
+111ms ║╔Execution stage started
+125ms ║║Comparison (enum) present is (string) not present = false (1ms)
+127ms ║║Comparison (enum) present is (string) not present = false (1ms)
+128ms ║║Condition #14 evaluated false (12ms)
+129ms ║║Condition group #13 evaluated false (state did not change) (13ms)
+130ms ║║Condition group #1 evaluated false (state did not change) (15ms)
+132ms ║╚Execution stage complete. (21ms)
+138ms ╚Event processed successfully (138ms)
12/2/2017, 9:09:55 AM +466ms
+1ms ╔Received event [Motion Sensor Lounge].motion = active with a delay of 985ms
+93ms ║RunTime Analysis CS > 11ms > PS > 21ms > PE > 60ms > CE
+100ms ║Runtime (40431 bytes) successfully initialized in 21ms (v0.2.0ff.20171129) (98ms)
+101ms ║╔Execution stage started
+115ms ║║Comparison (enum) present is (string) not present = false (2ms)
+117ms ║║Comparison (enum) present is (string) not present = false (1ms)
+118ms ║║Condition #14 evaluated false (12ms)
+119ms ║║Condition group #13 evaluated false (state did not change) (13ms)
+120ms ║║Condition group #1 evaluated false (state did not change) (15ms)
+122ms ║╚Execution stage complete. (20ms)
+128ms ╚Event processed successfully (127ms)
12/2/2017, 9:09:30 AM +592ms
+1ms ╔Received event [33c].test = 1512205770588 with a delay of 4ms
+136ms ║RunTime Analysis CS > 14ms > PS > 35ms > PE > 86ms > CE
+143ms ║Runtime (40418 bytes) successfully initialized in 35ms (v0.2.0ff.20171129) (141ms)
+145ms ║╔Execution stage started
+162ms ║║Comparison (enum) present is (string) not present = false (1ms)
+164ms ║║Comparison (enum) present is (string) not present = false (1ms)
+166ms ║║Condition #14 evaluated false (15ms)
+167ms ║║Condition group #13 evaluated false (state did not change) (17ms)
+168ms ║║Condition group #1 evaluated false (state did not change) (18ms)
+173ms ║╚Execution stage complete. (29ms)
+180ms ╚Event processed successfully (179ms))


#10

You want to async the flashing so they all happen together.

click the with section and change the synchronous to asynchronous


#11

Ok, will give this a go, I am out this evening. I have resumed the piston and set the light devices as async