Hi @ll,
I’ve ordered some of these push buttons:
http://www.ebay.de/itm/Funk-Schalter-Lichtschalter-Funksender-Fernbedienung-Licht-Garage-Toreinfahrt-/111368004720
Powered with a single 27A battery.
No protocol matched, here my suggestion for protocol pir6:
module.exports = function(helper) {
var binaryToPulse, protocolInfo, pulsesToBinaryMapping;
pulsesToBinaryMapping = {
'10': '1',
'01': '0',
'02': ''
};
binaryToPulse = {
'0': '01',
'1': '10'
};
return protocolInfo = {
name: 'pir6',
type: 'pir',
values: {
id: {
type: "number"
},
presence: {
type: "boolean"
}
},
brands: [],
pulseLengths: [288, 864, 8964],
pulseCount: 50,
decodePulses: function(pulses) {
var binary, result;
binary = helper.map(pulses, pulsesToBinaryMapping);
return result = {
id: helper.binaryToNumber(binary, 2, 24),
presence: true
};
}
};
};
Debugs
Button 1
11:42:12debug [pimatic-homeduino]: pir6: { id: 6410630, presence: true }
11:42:12debug [pimatic-homeduino]: received: [ 288, 864, 8960 ] 01011010010101011010100110010101101001010101101002
11:42:12debug [pimatic-homeduino]: data: "RF receive 288 864 8960 0 0 0 0 0 01011010010101011010100110010101101001010101101002"
Button 2
11:43:38debug [pimatic-homeduino]: pir6: { id: 6410632, presence: true }
11:43:38debug [pimatic-homeduino]: received: [ 288, 864, 8968 ] 01011010010101011010100110010101101001010110010102
11:43:38debug [pimatic-homeduino]: data: "RF receive 288 864 8968 0 0 0 0 0 01011010010101011010100110010101101001010110010102"
Button 3
11:44:14debug [pimatic-homeduino]: pir6: { id: 6410640, presence: true }
11:44:14debug [pimatic-homeduino]: received: [ 284, 868, 8976 ] 01011010010101011010100110010101101001011001010102
11:44:14debug [pimatic-homeduino]: data: "RF receive 284 868 8976 0 0 0 0 0 01011010010101011010100110010101101001011001010102"
@mwittig Can you please transform the code and publish it? Thx!