I recently entered the world of Arduino, and would like to say 'hello world'
And I do have a question, of course..
I'm trying to receive a (encrypted?) signal from a AMST-606 KlikAanKlikUit window/door sensor. When using ShowReceivedCode to display the code send from the AMST I only see output when the sensors sends a 'closed' signal. When the window is opened, the sensor should send a 'open' signal. Unfortunately I cannot detect this signal. Is it possible that the signal is encrypted? How will I be able to detect this signal, if encrypted?
Serial.print("address ");
      Serial.print(receivedCode.address);
      Serial.print(" unit");
      Serial.print(receivedCode.unit);
      Serial.print(" period");
      Serial.print(receivedCode.period);
      Serial.print(" switchtype");
      Serial.print(receivedCode.switchType);
Output from sensor when window is open and then closed:
address 12511618 unit9 period333 switchtype0 address 12511618 unit9 period333 switchtype0
What library are you using to receive the messages? Where did you get the library? Is your sketch an example that comes with the library? If there is more than one example, which example are you using?
I'm using the example sketch "ShowReceivedCode" from "NewRemoteSwitch". The sketch uses library NewRemoteReceiver.h
As far as I know the library and example sketch came from the same source.
Just to be clear: I do receive some code send from the sensor, but only when I close the window; not while opening the window.
/*
* Demo for RF remote switch receiver.
* This example is for the new KaKu / Home Easy type of remotes!
* For details, see NewRemoteReceiver.h!
*
* This sketch shows the received signals on the serial port.
* Connect the receiver to digital pin 2.
*/
#include <NewRemoteReceiver.h>
void setup() {
 Serial.begin(115200);
Â
 // Initialize receiver on interrupt 0 (= digital pin 2), calls the callback "showCode"
 // after 2 identical codes have been received in a row. (thus, keep the button pressed
 // for a moment)
 //
 // See the interrupt-parameter of attachInterrupt for possible values (and pins)
 // to connect the receiver.
 NewRemoteReceiver::init(0, 2, showCode);
}
void loop() {
}
// Callback function is called only when a valid code is received.
void showCode(NewRemoteCode receivedCode) {
 // Note: interrupts are disabled. You can re-enable them if needed.
Â
 // Print the received code.
 Serial.print("Addr ");
 Serial.print(receivedCode.address);
Â
 if (receivedCode.groupBit) {
  Serial.print(" group");
 } else {
  Serial.print(" unit ");
  Serial.print(receivedCode.unit);
 }
Â
 switch (receivedCode.switchType) {
  case 0:
   Serial.print(" off");
   break;
  case 1:
   Serial.print(" on");
   break;
  case 2:
   Serial.print(" dim level");
   Serial.print(receivedCode.dimLevel);
   break;
 }
Â
 Serial.print(", period: ");
 Serial.print(receivedCode.period);
 Serial.println("us.");
}