forked from merbanan/rtl_433
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hopping hack to sit on Freq1 for time and hop on success for Freq2
- Loading branch information
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
390b5c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Howdy, First thanks a bunch for sharing this code. I think it's just what I need to help with my rtl readings (skipped hours in Home Assistant now and again).
I maybe wrong but it looks like this same code is now in the master rtl_433 repo. Which would be very cool.
Not cool is that I have no clue how to "flip" this codes switch in my HA ryl_433 add on's rtl_conf.template file. As of now mine looks like that... Can you give me a clue please what I could add to this file in HA to get that custom hop feature working. Thanks again.
390b5c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this branch, the following command works for me:
rtl_433 -f 433920000 -f 912600155 -H 130 -E hop2 -F "mqtt://192.168.1.100:1883,user=USER,pass=PASS,retain=0,devices=rtl_433[/model][/subtype][/id][/channel]"
Where the hop2=only hop on success for 2nd freq keeps reading on 433M for the full 130s, then hops to 912M for 130s or until successful reading.
Then, in Homeassistant, in configuration.yaml I have:
Obviously need to adjust state_topic to your model/subtype/channel to your readings.
390b5c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a bunch for that Bob. I ended up using/testing this repo on a Pi3 (not my Pi4 HA OS yet) and it works perfectly. Zero skipped hours now on my electric meter readings. It's just what I needed.
Now I'm still trying to get this repo and it's hop2 arguments to work within my own local hosted rtl_433-hass-addon.
390b5c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First off - THANK YOU. I found this from the original repo and it's EXACTLY what I was looking for. Well...almost. I actually have 3 frequencies that I want to cycle through instead of just 2:
I'm envisioning the command looking something like:
./rtl_433 -f 915M -H 120 -E hop2 -f 315M -H 240 -f 433.92M -H 3600
.Is that something that might be possible at some point, or should I bug @zuckschwerdt about this because it's going to take some refactoring?
390b5c1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Spazholio you could easily invert the logic for
frequency_index
and change line 652 above to something like:else if ((cfg->after_successful_events_flag == 3) && (cfg->frequency_index != 0)) { // hop on success for ONLY the first frequency
Then I think your command would be just as you envisioned.