The wireless temperature sensor and the wireless switch are both in a power saving "sleep" mode. This allows them save battery power and only wake up when they have something to send. The temperature sensor will wake up every 5 minutes and transmit the temperature and then go back to sleep. The wireless switch wakes up every time one of the two switches change state (open/close).
You can, however configure the sensor to be awake. This has the advantage that when the sensor is awake it can respond to requests from base station receiver. You can, for example, ask the sensor for a temperature reading, or check if the sensor is online and working. You can also re-configure the sensor when it is awake. All of these functions are implemented with a messaging protocol called LLAP which is a 12 character command that is sent to the sensor. You can find a full list of commands here : LLAP messages.
The process to wake-up your RF sensor is as follows:
1. Ensure you have the base station receiver connected to the Raspberry Pi
2. Connect to your Raspberry Pi using Putty from a PC workstation. You need to do this because you will need to send the 12 character command to the serial port. This is best achieved by copying and pasting the commands into the putty window. You won't be able to type the commands fast enough into the terminal window for them to be sent correctly to the sensor.
3. You will be using a serial port terminal program called miniterm to send commands to the serial port. At the command prompt type:
python miniterm.py /dev/ttyAMA0
This will take you into the terminal window. Anything you type will get sent to the serial port and transmitted to all the RF sensors from the base station receiver.
4. Power up the sensor you want to awaken. You should see something similar to Figure 1. It won't be exactly the same. The "a--" will be "a80" where 80 is the device id of your sensor. Now you know that you have miniterm running correctly and you can communicate with your sensors. You won't be able to send command to the sensor just yet, because it is still sleeping.
5. In order to awaken an XRF you need to solder a wire to pin 6 as shown in figure 2. The pin numbering starts from the tab labelled 1 and pin 6 is 6 pads down as shown the by red 6 in the picture.
Or if you have the following sensor then ground pin 1 of the SRF module as shown in the diagram below.
6. Connect the wire to GND and power up the sensor
7. The sensor will now be awake and you can send it commands. The first command you want to send is the awake command. Copy and paste the command below into the putty window (paste using right click on the mouse). Change the "80" to the number of the device you wish to awaken (copy the command into notepad change the number then copy and paste the command from notepad).
Next tell it to reboot:
8. The device is awake and now you can send it commands.
Request a temperature reading:
Request the firmware version:
Configure the device:
Connect to your Raspberry Pi using SSH and a program like Putty. The reason you do this is because you will need to send commends to the device from the terminal window and the best way to do it is by copy and pasting the commands into the window. Typing them work work because you likely wont be able to type them fast enough.
Example commands to configure a wireless switch and set the device ID to 82:
Example commands to configure a temperature sensor and set the device ID to 93:
Example commands to configure a relay switch and set the device ID to 82:
Example commands to switch a relay with an ID of 82 ON/OFF