Announcement

Collapse
No announcement yet.

Motion Sensor

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

    Motion Sensor

    Has anyone done this and used the motion sensor to as a condition in an event. https://www.youtube.com/watch?v=M1o80liNrhs

    #2
    Motion sensors typically have a short window when they are active. This tends to make them not very good for event conditions, but are useful for event triggers.

    When one wants to do local relay control based upon local sensor input, such as the PIR, then I find Tasmota preferred firmware as it has the ability to run what are called rules. The rule typically looks like "ON event DO action". It is the equivalent of sending status to HS, triggering an HS event and the sending message back to control the relay. (the same applies to the temp sensor event that was discussed in another thread.) It just does not have the dependencies of needing HS to accomplish the task and it will be a little faster. Where HS shines is when you want to bring two different technologies together.

    There are many devices like the Shelly that use the ESP8266 so if you go the route of putting in 3rd party firmware there are other options available. It just depends upon how much DIY vs. off-the-shelf that you want. Shelly has a nice product line, but they are also at a higher price-point. Take for example a Wemos D1 Mini that sells for about $3, has more than a dozen IO pins and is powered with microUSB. It does not have a built-in relay or a nice case like the Shelly 1.

    Comment


      #3
      I didn't watch the clip so I might be completely off with my answer. In any case, if you want to use a motion sensor as a condition you should create a virtual device. That virtual device will be set to on when the motion sensor is triggered. Then after a certain amount of time it is reset to off.

      Comment


        #4
        Well I decided to attempt this. I am wondering if anyone can help set this up. Currently I own a Shelly 1pm (w the temp addon) with the stock firmware. I was successful in turning on/off a light based upon temp. So now I will look into flashing the shelly 1 with tasmota fw. Questions that come to mind:
        1. Will the temp addon function as expected with the temp addon?
        2. Can I use one Shelly 1pm for this project.

        Goal-Turn light on based on temp reading and if space is occupied (ie virtual device reads as occupied based upon pir motion)

        Comment


          #5
          Before taking the plunge with new firmware I would first do the project just like the video and let Homeseer integrate the temperature input and switch input to command the relay. The temperature is a slow moving signal so it can be used as condition and the motion sensor will be the trigger. What you need to determine are the conditions upon which you will turn the light off after it has been turned on. This will be some fixed time after the last motion signal is received. A HS timer could be used for this. Note that the timer is a count up and not a count down one.

          The Shelly 1 switch input is tied to mains ground so make certain the motion sensor you are using also has the same electrical characteristics.

          After you have got your logic working with HS as you desire you likely will have a good solution, but if you want to proceed with putting the equivalent logic inside the Shelly using Tasmota then you can take that step. Suggest using Tasmotizer utility to install the firmware. First thing is is to read the existing firmware into a file on your computer. This will allow you to restore factory firmware if things do no go as expected. Shelly does not provide the binary for their firmware so you need to capture it before changing it.

          The Shelly temperature add-on is very specialized but Tasmota appears to support it. Look at the thread at https://github.com/arendst/Tasmota/issues/7469

          You will need a 3.3V UART with USB connection that will be connected to the same pins where you installed the temp addon. Of course during this process the temp addon will be removed. There are many You Tube videos on flashing these devices. For example https://www.youtube.com/watch?v=O5MT5t1DT6A

          Comment


            #6
            Thanks so much for help and quick response. Currently waiting on the PIR that was suggested in the video.

            Comment


              #7
              FYI I received the PIR. I kept the shelly at its stock firmware. This works nicely. MCSMQTT see's the motion. So I created a Virtual Device representing the doghouse. When motion is seen HS4 sets the doghouse as occupied.

              Comment


                #8
                Glad you had success. It seemed pretty painless or are you just disclosing the highlights?

                Comment

                Working...
                X