Announcement

Collapse
No announcement yet.

Monprice Stitch Door/Window Sensor uses MQTT

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

  • Monprice Stitch Door/Window Sensor uses MQTT

    I was looking for a WiFi solution for something like a Door/Window sensor to report a button/contact change of state. There are three candidates I investigated are the Amazon Dash, Kevin Durah Trigboard and the Monoprice Stich. The driving factor is battery utilization. Still looking, but in the process found it interesting the MQTT was being used by the Window/Door sensor.

    The Trigboard or Dash are best in this respect where the battery use is very low.

    The Dash circuit is one where the button push applies power to the ESP8266 which then goes through power up, connects WiFi and then communicates. Unhacked, it will communicate to Amazon server. It has the problem of very slow response due to the power up initialization.

    The Trigboard has a clever power-saving design and efficient firmware that actually wakes up every hour to report battery as well as wakes up on event. It uses push notifications. The problem I ran into with it was that it only would report the open event. No notification was provided with the close event. I have some ideas to add circuity to wake-up on either, but not yet been motivated to evaluate the potential circuit mod.

    I saw the Monoprice Stitch Window/Door sensor and it claimed to have a decent battery life. It uses two AAA cells. When I sniffed the WiFi traffic I was surprised that it used MQTT to communicate to a Tuya server. It will report on open/close, tamper and battery life update. Unfortunately the payload looks to be encrypted so I was not able to distinguish the payload content. Had I been able to then I could have my local DNS server route mq.gw.tuyaus.com to something on my network. There is also quite a bit of WiFi traffic so I question the battery life when the sensor is placed in a frequently used location.

    Out of curiously I opened the sensor and confirmed easy access to the RX/TX/Gnd/3.3V/IO0 pads that are all labeled on the back. The firmware can be reflashed, but not clear what dependencies exist with the power saving circuitry.

    Click image for larger version  Name:	20190401_141930.jpg Views:	1 Size:	126.1 KB ID:	1296390

    There is quite a bit of circuitry on the front including a 8l151G that consumes microamps to manage the remainder of the circuits power. This should mean that the standby operation of this sensor will use very little battery and would be a good sensor for low utilization areas. Click image for larger version  Name:	20190401_141851.jpg Views:	1 Size:	149.3 KB ID:	1296391

    A small sample of five message payloads below:

    Code:
    close Message: 2.112bbd9e393ca9d101p+m4UmTgHlk5UFVQ+g7me3UMh+s3AMHOdvZYx225auzgokdmkXkKrlpdVyenWvqlrijg9mbuKYAKgAKjiQfdfAMBjAx2xHdHvgIiCk2uSY=
    close2Message: 2.1248ec4374fb66adb1p+m4UmTgHlk5UFVQ+g7mTVBzyj6aCkVnTApB8UwEGvDI1knFrnqWV2rriNziEMEkYTgbUOEhy7EeX84XOiEJdAYPbiVuwvLMnMrK3PRDmE=
    open  Message: 2.18fcdc4cd6f715dff1p+m4UmTgHlk5UFVQ+g7mR5z3MBUL3AT0YiTAWgb3Cil6GQw5BEe+jIzSEJYtBJ5uvZkvgH9KhcQ3VPoFFst3I059kxFKvHHVoUF1/26/30=
    open2 Message: 2.177b5bad19c83e9e21p+m4UmTgHlk5UFVQ+g7me3UMh+s3AMHOdvZYx225atAvFzObBawmOGlgTg4MnKH4v+4gqinPz4XeO1TktZMPJrOzviYugUlTcwlIrd/HWc=
    tamperMessage: 2.18fcdc4cd6f715dff1p+m4UmTgHlk5UFVQ+g7mR5z3MBUL3AT0YiTAWgb3Cil6GQw5BEe+jIzSEJYtBJ5uvZkvgH9KhcQ3VPoFFst3I059kxFKvHHVoUF1/26/30=
    Sample wireshark capture for reporting (Sensor is 192.168.0.245) and by the Tuya server is below

    Click image for larger version  Name:	Capture1.PNG Views:	1 Size:	376.0 KB ID:	1296388

    Click image for larger version  Name:	Capture2.PNG Views:	1 Size:	311.7 KB ID:	1296389

  • #2
    Get one of these : https://www.amazon.com/Z-Wave-Me-RaZ...s%2C232&sr=8-5 then install : https://z-wave.me/z-way/download-z-way/

    Once running look for Z-way module from the app store. More on that is here : https://github.com/Edubits/Zway-MQTT
    You will have all your devices PUB and SUB to mqtt. So you can have HomeSeer deal with the events or can all be automatic with your plugin!

    Note : Excessive use of WiFi devices cut out or less WiFi traffic!

    Eman.
    The Closer.

    Comment


    • #3
      You are pointing me to an elephant. I want a mouse.

      The receiver of the event notification is an ESP8266 and that is why I want a WiFi solution. Zwave brings considerable burden and even Zigbee demands another circuit is installed to decode the Zigbee RF. Homeseer in my world is a monitor. Control is done locally in the applicable micro.

      Comment


      • #4
        Originally posted by Michael McSharry View Post
        You are pointing me to an elephant. I want a mouse.

        The receiver of the event notification is an ESP8266 and that is why I want a WiFi solution. Zwave brings considerable burden and even Zigbee demands another circuit is installed to decode the Zigbee RF. Homeseer in my world is a monitor. Control is done locally in the applicable micro.
        Are you going to use only one of them?

        But if you are not then you will be spoiled for choice. Remember that may be the only z-wave controller you may ever need. You can use discrete devices like : https://www.amazon.com/Sensative-Z-W...e+strips+zwave Well a bit expensive but you get a good deal for a pack of three. They are the business and require no hacks.

        Note : Then the server doesn't stop there though! Any other brands (types) can be configured in few clicks to SUB/PUB to mqtt and let HomeSeer deal with rest.

        You have one Ethernet/WiFi device to take care of all the work you could have done unless of course you are like me "we all love tinkering" ===>DIY



        The RaZberry board has a placement for a more powerful external antenna

        Click image for larger version  Name:	IMG_20190402_102632.jpg Views:	1 Size:	54.8 KB ID:	1296487



        Or this one : https://www.amazon.com/868MHz-900MHz...y&sr=8-1-fkmr1


        Eman.
        The Closer.

        Comment

        Working...
        X