De deurbel werkt op 433 Mhz.
2 pakketjes met daarin een unieke code en een melodie nummer worden verzonden bij het indrukken van de bel knop.
De bel bevat naast een knop voor bij de deur en een speaker voor binnen ook een compleet weerstation met buitensensor.
Het station is op het moment te koop bij de BVA Auctions veiling voor redelijk lage prijzen (heb 18 euro betaald incl. verzenden en alle kosten)
De buitensensor meet temperatuur en luchtvochtigheid en werkt 'out of the box' met plugin 8 (AlectoV1)

- Code: Selecteer alles
//#######################################################################################################
//#################################### Plugin-46 Plieger York doorbell #################################
//#######################################################################################################
/*********************************************************************************************\
* This plugin takes care of decoding the Plieger York Doorbell protocol
*
* Auteur : William Jansen
* Support : www.nodo-domotica.nl
* Datum : 7-1-2015
* Versie : 1.0
* Nodo productnummer : n.v.t. meegeleverd met Nodo code.
* Compatibiliteit : Vanaf Nodo build nummer ???
* Syntax : "AURIOL <Par1:Sensor ID>, <Par2:Basis Variabele>"
* License : The code below is free for any open source project when this header is included.
* Usage of any parts of this code in a commercial application is prohibited!
*********************************************************************************************
* Changelog: v1.0 initial release
*********************************************************************************************
* Technical Information:
* Decodes signals from a Plieger York Doorbell, (66 pulses, 32 bits, 433 MHz).
* Plieger Message Format:
* 0000000001010101 00000000 00011100 c2 0x1c
* 00000011 c3 0x03
* 11100000 c1 0xE0
* -------- 8 bits chime number (3 chimes, can be changed with a jumped on the transmitter)
* -------- 8 bits always 0
* ---------------- 16 bits code which can be changed with a button on the inside of the transmitter
*
* Note: The transmitter sends two times the same packet when the bell button is pressed
* Sample packet:
* ML/S=750/275, SL/S=725/250, Bits=100110011001100110011001100110010101010101010101010101101010010100, Type=MCS, Pulses=66,
* Pulses(uSec)=700,250,275,725,750,250,275,725,750,250,275,725,750,250,275,725,750,250,275,725,750,250,275,725,750,250,275,725,750,250,275,
* 725,275,725,275,725,275,725,275,725,275,725,275,725,275,725,275,725,275,725,275,725,275,725,750,250,750,250,750,250,275,725,275,725,225,
\*********************************************************************************************/
// ==================================================================================
#define PLUGIN_ID 47
#define PLUGIN_NAME "Plieger"
#define PLIEGER_PULSECOUNT 66
byte Plugin_047_ProtocolCheckID(byte checkID);
byte Plugin_047_ProtocolValidID[5];
byte Plugin_047_ProtocolVar[5];
boolean Plugin_047(byte function, struct NodoEventStruct *event, char *string)
{
boolean success=false;
switch(function)
{
#ifdef PLUGIN_047_CORE
case PLUGIN_RAWSIGNAL_IN:
{
if (RawSignal.Number != PLIEGER_PULSECOUNT) return false;
unsigned long bitstream=0;
byte rc=0;
int id=0;
byte chime=0;
byte basevar=0;
//==================================================================================
// get all 32 bits
for(byte x=1;x <=64;x+=2) {
if(RawSignal.Pulses[x]*RawSignal.Multiply > 400) {
bitstream = (bitstream << 1) | 0x1;
} else {
bitstream = (bitstream << 1);
}
}
//==================================================================================
// first perform two checks to validate the data
if (((bitstream >> 8) &0xff) != 0x00) return false; // these 8 bits are always 0
chime=bitstream &0xff;
if (chime != 0x1c && chime !=0x03 && chime != 0xE0) return false; // the chime number can only have 3 values
//==================================================================================
// Debug information block, comment out by placing // at the beginning of each line
Serial.print("Plieger York ID=");
id=(bitstream >> 16) & 0xffff; // get 16 bits unique address
Serial.print( id,HEX);
rc=id &0xff;
Serial.print(", Nodo device number=");
Serial.print( rc );
if (chime == 0xE0) chime =1;
if (chime == 0x1C) chime =2;
Serial.print(", Chime number=");
Serial.println( chime );
//==================================================================================
basevar = Plugin_047_ProtocolCheckID(rc);
event->Par1=rc;
event->Par2=basevar;
event->SourceUnit = 0; // Komt niet van een Nodo unit af, dus unit op nul zetten
event->Port = VALUE_SOURCE_RF;
event->Type = NODO_TYPE_PLUGIN_EVENT;
event->Command = 47; // Nummer van dit device
if (basevar == 0) return true;
//==================================================================================
// set user variable
UserVar[basevar-1] = chime; // Bell button pressed, chime number 1/2/3
RawSignal.Number=0; // do not process the packet any further
success = true; // processing successful
break;
}
case PLUGIN_COMMAND:
{
if ((event->Par2 > 0) && (Plugin_047_ProtocolCheckID(event->Par1) == 0))
{
for (byte x=0; x<5; x++)
{
if (Plugin_047_ProtocolValidID[x] == 0)
{
Plugin_047_ProtocolValidID[x] = event->Par1;
Plugin_047_ProtocolVar[x] = event->Par2;
success=true;
break;
}
}
}
break;
}
#endif // PLUGIN_047_CORE
#if NODO_MEGA
case PLUGIN_MMI_IN:
{
char *TempStr=(char*)malloc(INPUT_COMMAND_SIZE);
if(GetArgv(string,TempStr,1))
{
if(strcasecmp(TempStr,PLUGIN_NAME)==0)
{
if(event->Par1>0 && event->Par1<255 && event->Par2>0 && event->Par2<=USER_VARIABLES_MAX)
{
event->Type = NODO_TYPE_PLUGIN_COMMAND;
event->Command = 47; // Plugin nummer
success=true;
}
}
}
free(TempStr);
break;
}
case PLUGIN_MMI_OUT:
{
strcpy(string,PLUGIN_NAME); // Eerste argument=het commando deel
strcat(string," ");
strcat(string,int2str(event->Par1));
strcat(string,",");
strcat(string,int2str(event->Par2));
break;
}
#endif //NODO_MEGA
}
return success;
}
#ifdef PLUGIN_047_CORE
/*********************************************************************************************\
* Check for valid sensor ID
\*********************************************************************************************/
byte Plugin_047_ProtocolCheckID(byte checkID)
{
for (byte x=0; x<5; x++) if (Plugin_047_ProtocolValidID[x] == checkID) return Plugin_047_ProtocolVar[x];
return 0;
}
#endif //CORE