Closed hunterparks closed 1 year ago
same problem!
it's ok even with 434 Mhz, 315 Mhz is not able to be learned
I have the same issue. RF signals on the 315 Mhz band are not getting picked up by the this plugin. They are getting picked up by the Broadlink app when specifying to scan on the 315 Mhz band.
Looking at the code it might be because the timeout is too short between frequency lookup? 1000ms?
Which file are you looking at?
learnRFData.js
I'm no engineer, just a graphic technical artist working usually in Python so I might not get the whole idea. That being said, I just tested with my 315 Mhz garage door opener and kept pressing the button on it without success. It does go into device.enterRFSweep() as the Broadlink light turns amber.
This is what my log outputs:
[INFO] Scan RF (scanning) [ACTION] Hold down the button that sends the RF frequency. [INFO] Scan RF (stopped - 60s timeout)
The amber light stays on about 30-40 seconds, before the 60s timeout.
If you're comfortable with Python you could always use this project to learn the codes: https://github.com/mjg59/python-broadlink. They use the same format(s) we save them in so you can just copy/paste them into your config.
Even using Python it doesn't pick up the code. Maybe I'm using this wrong? Very crude Python code below just to test.
import broadlink
import time
device = broadlink.hello('192.168.1.22')
device.auth()
device.sweep_frequency()
time.sleep(5)
device.find_rf_packet()
packet = device.check_data()
>> broadlink.exceptions.StorageError: [Errno -5] The device storage is full
What is the difference between sweep_frequency() and find_rf_packet()? How do they work together? Is there a different "check_frequency" code for the 315 and 433 Mhz band?
Hi, same here from my side. While The Broadlink App is able to get the remote signal, the plugin won't. Any idea on how to obtain the required hex code anyways? When I use the learn feature from the AppleHome it runs into timeout even though the broadlink is showing his amber light.
I would really much appreciate if there is a fix :-)
Thanks for the plugin kiwi-cam. great job! Best regards ans stay safe Michael
Edit* This plugin supports actions on other frequencies. It just doesn’t support finding hex codes from other frequencies.
If someone is still looking for a way to find hex codes for different frequencies I found a solution using a fork of the above mentioned python package. This works by the way to find the hex codes for my fireplace which uses 305MHz.
1.) uninstall python-broadlink
if you already have it installed.
2.) clone this fork: https://github.com/DarkStarSword/python-broadlink/tree/dev Note* use dev branch.
3.) in the root directory run python setup.py install
to install this version.
4.) run my little script (sorry not the prettiest but works) while holding the button down you wish to learn. Eventually it'll nab it and print it to your console. (This assumes Python >=3.7).
import argparse
import time
import broadlink
def main(ip_address: str, frequency: float) -> None:
timeout = 60
device = broadlink.hello(ip_address)
device.auth()
print("Sweeping frequencies...")
device.sweep_frequency()
time.sleep(2)
device.find_rf_packet(frequency=frequency)
time.sleep(2)
search = True
tick = 0
while search:
if tick == timeout:
device.cancel_sweep_frequency()
break
try:
print(device.check_data().hex())
search = False
except KeyboardInterrupt:
print("Cancel Sweep Frequency")
device.cancel_sweep_frequency()
search = False
except broadlink.exceptions.StorageError:
print("Storage full error trying again...")
time.sleep(1)
tick += 1
device.cancel_sweep_frequency()
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("ip_address")
parser.add_argument("--frequency", nargs="?", type=float, const=433.92)
args = parser.parse_args()
main(ip_address=args.ip_address, frequency=args.frequency)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I had same problem learning the RF signal until I pressed and released several time when the instruction is asking me to hold it.
I am still having this problem. Is there any known solution?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bumping this issue, have tried many workarounds but still unable to pair a 315mhz device.
bumping this again as this is a huge issue preventing the use of this tool with HomeKit
I've added some notes on this issue to the documentation: https://broadlink.kiwicam.nz/#RFScanIssue. Hopefully it helps people out till we can get this sorted.
same
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@kiwi-cam I had to add a new RF device recently and came up with a better solution to learning frequencies. I hope this helps everyone. It's been a reproducible process for myself. I was able to easily learn a device that broadcasted on 318.000MHz.
$ pip install broadlink
SUPPORTED_TYPES
constant. You may need to try different addresses.$ ./broadlink_cli --device "0xNNNN LOCAL_IP_ADDRESS MAC_ADDRESS" --rfscanlearn
a. Long press your RF device button you'd like to learn
b. Wait for prompt in your console to continue
c. SHORT press the RF device button again
d. Marvel in your HEX code appear in your console
Describe the bug When attempting to scan for RF devices, I am unable to get any data from a 315 MHz remote. The RF scanning works flawlessly for 433 MHz remotes, however.
To Reproduce
Expected behavior With the Broadlink RM4 Pro that I have with both 315 MHz and 433 MHz radios, I would expect to be able to learn and control devices in both frequency ranges.
Screenshots N/A
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context N/A