Advices on using 433MHz door sensor/PIR with ESP8266

Hello,

For my SMART HOME project I want to start using 433MHz devices (the main reason was the time those devices operate on batteries, compared to my other ESP8266 devices that need power cables)

I loaded the ReceiveDemo_Simple example, on a ESP to see what happens, and have tried 3 433MHz devices:

  1. DIGOO PIR DETECTOR
  2. DIGOO DOOR Sensor
  3. LOCK & UNLOCK keychain remote control

The remote controll is the only one that send only one "message" on a short key press, the other devices are sending multiple duplicate messages, maybe 10 duplicates, now I'm making the code to only send one message to my conttroller, not all duplicates.

But the main reason I opened this thread was that I found it weird that the door sensor, is only sending a code when the sensors are separated (door opened), BUT IT DOES NOT SEND ANOTHER CODE WHEN THE SENSORS ARE CLOSE ONE TO ANOTHER (door closed).

Are there other sensors that send a different code when the door/window is closed too ? For example, if the window was already opened when the system is armed, than this sensor is useless, I want to know if the door is closed or opened, not only when the door/window opens

Thank you.

sibianul:
But the main reason I opened this thread was that I found it weird that the door sensor, is only sending a code when the sensors are separated (door opened), BUT IT DOES NOT SEND ANOTHER CODE WHEN THE SENSORS ARE CLOSE ONE TO ANOTHER (door closed).

What does the spec say?

I'd say the reason is that an open door is worthy of an alert, but since it's supposed to be closed, that's not worth knowing: management by exception.

digital means two states. in your case, open or closed.
if you want a second signal,post a link to your device.
and your code (read how to use this forum to learn about code tags)

2. DG-HOSA Wireless Guarding Windows Doors Sensor

Voltage 3V Button Battery
(Already includes for your convenient using)
Under Voltage Monitoring 7.5 V+/-0.5V
Static Current <=10uA
Triggering Distance 25-35mm
Emission Current <=15mA
Emission Distance >=120 m (Open area)
Emission Frequency 433MHz
Working Temperature -10℃ ~50 ℃
Convenient Function Simply put it any please you want in your home :)
( such as door, window, drawer, wardrobe, bath etc)
When someone pass it by, DG-HOSA will ring

And here is the link, dthe spec are for device #2

"... supposed to be closed" if thinking about security the system shouldn't rely on the user, a security system should notify the user something is not as it should, and not suppose the user has closed the window/door.

Do you guys know if there is any 433MHz door sensor that sends a different code when the "contact is closed" ?

I have just started to play with 433MHz receiver a few hours ago, as I liked the idea that there are many ready made sensors, the PIR sensor works as expected, and now I fixed the duplicate issue (on one action, the same code was received multiple times), but the door sensor is not what I was looking for, if you guys know other sensors that send different codes for open and close, I will try them, if not, I think I will try to make a sensor using an ATTINY, to be able to power it by batteries, for a long time.

Bellow you can see the log of my controller, the first highlighted value is for the PIR sensor, the second is for an 433MHz remote control, that activates an 433MHz relay, now if the RECEIVE section is done, I want to pass over to TRANSMITTING codes trough 433MHz from ESP8266

sibianul:
a security system should notify the user something is not as it should

Quite

dave-in-nj:
digital means two states. in your case, open or closed.
if you want a second signal,post a link to your device.
and your code (read how to use this forum to learn about code tags)

I posted above a link to the DIGOO 433MHz Door Sensor , but as I see it, this sensor only transmits one state, the open state, which is not enough for my needs, if you know one the sends both states, please let me know :slight_smile:

One more application (where I need to know for sure if the contact is open or closed) is for the roof windows, I really want to know if any roof window is opened, it happen to us a few times to forget the windows opened, and a few hours later it started raining .. not a happy moment

sibianul:
but as I see it, this sensor only transmits one state, the open state,

Does it transmit the fact that it is open or that it became open?

And do you mean it actually sends a message (some pulse or sequence of) or does it only assert a line? (In which case, if it's not asserted, then it's closed and there's your other state.)

Of course, if it transmits when the door is closed (normal) power would be consumed, eventually killing a battery.
Transmitting when normal by multiple transmitters causes inter-frequency interference.

My expensive security system at the plant knows when a door is opened and when it is closed AFTER being opened. That is the same as you are asking for. Just remember that door was opened and then when the switch is closed, you know it HAD been opened. A status change.

Paul

We do not know what the actual sensor is. it may be a reed relay or a Hall sensor.

the device is obviously programed to do one thing, and only on thing. I would suspect that the "microcontroller" is a blob on a board.

you can get a dozen reed switches for $1 in case you want to make your own.

you can program a state change.

Paul_KD7HB:
My expensive security system at the plant knows when a door is opened and when it is closed AFTER being opened. That is the same as you are asking for. Just remember that door was opened and then when the switch is closed, you know it HAD been opened. A status change.

Paul

if you are doing your own, it would seem logical to have a door ID number, then a value of open and closed.
just transmit that after every status change

my rain gauge also send battery status.

I think the next question is
what is the lowest power RF to send the door status ?
these security devices run for years on one battery.
our office has dozens and we replace some of the batteries every year, but some last for many years.

In thinking about this, a mini 3.3v, RF module and a wake on pin-change
use a 2 reed switches, one goes high at the other goes low on each state change.
that way, there is no power used, except what is used in sleep mode.

makes me think you could have a pulse, change the state of a transistor, power the device, check pins, send RF information, then cuts it's own power. that what it is always dead, not even power in sleep mode.

but, as for the OP, I think you will find a pre-packaged sensor that can alert with both a door open and a door closed condition.

@LesserMole The sensor I have only sends one code when the door became open, but it does not send another code when the door is closed back.

This is why I asked, if you guys know what devices do send 2 different codes, one one door became open, and a different one when the door is closed back. It should not transmit constantly the fact that the door is closed, but each time the state of the internal reed switch is changed, it should notify the main station.

I opened up the sensor case so you guys can see the PCB, on the side there is the magnetic switch. There is also a button, now I'm searching to see if there are any documents or hacks I can make to it

When I see there are devices that are very cheap, I don't really want to make my own device, I only try to make them when devices / sensors I need are quite expensive and the arduino alternative would be much more cheaper

It’s a guess, but the reed switch is a power on switch.

Open (normal) = no power to the cctry.

I don't know if it's a power switch, maybe if the yellow button it's also a power switch, as in any condition of the reed switch (open or close) when pressing the yellow button, the red led lights up and the code is sent trough 433mhz transmitter

The circuit on the PCB is HS2303-PT

My guess is the PB is a tamper switch/power button.