Announcement

Collapse
No announcement yet.

When To Use A Switch Node As A Fllter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    When To Use A Switch Node As A Fllter

    Here :


    Click image for larger version

Name:	Switch.png
Views:	152
Size:	192.5 KB
ID:	1417759



    Eman.
    TinkerLand : Life's Choices,"No One Size Fits All"

    #2
    Here's a more specific HomeSeer example:

    Click image for larger version

Name:	Capture1.PNG
Views:	96
Size:	63.9 KB
ID:	1417795

    Motion? switch is used to detect when the Entrance Motion Sensor is triggered, only passing on the message if it has the status "Motion Detected".

    Click image for larger version

Name:	Capture2.PNG
Views:	101
Size:	17.2 KB
ID:	1417796

    Control On change node sets up the message to do the controlling (it doesn't care what the input is, just that it received a message):

    Click image for larger version

Name:	Capture3.PNG
Views:	90
Size:	27.9 KB
ID:	1417797

    In practice this flow probably makes more sense, if your motion sensor stays on and then goes back to No Motion after a while (i.e. the time you want the lights on):

    Click image for larger version

Name:	Capture4.PNG
Views:	85
Size:	78.7 KB
ID:	1417798
    Motion? now has a second condition when msg.payload.status = "No Motion" and this triggers the Control Off node which is as for Control On but setting msg.payload.status = "Off".

    Comment

    Working...
    X