pimatic / rfcontroljs

nodejs modul with protocol support for different 433mhz switches and weather stations for the RFControl Arduino library.
GNU General Public License v3.0
49 stars 54 forks source link

PIR protocol created (validation phase with gulp is OK) #1

Closed Yves911 closed 9 years ago

sweetpi commented 9 years ago

Thanks, implemented support for it in pimatic-homeduino and published a new version.

Yves911 commented 9 years ago

@sweetpi thanks but maybe i did a mistake (in my commit) because : /pimatic-git/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/rfcontroljs/lib/protocols/pir1.js is not up to date (not in sync with rfcontroljs/src/protocols/pir1.coffee) it looks like that i didn't compile the source code to the js version...

sweetpi commented 9 years ago

No worries, I merged, updated and published it.

Yves911 commented 9 years ago

Nice, on my side i removed homeduino pimatic-homeduino from node_modules/ directory and added to my pimatic conf:

"devices": [
    {
      "id": "detecteurmouvements",
      "name": "Detecteur de mouvements",
      "class": "HomeduinoRFPir",
      "protocol": "pir1",
      "protocolOptions": {
        "resetTime": 50000
      }
    },

I can see in the log that the new protocol is taken in account:

09:35:09.431 [pimatic-homeduino] debug: data: "RF receive 334 1148 454 11832 0 0 0 0 01100110011201120112010101120110011201010112011203"
09:35:09.454 [pimatic-homeduino] debug: received: [ 334, 454, 1148, 11832 ] 02200220022102210221020202210220022102020221022103
09:35:09.481 [pimatic-homeduino] debug: data: "RF receive 373 1144 11872 0 0 0 0 0 01100110011001100110010101100110011001010110011002"
09:35:09.501 [pimatic-homeduino] debug: received: [ 373, 1144, 11872 ] 01100110011001100110010101100110011001010110011002
09:35:09.523 [pimatic-homeduino] debug: switch2:  { houseCode: 0, unitCode: 17, state: false }
09:35:09.544 [pimatic-homeduino] debug: switch3:  { houseCode: 0, unitCode: 17, state: false }
09:35:09.564 [pimatic-homeduino] debug: switch4:  { unit: 0, id: 17, state: false }
09:35:09.584 [pimatic-homeduino] debug: pir1:  { unit: 0, id: 17, presence: true }
09:35:09.632 [pimatic-homeduino] debug: data: "RF receive 371 1146 11820 0 0 0 0 0 01100110011001100110010101100110011001010110011002"
09:35:09.673 [pimatic-homeduino] debug: received: [ 371, 1146, 11820 ] 01100110011001100110010101100110011001010110011002
09:35:09.696 [pimatic-homeduino] debug: switch2:  { houseCode: 0, unitCode: 17, state: false }
09:35:09.715 [pimatic-homeduino] debug: switch3:  { houseCode: 0, unitCode: 17, state: false }
09:35:09.735 [pimatic-homeduino] debug: switch4:  { unit: 0, id: 17, state: false }
09:35:09.755 [pimatic-homeduino] debug: pir1:  { unit: 0, id: 17, presence: true }

But in the UI i only get the empty blue circle and no events is logged when i move in front of the sensor

sweetpi commented 9 years ago
"devices": [
    {
      "id": "detecteurmouvements",
      "name": "Detecteur de mouvements",
      "class": "HomeduinoRFPir",
      "protocol": "pir1",
      "protocolOptions": {
        "unit": 0,
        "id": 17
      },
      "resetTime": 6000
    },
Yves911 commented 9 years ago

Hehe much better with this config, problem solved !!!

sweetpi commented 9 years ago

nice :)