Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. PIR sensor - Smartest way to disable at daytime? (newbie)

PIR sensor - Smartest way to disable at daytime? (newbie)

Scheduled Pinned Locked Moved General Discussion
7 Posts 3 Posters 3.3k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • pellusfromtellusP Offline
    pellusfromtellusP Offline
    pellusfromtellus
    wrote on last edited by
    #1

    [My enviroment: controller: domoticz on Raspberry PI/zwave/Mysensors)

    My first motion/PIR node with 2 relays now working. :) Some other nodes also running. But I want to add one feature; "disable daytime". What is the smartest approach?

    • Ask controller for time or, even better, a variable which described if daytime or not
    • Use a lightsensor to block the logic at "light"
    • Other approach

    (I want to block the logic daytime)

    Of course very happy if someone willing to help a rookie on it's very first shaky steps..
    :D

    Thanks

    Pelle

    PS! Read this post (https://forum.mysensors.org/topic/2116/hard-to-grab-time-and-value-sent-from-controller) about grab time.. Also read this one about variables (https://forum.mysensors.org/topic/3326/requesting-variables-reliably-how). Light sensor is my last option; I've read this one; (https://www.mysensors.org/build/light-bh1750)DS

    I'm still in the beginning of my learningcurve and my code is not the cleanest. And my wiring and coding for the relays is probably the most strange coding You've ever seen.. ;)


    A complete rookie! Love this stuff! My path: Domoticz/Zwave and now a big MySensors-fan! :)

    YveauxY 1 Reply Last reply
    0
    • pellusfromtellusP pellusfromtellus

      [My enviroment: controller: domoticz on Raspberry PI/zwave/Mysensors)

      My first motion/PIR node with 2 relays now working. :) Some other nodes also running. But I want to add one feature; "disable daytime". What is the smartest approach?

      • Ask controller for time or, even better, a variable which described if daytime or not
      • Use a lightsensor to block the logic at "light"
      • Other approach

      (I want to block the logic daytime)

      Of course very happy if someone willing to help a rookie on it's very first shaky steps..
      :D

      Thanks

      Pelle

      PS! Read this post (https://forum.mysensors.org/topic/2116/hard-to-grab-time-and-value-sent-from-controller) about grab time.. Also read this one about variables (https://forum.mysensors.org/topic/3326/requesting-variables-reliably-how). Light sensor is my last option; I've read this one; (https://www.mysensors.org/build/light-bh1750)DS

      I'm still in the beginning of my learningcurve and my code is not the cleanest. And my wiring and coding for the relays is probably the most strange coding You've ever seen.. ;)

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @pellusfromtellus I have implemented the logic in the controller. The sensor just sends a trigger on motion, and it's up to the controller (node-red in my case) to act on it or not.
      A lot simpler than making the sensor 'smart'.

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • pellusfromtellusP Offline
        pellusfromtellusP Offline
        pellusfromtellus
        wrote on last edited by
        #3

        Hi Yveaux!
        Thanks for taking your time and answer me. :) That's of course a smart approach and maybe the normal way to do it.

        But for the moment (and for learning purpose) I want the logic in the sensor. But I got an idea from Your approach. Maybe I could let my MyS-node present a "dummy-relay" (S_DOOR) which the controller could set on & off depending on sunrise/sunset. (I have more than one relay on my MyS-node, so some logic must be there.. And also a "override"-button which manually disable the MyS-node/relays.)

        Like: Controller: "After sunset"-event: set "dummy node=on", and then att sunrise "dummy node=off" and use "savestate" or something locally on arduino to save this "state", which then the controller checks if the sensor is enabled or disabled.

        Is that possible?

        I'm open for more ideas and technics..

        /Per


        A complete rookie! Love this stuff! My path: Domoticz/Zwave and now a big MySensors-fan! :)

        YveauxY 1 Reply Last reply
        0
        • pellusfromtellusP pellusfromtellus

          Hi Yveaux!
          Thanks for taking your time and answer me. :) That's of course a smart approach and maybe the normal way to do it.

          But for the moment (and for learning purpose) I want the logic in the sensor. But I got an idea from Your approach. Maybe I could let my MyS-node present a "dummy-relay" (S_DOOR) which the controller could set on & off depending on sunrise/sunset. (I have more than one relay on my MyS-node, so some logic must be there.. And also a "override"-button which manually disable the MyS-node/relays.)

          Like: Controller: "After sunset"-event: set "dummy node=on", and then att sunrise "dummy node=off" and use "savestate" or something locally on arduino to save this "state", which then the controller checks if the sensor is enabled or disabled.

          Is that possible?

          I'm open for more ideas and technics..

          /Per

          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #4

          @pellusfromtellus keep in mind that your sensor might not receive the switch message from the controller that it should start or stop reporting.
          Imagine your burglar alarm is offline because your pir sensor didn't get activated...

          http://yveaux.blogspot.nl

          1 Reply Last reply
          0
          • pellusfromtellusP Offline
            pellusfromtellusP Offline
            pellusfromtellus
            wrote on last edited by
            #5

            Thanks again. Important aspect, of course!

            I'm new to this so I don't have any own oppionion about how reliable the communication is. So I really appreciate your input!! :)


            A complete rookie! Love this stuff! My path: Domoticz/Zwave and now a big MySensors-fan! :)

            1 Reply Last reply
            1
            • D Offline
              D Offline
              Drcashman
              wrote on last edited by Drcashman
              #6

              This video might be useful to you if you are using the same type of PIR.
              https://www.youtube.com/watch?v=2dxhbXHYEG0

              1 Reply Last reply
              1
              • pellusfromtellusP Offline
                pellusfromtellusP Offline
                pellusfromtellus
                wrote on last edited by
                #7

                :) Lovely. Will be this evenings experiment – if I got the right PIRs.. ;) – to find out...

                Thanks for answering!

                /Pelle


                A complete rookie! Love this stuff! My path: Domoticz/Zwave and now a big MySensors-fan! :)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                13

                Online

                11.7k

                Users

                11.2k

                Topics

                113.0k

                Posts


                Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • MySensors
                • OpenHardware.io
                • Categories
                • Recent
                • Tags
                • Popular