maxwellhadley / node-red-contrib-rfxcom

node-RED nodes to access an RFXtrx433 transceiver
BSD 2-Clause "Simplified" License
22 stars 13 forks source link

Support for 1by one doorbell #42

Closed mikebiddell closed 6 years ago

mikebiddell commented 6 years ago

Max

Not sure whether this doorbell is supported by your node?? It is recognised in RFXcom manager and firmware version 1024, as SelectPlus, but I can't seem to persuade it to work in node using the doorbell input or output. Any info would be gratefully received.

Mike

maxwellhadley commented 6 years ago

It should be supported OK, I'm not sure what the problem might be.

Please can you try running Node-RED with rfxcom debug enabled, and send me the console output covering a few doorbell presses? To enable rfxcom debug, stop Node-RED, set the environment variable RED_DEBUG=rfxcom and restart it. It's easiest if you run as a normal user, so the console output will go to the terminal.

In debug mode it will dump the bytes received when the doorbell is pressed. I can use these to simulate a bell push and see why it isn't generating a message for you!

mikebiddell commented 6 years ago

Ok Max

will do.... the RFXcom manual says it conforms to Byron_sx format, which is what I used.

I set the doorbell transmit topic to byron_sx/008EA0 and the payload is empty.

It gives an "outside valid range " error with console output of:-

7 Mar 15:21:31 - [warn] [rfx-doorbell-out:d1dc588a.156ca8] Error: Device ID 0x8ea0 outside valid range at Function.deviceIdError (/root/userdir/node_modules/node-red-contrib-rfxcom/node_modules/rfxcom/lib/transmitter.js:77:15) at Chime1._splitDeviceId (/root/userdir/node_modules/node-red-contrib-rfxcom/node_modules/rfxcom/lib/chime1.js:47:25) at Chime1._sendCommand (/root/userdir/node_modules/node-red-contrib-rfxcom/node_modules/rfxcom/lib/chime1.js:55:29) at Chime1.chime (/root/userdir/node_modules/node-red-contrib-rfxcom/node_modules/rfxcom/lib/chime1.js:72:21) at parseCommand (/root/userdir/node_modules/node-red-contrib-rfxcom/rfxcom.js:1265:60) at RfxDoorbellOutNode. (/root/userdir/node_modules/node-red-contrib-rfxcom/rfxcom.js:1304:29) at emitOne (events.js:96:13) at RfxDoorbellOutNode.emit (events.js:188:7) at RfxDoorbellOutNode.Node.receive (/root/thethingbox/node_modules/node-red/red/runtime/nodes/Node.js:218:14) at InjectNode.Node.send (/root/thethingbox/node_modules/node-red/red/runtime/nodes/Node.js:140:22)

maxwellhadley commented 6 years ago

I think the user manual is not quite right - the SelectPlus is the same format as Byron SX but it allows a wider range of addresses - the Byron SX only goes up to 0xff. Try SELECT_PLUS/0x008EA0

There is some ambiguity in the SDK documentation. It isn't clear if the maximum address is 0x3fff or 0x3fffff. My code checks for the larger value so it should work with the address you have. Can you receive messages from the doorbell button?

mikebiddell commented 6 years ago

Max

yup

That works.... many thanks.

There is nothing from receive though ?????

maxwellhadley commented 6 years ago

A silly question but - are you sure that Byron SX protocol receive is enabled in your RFXtrx433E? Use RFXMGR to check, and enable it if it isn't (remember to save the settings to EEPROM if you do change it)

mikebiddell commented 6 years ago

Cheers max

I was only really after TX to activate the chime, but it would be nice to have it all. So you have solved my problem and I'll look at RX tomorrow as you suggest and report back.

Mike

mikebiddell commented 6 years ago

Max

Apparently, your question is not too silly. Used RFXMGR to enable and save Byron SX. Had to repeat that twice (the first time didn't work??) and off it went.

Many thanks

Mike

maxwellhadley commented 6 years ago

I'm happy I can now ring your bell!

Incidentally, there are now scripts included in node-rfxcom to help find the right port name for the RFXtrx433E, and to control the set of enabled protocols, so users on Linux & Mac don't need to have a Windows system to change things. Information here (at the bottom of the document). These scripts should work from the installation directory of node-red-contrib-rfxcom (the one with package.json)

mikebiddell commented 6 years ago

Max ... it's all good stuff. My house is all 433 controlled by your node (all PT2262, except this bell).

I 'pressed' the bell push into service as a panic button. Using google home notify, when pressed up in the bedroom, google home downstairs announces they should leave immediately and that the police have been notified and their picture taken and then it sets the burglar alarm off. Not too shabby for a £6 bell. The bell receiver augments my drive radar warning. Happy days.

Mike