pimatic / pimatic-homeduino

Pimatic plugin for using 433mhz devices and sensors with a connected Arduino with homeduino sketch
https://pimatic.org/
GNU General Public License v2.0
37 stars 29 forks source link

china type bbq thermometer #64

Closed Flop2006 closed 7 years ago

Flop2006 commented 8 years ago

Following protocol does work for this bbq thermometer: http://www.ebay.de/itm/262116800749 Maybe someone can merge it in the master.

module.exports = function(helper) {
  var protocolInfo, pulsesToBinaryMapping;
  pulsesToBinaryMapping = {
    '01': '0',
    '02': '1',
    '03': ''
  };
  return protocolInfo = {
    name: 'weather17',
    type: 'weather',
    values: {
      temperature: {
        type: "number"
      },
      id: {
        type: "number"
      },
      channel: {
        type: "number"
      },
    },
    brands: ["BBQ Thermometer"],
    pulseLengths: [548, 1008, 1996, 3936],
    pulseCount: 66,
    decodePulses: function(pulses) {
     /*
      Pulse like:
      |020202010101|0101|01010101010101020101010102010201|0201010102010202|03|
      | 1 1 1 0 0 0| 0 0| 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0| 1 0 0 0 1 0 1 1|  |
      |ID          | CH |            Temperature         |?               |  |
      |56          |  1 |            266(26.6)           |?               |  |
    */
      var binary, result;
      binary = helper.map(pulses, pulsesToBinaryMapping);
      return result = {
        id: helper.binaryToNumber(binary, 0, 5),
        temperature: helper.binaryToSignedNumber(binary, 8, 23) / 10,
        channel: helper.binaryToNumber(binary, 6, 7) + 1,
      };
    }
  };
};
Flop2006 commented 7 years ago

The "Landmann Funkthermometer Selection" seems the same: https://www.amazon.de/Landmann-Funkthermometer-Selection-Silber-12/dp/B00H96QFK2

Flop2006 commented 7 years ago

Released with pimatic-homeduino@0.9.10