If you need a signal both if the window was closed and opened you can buy this sensor:
https://www.aliexpress.com/item/Free-shipping-Wireless-window-and-door-magnetic-sensor-open-detector-1527-chips/32334214010.html
It is based on a 1527 Chip.
Open the rear cover and connect these pins with a solder point:

 
		
		
		
	Xander
@Xander
Best posts made by Xander
- 
    RE: wireless door / window sensorposted in Hardware
- 
    RE: How to know the node ids assigned by the mqtt gateway to the sensors?posted in Development@amitach I have the same setup and I use a MQTT-Client for testing: http://www.jensd.de/wordpress/ 
 You have to stop OpenHAB, because only one connection to the gateway is possible.
 Usage:- start client
- create a profile: Extras / Connection Profiles
- connect with this profile
- click button "Subscribe"
- choose "Topic" : # (see wildcards: http://mosquitto.org/man/mqtt-7.html )
- click button "Subscribe" (on the right from field "Topic"
 Now you see all messages from your sensor. 
- 
    RE: Someone Explain the Fields in send: 10-10-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:13.8posted in General Discussion10-10-0-0 | | | | | | | Id of Destination node | | ID of next node | Id of last node this message passed Id of sender node (origin) s = child-sensor-id, 255 für "interne" Messages c = message-type t = sub-type pt = payload-type (see MyMessage.h) l = length of payloadValues c,t,pt: see http://www.mysensors.org/download/serial_api_13 
- 
    RE: Data from MQTT Gateway not pushing to OpenHabposted in OpenHAB@Jransom2 Unless I'm very much mistaken there is no temperatur message in the lines after "Started!". 
 During the last day several users of OpenHAB / MQTT had a problem with the first connection. A good tool for debugging is the MQTT client from jerady.
 See my posting here: http://forum.mysensors.org/topic/953/how-to-know-the-node-ids-assigned-by-the-mqtt-gateway-to-the-sensors/
- 
    RE: In wall light switch node - Custom PCBposted in HardwareFor more than two switches see: http://www.gammon.com.au/forum/?id=11091 
 I would add a hardware debouncing (R/C) to avoid the problems mentioned in the article.
Latest posts made by Xander
- 
    RE: Double channel lora Gateway (UP/DOWN)posted in Hardware@alexsh1 Sorry you missunderstood. My post was only a hint to help riro2 with his LORA problem. The Libraries from the refered project are working fine for me. Thanks anyway! 
- 
    RE: Double channel lora Gateway (UP/DOWN)posted in HardwareI'm experementing with this Library / Project: 
 http://cpham.perso.univ-pau.fr/LORA/RPIgateway.html
 https://github.com/CongducPham/LowCostLoRaGw
 based on the Libelium Libraries.
 It is LORA-only (no LARAWAN). Thanks to the used arduPi-Libs there are the same soures for Arduino and Raspi.
 Originally only sensors are supported. I have changed the sources a bit to support both directions but with ONE Lora module. It shouldn't be difficult to use two modules.
- 
    RE: wireless door / window sensorposted in HardwareIf you need a signal both if the window was closed and opened you can buy this sensor: 
 https://www.aliexpress.com/item/Free-shipping-Wireless-window-and-door-magnetic-sensor-open-detector-1527-chips/32334214010.html
 It is based on a 1527 Chip.
 Open the rear cover and connect these pins with a solder point:
  
- 
    RE: In wall light switch node - Custom PCBposted in HardwareFor more than two switches see: http://www.gammon.com.au/forum/?id=11091 
 I would add a hardware debouncing (R/C) to avoid the problems mentioned in the article.
- 
    RE: Trouble sending message to Relay from Openhabposted in OpenHABIs there a Serial.begin in your Arduino Code? 
- 
    RE: Good-looking way to control dimmer?posted in General DiscussionYes, you need something to turn or to press. I would realize this with 2 parts: A MySensors device as "sensor" at the wall and another MySensors device as "actor" near the dimmer which controls the dimmer. Benefits: a better energy efficiency; no deal with 230V; ability to integrate a "controller software" like OpenHAB for further possibilities. 
- 
    RE: Good-looking way to control dimmer?posted in General DiscussionI wood choose a power supply with a PWM Dimm Input. Then you have only to handle with low Voltage (10V). To control the power supply you only need an arduino and an optocopler. 
 MeanWell Power Supplys: http://www.trcelectronics.com/Meanwell/power-supply-led-dimmable.shtml
 You have to choose one with the required power and with "constant voltage". The Aliexpess Part is a constant voltage supply too - I think. Chinese Sellers often don't know what they sell!
- 
    RE: battery level doesn't appear ?posted in Development"Battery Level" is a internal message. 
 See: http://www.mysensors.org/download/serial_api_15
 This means it is going to the gateway and nobody knows what the gateway is doing with it...
 Please correct me if I am wrong.
- 
    RE: Openhab issue: Error during the execution of rule 'Arduino sends to Openhab': 5posted in TroubleshootingI have not checked your code. But opening "{" and closing "}" brackets should have the same count. 
- 
    RE: Adding a light switch to Openhab/MQTT gatewayposted in OpenHABHello, 
 I'm using exact the same statement. In addition I have a mapping statement. Don't ask if this is necessary.
 My line:
 {mqtt=">[mysensor:MyMQTT/1/1/V_LIGHT:command:ON:1],>[mysensor:MyMQTT/1/1/V_LIGHT:command:OFF:0],<[mysensor:MyMQTT/1/1/V_LIGHT:command:MAP(1on0off.map)]"}The content of file 1on0off.map in folder /configurations/transform: 
 1=ON
 0=OFF