maxwellhadley / node-red-contrib-rfxcom

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

Sending RAW transmit command #117

Closed MPowerData closed 1 year ago

MPowerData commented 2 years ago

The supporting package node-rfxcom which node-red-contrib-rfxcom uses (and which I also maintain, and wrote a large part of) can support raw transmit packets. I will have a think about the best way to add this to node-red-contrib-rfxcom.

Hi all,

Does anyone know if the above is implemented and how to configure this in node-red?

I would like to do a RAW transmit command using the HEX key generated bu RFXmgr.

There is no other way to do this, as the RFX only recognize the undecoded command.

Thank you for the help!

MPowerData commented 2 years ago

Anyone?

@maxwellhadley , can you please let me know if this is possible?

maxwellhadley commented 2 years ago

I haven't had time to look at this yet, I've been too busy. It shouldn't be too difficult. Hopefully things will ease off a bit, so I can give it some more thought!

MPowerData commented 2 years ago

Thank you for your comment.

I will keep an eye on this issue, as it would be really great when this is possible...

MPowerData commented 2 years ago

Please let me know, if you need any additional input...

MPowerData commented 2 years ago

Hi @maxwellhadley, did you find any time to work on this?

maxwellhadley commented 1 year ago

I finally have a new rfx-raw-out node working, just a few more details to sort out. I hope to publish the new version in the next week or two

MPowerData commented 1 year ago

I finally have a new rfx-raw-out node working, just a few more details to sort out. I hope to publish the new version in the next week or two

Wow! That is great news! Please let me know if I can be of any help...

maxwellhadley commented 1 year ago

I have just published version 2.12.0 which adds a new rfx-raw-out node (but I forgot to mention it in the README!)

MPowerData commented 1 year ago

Hi Max, I am playing around with the new node, but I don't seem to get it working.

Below the output of a command I sent through the RFXmngr.

05/02/2023 08:43:26:004= RAW transmit command: AC 7F 00 03 07 20 8C 10 EA 01 85 02 7F 01 88 02 7C 01 82 06 96 01 8B 02 7D 01 8B 02 74 01 94 02 7E 01 7E 06 A6 01 80 02 96 01 8B 02 7F 01 87 02 88 01 78 06 9B 01 87 02 81 01 87 02 83 01 79 06 92 01 88 06 99 01 81 06 A4 01 8C 02 79 01 8F 02 92 01 76 02 82 01 86 02 81 01 86 02 79 01 8C 02 84 01 86 02 7F 01 7D 06 AE 01 85 02 76 01 8F 02 80 01 86 02 81 01 88 02 89 01 7C 02 7F 01 81 06 A8 01 7C 02 7F 01 88 02 A9 01 76 06 9F 01 77 06 A2 01 82 02 7B 01 85 06 98 01 8B 02 79 01 8E 02 7C 01 81 06 AA 01 77 02 7C 01 88 27 10

Packettype = RAW Packet Packet Length = 172 subtype = RAW packet Sequence nbr = 3 Repeat = 7 Nbr of pulses = 42 8332 4330 389 639 392 636 386 1686 395 637 395 628 404 638 382 1702 384 662 395 639 391 648 376 1691 391 641 391 643 377 1682 392 1689 385 1700 396 633 399 658 374 642 390 641 390 633 396 644 390 639 381 1710 389 630 399 640 390 641 392 649 380 639 385 1704 380 639 392 681 374 1695 375 1698 386 635 389 1688 395 633 398 636 385 1706 375 636 392 10000

How would I configure this in the node?

Can you maybe share some example config with me?

Thanks in advance!

maxwellhadley commented 1 year ago

Here's how it's done:

A simple flow:

image

I have configured the rfx-raw-out node like this:

image

Click on the pencil button at the side of the 'Devices' line to open the Device List editor. If you haven't created a device list, you will need to add a new one and give it a name:

image

Now click 'add new device', and enter a topic and payload of your choice which, when sent to the rfx-raw-out node, should send the raw data. I chose 'RAW/1' as the topic and 'Test' as the payload (note the topic must start with 'RAW/')

image

Now click on the pencil icon next to the 'Pulse Data' box. This opens an editor into which you can paste the (decimal) pulse time data from your example:

image

Now click OK, and set the number of repeats to 7 (you can see the start of the pulse data now shows in its box):

image

Click 'Update' and 'Done' and deploy the changed flow. Now, each time you send a message with topic RAW/1 and payload Test to the rfx-raw-out node, it will transmit the pattern. My flow copies the triggering message to the debug node:

image

If you have console debug enabled on the RFX device, you will see the message being queued, sent to the RFX, and acknowledged:

image

You can enter as many pulse patterns as you want in your Device List, so long as the Topic/Payload combination of each is unique.

I hope this helps!

MPowerData commented 1 year ago

Yes, this is great, thank you! I've got it working... :-)

Is there some way to capture the response ACK within nodered to confirm that the transmission was OK?

maxwellhadley commented 1 year ago

Yes, the nodes automatically check the acknowledgment. You will get a warning message if the response is anything other than OK. For instance, if you send a transmit packet type of a type that isn't supported by the hardware/frimware combination.

MPowerData commented 1 year ago

Yes, the nodes automatically check the acknowledgment. You will get a warning message if the response is anything other than OK. For instance, if you send a transmit packet type of a type that isn't supported by the hardware/frimware combination.

Great, thanks again for your support!