@AvdH
Test these files:
controller.js
alarm2.js
Use a button to display an alarm or to send an alarm to the detecor.
[Solved] FA21RF Smoke detector - alarm2
@AvdH
Test these files:
controller.js
alarm2.js
Use a button to display an alarm or to send an alarm to the detecor.
@Willy Sorry this is new to me.
Where do I have to put these files (controller.js and alarm2.js)
Stop pimatic
Copy “alarm2.js” to "/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/rfcontroljs/lib/protocols"
Insert , ‘alarm2’ at the end of line 6 in “/home/pi/pimatic-app/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/rfcontroljs/lib/controller.js” ":
Before (the protocol names can differ!):
....... 'shutter2', 'shutter3', 'shutter4'];
After insertion:
....... 'shutter2', 'shutter3', 'shutter4', 'alarm2'];
Start pimatic
@Willy
It works (for the first detector). Will try the other 2 later. But I don’t think that’s going to be a problem.
The package stated that is was compatible with FA20RF so I assumed it was using the same protocol. Sorry for the inconvenience.
Many thanks! I ow you a bear. You rock!
… Will have to learn to make this type of adjustments myself someday. My C, C++, Java, JavaScript is ok. But I have a really hard time with the coffee scripting. Guess as an old veteran I’m just too much stuck on the () / {} etc.
@AvdH
Thanks
Will mark it as solved but will appreciate a short update of the other two devices.
Hi @Willy Here is the update of the other two devices.
I tested the other 2 devices and it works well. Funny thing is that the first device I tested (of course the first one) is only recognised as a alarm2 protocol, but the other 2 devices are recognised as a alarm1 and a alarm2 protocol.
Device 1
debug [pimatic-homeduino]: received: [ 806, 1375, 2710, 8114, 13864, 22504 ] 30020101010201020202010101010101020101010102010101043002010101020102020201010101010102010101010201010105
13:02:22debug [pimatic-homeduino]: data: "RF receive 8114 806 2710 1375 13864 22504 0 0 01121313131213121212131313131313121313131312131313140112131313121312121213131313131312131313131213131315"
13:02:22debug [pimatic-homeduino]: alarm2: { id: 9142536, state: true }
13:02:22debug [pimatic-homeduino]: received: [ 806, 1375, 2711, 8108, 21840 ] 3002010101020102020201010101010102010101010201010104
13:02:22debug [pimatic-homeduino]: data: "RF receive 8108 806 2711 1375 21840 0 0 0 0112131313121312121213131313131312131313131213131314
Device 2
debug [pimatic-homeduino]: received: [ 806, 1378, 2706, 8189, 17052 ] 30010202010101010102010102010102020202010102010202033001020201010101010201010201010202020201010201020204
13:03:02debug [pimatic-homeduino]: data: "RF receive 8189 806 1378 2706 17052 0 0 0 01121313121212121213121213121213131313121213121313100112131312121212121312121312121313131312121312131314"
13:03:01debug [pimatic-homeduino]: alarm2: { id: 6329291, state: true }
13:03:01debug [pimatic-homeduino]: alarm1: { id: 6329291, state: true }
13:03:01debug [pimatic-homeduino]: received: [ 806, 1379, 2706, 8100, 17476 ] 3001020201010101010201010201010202020201010201020204
13:03:01debug [pimatic-homeduino]: data: "RF receive 8100 806 1379 2706 17476 0 0 0 0112131312121212121312121312121313131312121312131314"
Device 3
debug [pimatic-homeduino]: received: [ 806, 1378, 2704, 8114, 12160, 21416 ] 30010101010102020202010101010102010201010101010202043001010101010202020201010101010201020101010101020205
13:04:10debug [pimatic-homeduino]: data: "RF receive 8114 806 1378 2704 12160 21416 0 0 01121212121213131313121212121213121312121212121313140112121212121313131312121212121312131212121212131315"
13:04:10debug [pimatic-homeduino]: alarm2: { id: 492163, state: true }
13:04:10debug [pimatic-homeduino]: alarm1: { id: 492163, state: true }
13:04:10debug [pimatic-homeduino]: received: [ 798, 1387, 2711, 8096, 21300 ] 3001010101010202020201010101010201020101010101020204
13:04:10debug [pimatic-homeduino]: data: "RF receive 8096 798 1387 2711 21300 0 0 0 0112121212121313131312121212121312131212121212131314"
The smoke detectors can be configured as a group. For this one of them has to be configured as master and the other ones as slave. Then only the id of the master is received by pimatic but all three of the devices make (a hell of a) noise. Guess this way you could even trigger (switch on) the device from within pimatic.
Hi @AvdH ,
test it with a switch:
{
"id": "alarm1",
"name": "Alarm1",
"class": "HomeduinoRFSwitch",
"protocols": [
{
"name": "alarm2",
"options": {
"id": 9142536
}
}
]
},
Now you should see the state of the alarm and can emit an alarm by switching it on ( and off if it’s to loud )
Hi @Willy
I tried the setup, but switching the device on in pimatic does not sound the alarm.
If i switch the device on (with the test button, not by starting a fire in the attic ) the device is switched on in pimatic. I have to manually set the switch to Off again.
@AvdH
Try the switch with the alarm1 protocol. If you can switch on the alarm, we can use a multiprotocol switch. alarm2 for receiving and alarm1 for sending.
Then you can set a rule which switches the switch off after 5 seconds.
@Willy
It works when I set it to alarm1 I can switch it on and off from pimatic. But for receiving the alarm into pimatic I have to use the alarm2 protocol.
Funny thing is that the other 2 devices (same make, bought at the same time) work both ways (sending from pimatic, and receiving from sensor) with the alarm1 protocol.
Ok so i habe to make the first one a multi protocol switch and set the other 2 to alarm1 protocol.
Thanks man.