Low Battery Code for GS-WDS07 2 Code (4 code) Door Sensor

Low Battery Code for GS-WDS07 2 Code (4 code) Door Sensor

The popular GS-WDS07 2 code door sensor is an under utilized RF-433 device in most peoples systems. That’s because it’s actually a 4-code sensor including a low battery code and a tamper code, but most people only use open and closed codes in their system. Here is how to use the low battery code.

Low Battery Code for GS-WDS07 2 Code (4 code) Door Sensor
GS-WDS07 2 Code (4 code) Door Sensor

I admit I have struggled quite a while trying to figure out how to use the battery low code on these sensors. I was trying an alert and a notification but all of that had a bug in it, more below, and it never worked. I dropped all that and went simple. Today (after over a couple of years of trying) I had my first intercept of a battery code with a successful (meaning in real time) battery replacement. Previously I was walking around the house with my phone once in a while opening the doors to test that the sensors still work.
How LAME is that…

How the Sensor Works

These sensors put out 4 possible codes. All start with the base ‘serial number’ (xxxx in Hex) that makes it different from the other similar devices in your system,. Then comes the 2 digit code that tells you one of 4 things:

  • Door Closed xxxx0E
  • Door Open xxxx0A
  • Battery low xxxx06
  • Tamper xxxx04

The door open and door closed codes are well documented in many Makers writings and YouTube Videos, so I’m not going to cover those. For the tamper code, there is a place on the pwb that you can add a switch (s2). You can see S2 in the video below if you want to use it as designed and see the place to attach wires if you have another use. If used the switch is expected to be closed when in the normal condition, such as the sensor is attached to the frame or whatever you want to use it for. When this tamper switch changes from closed to open, it sends out the tamper code. If you have a normally closed dry contact that you want to have a reaction when it goes from closed to open, you can use this connection to get a code from this device. I don’t use that in any of my use cases but it’s there if you have a need.

Low Battery Code

What I found out today is that when the battery is ‘Low’, it repeatedly sends out the low battery code until the battery is so dead it doesn’t work at all. I was finally able to catch one doing this.

Low Battery Code for GS-WDS07 2 Code (4 code) Door Sensor

Home Assistant Capture of Low Battery Code

To capture the code, I use the python scripting method of getting codes out of my RF-Bridge(s) and send an MQTT message which sets a binary_sensor with a manual reset. You can see this in my Home Assistant Configuration which I host a sanitized version of on GitHub.

That is all the Home Assistant code. I’m linking it into my GitHub instead of pulling the code into here so that if / as I make changes to my system you will see them live and it stays up to date.

Notification of Low Battery Code

My first failing attempt at notification involved looking for the binary_sensor to trip to on, then send an alert that included a text to me. Well than never worked correctly. I believe it may have had something to do with the fact that the code gets sent repeatedly when the battery is low. It was more likely I had something wrong in the logic. In the end the real reason that failed is that it was too complicated, so I tossed it.

Now I have a simple Lovelace Conditional Card for each sensor, and it hides in my main Lovelace page. When a battery is low, it pops this up:

Low Battery Code for GS-WDS07 2 Code (4 code) Door Sensor
Low Battery Code Showing on Main Lovelace Screen

The set-up of the conditional card looks like this:

Low Battery Code for GS-WDS07 2 Code (4 code) Door Sensor
Conditional Card Trigger Example
Low Battery Code for GS-WDS07 2 Code (4 code) Door Sensor
Conditional Card Action Example

If you look at the action example above, you will see that when this button is pressed, it will trigger the battery_clear.py python_script. What that does is reset all the door battery code binary sensors to off in an MQTT send loop. So it doesn’t care which one was set, they are all getting the off code.
Simplest way I could find to turn off this group of binary sensors.

Summary

So that’s how I watch for a low battery code on my GS-WDS07 door sensors. So far so good with 1 trigger since I installed it a week or so ago.
I hope this has been useful to you. Thanks for reading. Links are below if you want to buy some of these. I don’t get anything from the product links but if you want to help me out, there are links below that that can help me out.

Episode: 074

Video related links:
AliExpress link for a lot of 10 of these:
http://s.click.aliexpress.com/e/Lrqb2u0
Banggood Link:
https://usa.banggood.com/GS-WDS07-Wireless-Door-Magnetic-Strip-433MHz-for-Security-Alarm-Home-System-p-1174915.html?p=@K220219381694201802
Amazon Link:
https://www.amazon.com/dp/B08HYRYB6J/?ref=exp_drzzs_dp_vv_d&tag=drzzs0e-20

#WhatAreWeFixingToday
#SirGoodEnough
Contact Links:
What are we Fixing Today Homepage / Website:
https://www.WhatAreWeFixing.Today/
Channel Link URL: (WhatAreWeFixingToday)
https://bit.ly/WhatAreWeFixingTodaysYT
What are we Fixing Today Facebook page (WhatAreWeFixingToday):
https://bit.ly/WhatAreWeFixingTodaybFB
What are we Fixing Today Twitter Account (Sir GoodEnough):
https://bit.ly/WhatAreWeFixingTodayTW
Discord Account: (Sir_Goodenough#9683)
https://discord.gg/Uhmhu3B

Please help support the channel:

If you would like to donate anything to this channel, please use this address:
C/O: Sirius GoodEnough
322 Buena Vista Ave.
Department: DYT
Waukesha, Wisconsin, 53188-3602

I retired from a large mid-western medical equipment manufacturer on December 31 (2019) and decided to try to let everyone in on my life and my transition into retirement. I have a varied set of interests. I live in a 90 year old cape cod in the middle of a small city of 70,000 people. I have a small lot across the street from the city seat of government, but despite that I have a 1952 Allis Chalmers farm tractor that I drive around the city from time to time. My wife has a business that has me fixing and creating cool home decor out of broken windows and drywall screws. I have been known to buy things on 'for sale' lists, fix it up, clean it up, generally add value and sell it off. Oh, yes, I'm getting chickens! But first I have to build the chicken coop and run. It will be like no other you have ever seen. Also will give me something to do. I am into home automation, have a Home Assistant enabled home and so will the chickens! I'll have to give them a password...
Social Media Auto Publish Powered By : XYZScripts.com