Cheap 433MHz door sensor (with open and close)

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
JelteV
Posts: 21
Joined: Wednesday 04 January 2017 20:55
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Cheap 433MHz door sensor (with open and close)

Post by JelteV » Sunday 03 September 2017 20:12

Hi,

So I don't know if this is special or not but I found these cheap Door sensor that look great, are really cheap (<€ 5,-) and send an open and close signal.
https://www.aliexpress.com/item/433MHz- ... 91010.html
IMG_4198.JPG
IMG_4198.JPG (32.29 KiB) Viewed 1117 times

I thought I would share how to set them up in Domoticz.

So first this sensor has to be picked up by Domoticz. If you have an RFXCOM you need to enable the Lightning 4 mode.
As soon as this is enabled your sensor will show up in your list of (unused) devices as 2 devices with the same ID.
One device will be triggered when the door is opened, one will be triggered when the door is closed.

You need to find out which device is triggered when. You can find out by triggering each event. First move the contact away from the base, this will simulate opening the door. The "last seen" time of that device will change.
Rename that device. Let's call it "Front door open (event)".
Now move the contact back to the base. If you did it correct "last seen" time of the other device will change.
Rename that device. Let's call that "Front door close (event)".

And add them both as switches in Domoticz.
Both devices will be always on, you can't switch them off. To know the state of the door we need to add a new dummy switch.
Add a new dummy door contact and call it "Front door (Virtual)".

To know the state of the door we need to add 2 small scripts.
One when the door is opened and one when closed.
Here they are:
Spoiler: show
Door open :

Code: Select all

return {
	active = true, -- set to false to disable this script
	on = {
		devices = {
			'Front door open (event)',
		},
	},
	-- in case of a timer event or security event, device == nil
	execute = function(domoticz, device)
		if (device.changed) then
			domoticz.devices('Front door (Virtual)').open()
		end
	end
}
Door close :

Code: Select all

return {
	active = true, -- set to false to disable this script
	on = {
		devices = {
			'Front door close (event)' 
		},
	},
       -- in case of a timer event or security event, device == nil
	execute = function(domoticz, device)
		if (device.changed) then
			domoticz.devices('Front door (Virtual)').close()
		end
	end
}
There you have it.
A working 433MHz door contact in Domoticz with an open and close for less then € 5,-!
Now you always know the state of your door or window.
Last edited by JelteV on Monday 04 September 2017 9:39, edited 1 time in total.

aleph0
Posts: 41
Joined: Thursday 12 May 2016 15:47
Target OS: Linux
Domoticz version: 3.8005
Location: South of France
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by aleph0 » Monday 04 September 2017 3:39

Thanks you very much for this info :) I've been looking for something like that for a long time :)

Rolo
Posts: 55
Joined: Sunday 27 December 2015 20:19
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: The Netherlands
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by Rolo » Sunday 10 September 2017 9:10

Can you tell wich type of battery is used in this switch?

User avatar
sincze
Posts: 719
Joined: Monday 02 June 2014 22:46
Target OS: Linux
Domoticz version: 3.8153
Location: Netherlands
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by sincze » Sunday 10 September 2017 11:31

Nice find. Even open/close. Well design looks also okay. Next stop will be their motion sensors right??
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

SweetPants
Posts: 1583
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8742
Location: The Netherlands
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by SweetPants » Sunday 10 September 2017 11:32

Rolo wrote:
Sunday 10 September 2017 9:10
Can you tell wich type of battery is used in this switch?
If you follow the link in the first post it says:
Power Supply:DC 12V(12V 23A battery)

Jem101
Posts: 43
Joined: Saturday 02 May 2015 21:26
Target OS: Raspberry Pi
Domoticz version: beta
Location: London, UK
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by Jem101 » Sunday 10 September 2017 13:00

SweetPants wrote:
Sunday 10 September 2017 11:32
Rolo wrote:
Sunday 10 September 2017 9:10
Can you tell wich type of battery is used in this switch?
If you follow the link in the first post it says:
Power Supply:DC 12V(12V 23A battery)
Yes it does say that but it must be a misprint somewhere - a battery that can supply 23A at 12 V is a car battery! I suspect, looking at the other similar products, that it'll be something like a CR2032 button-type cell.

SweetPants
Posts: 1583
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.8742
Location: The Netherlands
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by SweetPants » Sunday 10 September 2017 13:44

23 A is the battery type http://www.toolstation.nl/shop/p92000?c ... gIvJ_D_BwE
very common type is chinese sensors. They are a little expensive in use

Jem101
Posts: 43
Joined: Saturday 02 May 2015 21:26
Target OS: Raspberry Pi
Domoticz version: beta
Location: London, UK
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by Jem101 » Sunday 10 September 2017 14:19

SweetPants wrote:
Sunday 10 September 2017 13:44
23 A is the battery type http://www.toolstation.nl/shop/p92000?c ... gIvJ_D_BwE
very common type is chinese sensors. They are a little expensive in use
Ah I didn't know that - I stand corrected!

DzJan
Posts: 3
Joined: Wednesday 04 October 2017 21:57
Target OS: NAS (Synology & others)
Domoticz version: 3.8153
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by DzJan » Wednesday 04 October 2017 22:13

Confirmed, the mentioned solution here is the best one found sofar.
A method using master/slave does do the open/close toggle but it is not logging the state in the switch' log.

Tips:
  • When successful implemented, set the devices "Front door open (event)" and "Front door close (event)" as hidden via Setup -> More options -> Plans -> Roomplan. Select the line $Hidden Devices and Add the two devices.
Synology NAS DS411+
Mega 2560 PRO, Mini RFLink R47

BartSr
Posts: 11
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by BartSr » Thursday 12 October 2017 7:48

Maybe this might be helpfull.
I found this instruction which clearly explains how to.
https://www.youtube.com/watch?v=Oq-hN-RJ2sA

Milifax
Posts: 72
Joined: Friday 23 June 2017 9:27
Target OS: Raspberry Pi
Domoticz version: v3.8094
Location: The Netherlands
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by Milifax » Thursday 12 October 2017 11:08

BartSr wrote:
Thursday 12 October 2017 7:48
Maybe this might be helpfull.
I found this instruction which clearly explains how to.
https://www.youtube.com/watch?v=Oq-hN-RJ2sA
My advice: don't use the master/slave option. It will save you a lot of trouble if you skip that part. Just add then as on or off devices.

See my struggle in a previous post:
viewtopic.php?f=59&t=18654

BartSr
Posts: 11
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by BartSr » Friday 13 October 2017 10:51

@Milifax: Thanks for pointing me to the unwanted side effect.
I just started with Domoticz and have (not yet) experience with the scripts which drove you crazy using this solution.
-Bart

BartSr
Posts: 11
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by BartSr » Friday 13 October 2017 11:20

In addition: Is it normal that it takes (variable) 2 - 5 seconds before a change of the status is reflected in the GUI?

MarnixO
Posts: 4
Joined: Sunday 24 September 2017 12:02
Target OS: NAS (Synology & others)
Domoticz version: V3.8153
Location: Destelbergen Belgium
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by MarnixO » Saturday 28 October 2017 10:01

Hi all
i have received the door sensors yesterday
With 1.5 volt battery included
they are recognized like a X10 security sensor by rfxcom
it has 3 states Alarm, Motion and Normal
the state normal can be trigered by the dashboard but not by actuating the sensor itself
so i wrote a dzvents script to change the state of the dummy doorsensor

json output:

{
ActTime: 1509176885,
ServerTime: "2017-10-28 09:48:05",
Sunrise: "08:31",
Sunset: "18:25",
result: [
{
AddjMulti: 1,
AddjMulti2: 1,
AddjValue: 0,
AddjValue2: 0,
BatteryLevel: 0,
CustomImage: 0,
Data: "Motion",
Description: "",
Favorite: 0,
HardwareID: 3,
HardwareName: "RFX",
HardwareType: "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
HardwareTypeVal: 1,
HaveDimmer: false,
HaveGroupCmd: false,
HaveTimeout: false,
ID: "618000",
LastUpdate: "2017-10-28 09:29:07",
MaxDimLevel: 0,
Name: "deursensor 103",
Notifications: "false",
PlanID: "1",
PlanIDs: [
1
],
Protected: false,
ShowNotifications: true,
SignalLevel: 7,
Status: "Motion",
StrParam1: "",
StrParam2: "",
SubType: "X10 security",
SwitchType: "Security",
SwitchTypeVal: 0,
Timers: "false",
Type: "Security",
TypeImg: "security",
Unit: 0,
Used: 1,
XOffset: "0",
YOffset: "0",
idx: "103"
}
],
status: "OK",
title: "Devices"
}

Is there also an other way ?

miremi
Posts: 9
Joined: Sunday 08 November 2015 11:08
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by miremi » Saturday 28 October 2017 11:54

If i follow link from the first post item is not available anymore.

BartSr
Posts: 11
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by BartSr » Saturday 28 October 2017 12:24

Similar (or maybe slightly differrent) type are availbale on other chinese web-shops.
e.g. https://www.banggood.com/GS-WDS07-Wirel ... mds=search

miremi
Posts: 9
Joined: Sunday 08 November 2015 11:08
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by miremi » Saturday 28 October 2017 19:36

BartSr wrote:
Saturday 28 October 2017 12:24
Similar (or maybe slightly differrent) type are availbale on other chinese web-shops.
e.g. https://www.banggood.com/GS-WDS07-Wirel ... mds=search
Thank you

Jordy
Posts: 9
Joined: Tuesday 21 February 2017 11:00
Target OS: Raspberry Pi
Domoticz version:
Location: NL
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by Jordy » Wednesday 01 November 2017 22:34

These sensor are giving my quite a headache. Trying to figure them out via lua scripts. But as said, the status of the sensor stays ON. I'm not quite sure why it's like this.

I've followed the video linked above and once added, the dashboard shows the status correctly (Open or Closed, configured as Door Contact). But if you check the logs, it's always ON. I guess internally it's keeping the correct value. I just wonder why I can't get that internal value. It seems a bit vague to use a virtual sensor just to track the open & close status of the sensor.

The ones I ordered are: https://aliexpress.com/item/5pcs-lot-43 ... 22065.html

I guess I'll also implement a virtual sensor just to track the state.

JelteV
Posts: 21
Joined: Wednesday 04 January 2017 20:55
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Cheap 433MHz door sensor (with open and close)

Post by JelteV » Wednesday 15 November 2017 23:24

You have to create a virtual doorsensor. For some reason they are always on..
Just follow the steps in the fp.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests