Skip to content

Support for changing CC1101 Receive and Transmit Frequency#847

Merged
1technophile merged 8 commits into1technophile:developmentfrom
NorthernMan54:CC1101-Mhz
Jan 22, 2021
Merged

Support for changing CC1101 Receive and Transmit Frequency#847
1technophile merged 8 commits into1technophile:developmentfrom
NorthernMan54:CC1101-Mhz

Conversation

@NorthernMan54
Copy link
Collaborator

@NorthernMan54 NorthernMan54 commented Jan 17, 2021

Adds the following

1 - Adds a new field on received messages, the MHz of the message ( only visible when compiled for CC1101 ) “mhz”: 303

2 - Add a new message, to set receiver frequency ( optional, default to 433.92 ). Ie { “mhz”: 303.0 }

3 - Add a optional field to transmit message “mhz”

4 - after transmission of a message, the receiver will go back frequency specified in # 2

5 - at this time these changes would only work on the zgatewayrf module.

6 - If an issue occurs while parsing the JSON message an error is transmitted over Mqtt

Sample message to control a Hampton Bay Fan

{"value":1150,"protocol":6,"length":12,"delay":450,"repeat":8,"mhz":303.732}

To change receiver frequency

{"mhz":315.026}

Message Received from a GE Fan Remote on 315Mhz

{"value":4534142,"protocol":6,"length":26,"delay":356,"mhz":315.026}

Response to setting an invalid frequency

{'Status': 'Error'}

PS Two thumbs up on your usage of compiler definitions, makes customizing a build really easy

@1technophile
Copy link
Owner

Thanks for the PR, could you update the docs also please :
https://docs.openmqttgateway.com/use/rf.html#rcswitch-based-gateway

Copy link
Contributor

@Legion2 Legion2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Somfy module the frequency variable should also be used to reset frequency after transmision. Also do a search with an text editor to find all usages of CC1101_FREQUENCY.

@NorthernMan54
Copy link
Collaborator Author

@Legion2 'In the Somfy module the frequency variable should also be used to reset frequency after transmission'

I was looking at this and am thinking would need a global variable for this. Any other thoughts on how to share the value between modules?

@Legion2
Copy link
Contributor

Legion2 commented Jan 17, 2021

Yes, the value must be shared, I think the best place is the config_RF.h, which is already shared.

@NorthernMan54
Copy link
Collaborator Author

@Legion2 support for Somfy going back to the global receive frequency has been added. I don’t have the device so I can’t do a physical test, but the build worked. I also named the global variable receiveMhz as that made the most sense.

Any other comments or feedback?

@NorthernMan54 NorthernMan54 requested a review from Legion2 January 18, 2021 23:28
@1technophile 1technophile added this to the v0.9.6 milestone Jan 19, 2021
ELECHOUSE_cc1101.SpiStrobe(CC1101_SIDLE); // Idle receiver prior to
setting a new frequency
@1technophile
Copy link
Owner

Thanks guys

@1technophile 1technophile merged commit 25ea909 into 1technophile:development Jan 22, 2021
@NorthernMan54 NorthernMan54 deleted the CC1101-Mhz branch January 22, 2021 12:22
@NorthernMan54
Copy link
Collaborator Author

Tks very much gentlemen

1technophile pushed a commit that referenced this pull request Jan 26, 2021
1technophile pushed a commit that referenced this pull request May 29, 2021
* Update to SmartRC-CC1101-Driver-Lib@^2.5.4 and removal of workaround from #847

Tks to @LSatan workaround no longer needed
LSatan/SmartRC-CC1101-Driver-Lib#65

* Default to value as subject for rtl_433 and receiver switching

* Default to not publishing unparsed signals

* Fix for missing String for uint64_t

* Fix is only required when value a subject is defined and not PiLight

Co-authored-by: Northern Man <sgracey@Heisenberg.local>
h2zero pushed a commit to h2zero/OpenMQTTGateway that referenced this pull request May 30, 2021
* Update to SmartRC-CC1101-Driver-Lib@^2.5.4 and removal of workaround from 1technophile#847

Tks to @LSatan workaround no longer needed
LSatan/SmartRC-CC1101-Driver-Lib#65

* Default to value as subject for rtl_433 and receiver switching

* Default to not publishing unparsed signals

* Fix for missing String for uint64_t

* Fix is only required when value a subject is defined and not PiLight

Co-authored-by: Northern Man <sgracey@Heisenberg.local>
JeroenWiersma pushed a commit to JeroenWiersma/OpenMQTTGateway that referenced this pull request Oct 18, 2025
…ile#847)

* Support for changing CC1101 Receive and Transmit Frequency

* Docs

* Resolve feedback

* Update Somfy module to use Global receiveMhz

ELECHOUSE_cc1101.SpiStrobe(CC1101_SIDLE); // Idle receiver prior to
setting a new frequency
JeroenWiersma pushed a commit to JeroenWiersma/OpenMQTTGateway that referenced this pull request Oct 18, 2025
JeroenWiersma pushed a commit to JeroenWiersma/OpenMQTTGateway that referenced this pull request Oct 18, 2025
* Update to SmartRC-CC1101-Driver-Lib@^2.5.4 and removal of workaround from 1technophile#847

Tks to @LSatan workaround no longer needed
LSatan/SmartRC-CC1101-Driver-Lib#65

* Default to value as subject for rtl_433 and receiver switching

* Default to not publishing unparsed signals

* Fix for missing String for uint64_t

* Fix is only required when value a subject is defined and not PiLight

Co-authored-by: Northern Man <sgracey@Heisenberg.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants