Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for VEVOR Wireless Weather Station 7-in-1 #150

Open
cipriancu opened this issue Aug 14, 2024 · 52 comments
Open

Support for VEVOR Wireless Weather Station 7-in-1 #150

cipriancu opened this issue Aug 14, 2024 · 52 comments
Labels
enhancement New feature or request

Comments

@cipriancu
Copy link

Current Situation

With Bruno's help, we managed to decode VEVOR Wireless Weather Station 7-in-1 with rtl_433 and RLT- SDR stick
merbanan/rtl_433#3020
but my goal is to integrate it with openmqttgateway installed on a LilyGO TTGO T3 V1.6.1
I installed lilygo-rtl_433-fsk version but my signal is not received/decoded

With RLT- SDR stick i get the data using the command:
rtl_433 -s 1000k -Y classic -M level -f 868M -X "n=Vevor,m=FSK_PCM,s=90,l=90,r=1400,preamble=caca54aa"

what i need to do to integrate rtl_433 branch development in openmqttgateway?

Proposed Change

add support for VEVOR Wireless Weather Station 7-in-1

Additional Context

No response

@cipriancu cipriancu added the enhancement New feature or request label Aug 14, 2024
@toxic0berliner
Copy link

toxic0berliner commented Oct 3, 2024

+1 looking to use this exact weather station with a Lilygo 433 so I understand there are something working settings for the device in rtl_433, how to get those in openmqtt for thé Lilygo device ?
Any help would be greatly appreciated

@hash6iron
Copy link

Hello,

I'm also interested in support for Vevor Wireless Weather Station. How can we using the LilyGo Lora32 decode FSK signal like cipriancu says above? Thanks in advance.

@NorthernMan54
Copy link
Owner

I just refreshed the library to rtl_433 24.10. Was a fix for this included?

@toxic0berliner
Copy link

Seems it's not working for me, but maybe my board is broken I get no rtl_433
I've been re-building using gitpod and changing the platformio.ini file with thie rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP.git#v0.4.0
But no luck, I still get no RTL_433toMQTT topic at all in my mqtt broker... I do get the device pushing to mqtt for it's uptime and such... but still not very sure I managed a proper flash...

@NorthernMan54
Copy link
Owner

Are you able to select the correct frequency and modulation ?

@toxic0berliner
Copy link

I selected 868.300 as the frequency which seems correct from the manufacturer 's sheet, but I se me no option for modulation, only active library which is RTL_433 only other choice is inactive.
There were some settings in the platform.ini file which I didn't change, but now I think of it I think you want to make sure I uses the FSK version which I did.
But I'd still like others to test as I haven't got other RF gear and haven't been able to pickup a single RF signal over mqtt with this device so far... So maybe it's defective, maybe I built the firmware wrong...
I am also a pure noob so seeing rssi to 110 has no meaning to me, I know I tried several antenna I had lying around as well as the one sold with the lilygo device...

@NorthernMan54
Copy link
Owner

Postive Results from the OMG build - 1technophile/OpenMQTTGateway#2125

@DigiH
Copy link
Collaborator

DigiH commented Dec 3, 2024

I selected 868.300 as the frequency which seems correct from the manufacturer 's sheet

Could you try 868.35 just for verification?

@toxic0berliner
Copy link

toxic0berliner commented Dec 3, 2024

Thanks for the help, sadly doesn't seem to change

RFtoMQTT = {"active":3,"frequency":868.35,"rssithreshold":-106,"rssi":-113,"avgrssi":-115,"count":0,"rtl433_stack":19480,"ookthreshold":15}
I believe count=0 says it didn't decipher a single message

@DigiH
Copy link
Collaborator

DigiH commented Dec 3, 2024

Unfortunately the link in the decoder file only links to the US region FCC page with the 915MHz references.

I assume you do have the European/other Region 868MHz one from you above posts.

Unfortunately with the LilyGo, the reception frequency window is not as wide as with an RLT- SDR stick, especially with 868MHZ FSK.

It took me months to find the right frequency for my own weather station, I tried 868.30, 868.40, and so forth, until someone else post about some other device from the same manufacturer stated that his works fine with the in between 868.35, and now it's working perfectly.

Does a verbose output with the RLT- SDR stick possibly give any further hints at the exact frequency?

If not, and if there is not any other issue with the vevor_7in1 for rtl_433_ESP, your best bet really is to test yourself through the frequency range in 0.05 steps.

I know it's tedious work, but if yourself, @cipriancu and @hash6iron split up the testing ranges between yourselves it shouldn't take too long to find the weed spot.

@DigiH
Copy link
Collaborator

DigiH commented Dec 3, 2024

Also, is your weather station Crosby for this testing, or outdoors in its usual place? The LilyGos also don't have the long range reception as an RLT- SDR stick. So not that it's just a case of having to move the LilyGo closer to the station.

@cipriancu
Copy link
Author

Sorry all. I won't be able to make any test till mid December. My wheather station is working on RTL-SDR + homeassistant and the lilygo is sitting in a drawer. In terms of frequency RTL SDR sees 2:one at 868.1 and the other at 868.4. My question for whenever I'll arrive home and do the tests. Do I have to compile openmqttgateway in plaform.io to use this new library or it is included in version 1.8.0 (my lilygo is flashed with 1.7.0)

@DigiH
Copy link
Collaborator

DigiH commented Dec 3, 2024

868.1 and the other at 868.4.

That's a good start!

@toxic0berliner @hash6iron any luck with these frequencies? Or possibly anything in between in 0.05 steps?

My question for whenever I'll arrive home and do the tests. Do I have to compile openmqttgateway in plaform.io to use this new library or it is included in version 1.8.0 (my lilygo is flashed with 1.7.0)

You will have to install a new build, but by the time you'll be back home I assume the new version of the rtl_433_ESP library has been merged into the development version of OpenMQTTGateway, so you can then just web install a development build without any need to compile anything yourself.

@cipriancu
Copy link
Author

managed to get to a computer and ive changed the conf file in HA to get the frequencies: {"time" : "2024-12-03 21:57:43.702091", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.500, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 103, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.309, "rssi" : -3.314, "snr" : 23.389, "noise" : -26.704}
{"time" : "2024-12-03 21:58:16.574055", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.500, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 96, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.311, "rssi" : -3.390, "snr" : 21.431, "noise" : -24.820}
{"time" : "2024-12-03 21:58:45.157493", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.500, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 96, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.298, "rssi" : -3.452, "snr" : 21.703, "noise" : -25.154}
{"time" : "2024-12-03 21:59:18.030029", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.500, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.380, "freq2" : 868.296, "rssi" : -3.490, "snr" : 20.525, "noise" : -24.015}
{"time" : "2024-12-03 21:59:46.613813", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.500, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.380, "freq2" : 868.301, "rssi" : -3.579, "snr" : 22.655, "noise" : -26.234}
{"time" : "2024-12-03 22:00:19.486996", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.500, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.302, "rssi" : -3.552, "snr" : 19.784, "noise" : -23.336}
{"time" : "2024-12-03 22:00:48.070795", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.294, "rssi" : -3.555, "snr" : 19.558, "noise" : -23.113}
{"time" : "2024-12-03 22:01:20.944513", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.500, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.302, "rssi" : -3.567, "snr" : 23.015, "noise" : -26.581}
{"time" : "2024-12-03 22:01:49.528426", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.292, "rssi" : -3.433, "snr" : 17.956, "noise" : -21.389}
{"time" : "2024-12-03 22:02:22.400706", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.310, "rssi" : -3.572, "snr" : 26.019, "noise" : -29.591}
{"time" : "2024-12-03 22:02:50.984290", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.286, "rssi" : -3.428, "snr" : 23.945, "noise" : -27.373}
{"time" : "2024-12-03 22:03:23.856898", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.305, "rssi" : -3.672, "snr" : 17.904, "noise" : -21.575}
{"time" : "2024-12-03 22:03:52.440607", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.309, "rssi" : -3.581, "snr" : 21.842, "noise" : -25.423}
{"time" : "2024-12-03 22:04:25.313259", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.379, "freq2" : 868.313, "rssi" : -3.651, "snr" : 19.355, "noise" : -23.006}
{"time" : "2024-12-03 22:04:53.897028", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.313, "rssi" : -3.644, "snr" : 19.635, "noise" : -23.279}
{"time" : "2024-12-03 22:05:26.769575", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 90, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.301, "rssi" : -3.681, "snr" : 20.754, "noise" : -24.436}
{"time" : "2024-12-03 22:06:28.225558", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 89, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.311, "rssi" : -3.625, "snr" : 20.526, "noise" : -24.151}
{"time" : "2024-12-03 22:06:49.075418", "enabled" : 1, "since" : "2024-12-03T21:56:49", "frames" : {"count" : 3764, "fsk" : 17, "events" : 17}, "stats" : [{"device" : 263, "name" : "Vevor Wireless Weather Station 7-in-1", "events" : 17, "ok" : 17, "messages" : 17}]}
{"time" : "2024-12-03 22:06:56.809287", "protocol" : 263, "model" : "Vevor-7in1", "id" : 63735, "channel" : 0, "battery_ok" : 1, "temperature_C" : 4.400, "humidity" : 88, "wind_avg_km_h" : 0.000, "wind_max_km_h" : 0.000, "wind_dir_deg" : 80, "rain_mm" : 0.000, "uv" : 0, "light_lux" : 0, "mic" : "CHECKSUM", "mod" : "FSK", "freq1" : 868.381, "freq2" : 868.298, "rssi" : -3.639, "snr" : 17.974, "noise" : -21.613}

@NorthernMan54
Copy link
Owner

NorthernMan54 commented Dec 3, 2024

Humm, the difference between Freq1 and Freq2 is approx 0.080 Mhz

Am wondering if changing this to 80 may make a difference if it doesn't work once the frequency is dialled in -

state = radio.setFrequencyDeviation(40); //

@toxic0berliner
Copy link

I tried from 868.1 to 868.45 in .05 increments, nothing yet.
Since I'm a bit worried I built something wrong, I would like to attempt to re-flash the openMQTT dev using the web tools but I don't see any option for dev on the page https://docs.openmqttgateway.com/upload/web-install.html#using-openmqttgateway
I also tried 915.000 on the offchance I had an US version shipped to me in France by mistake, doesn't seem to be the case.

Sorry for the noob-level help needed. I'm considering adding my own option in the html dropdown if I can findout the path for the dev builds 🤣 I'm fairly goot at web, shell, but real new to ESP32 & especially RF 😉

Meanwhile I have put the lilygo device on a battery pack and it's sitting outside just next to the weatherstation, can't be any closer. I am going over the same range with .005 increments now and fiving it more time inbetween.

Maybe if you have one piece of advice : I plugged in a big antenna I bought a while ago that was for WIFI I expect 2.4GhZ on the liligo device thnking bigger is better, would you advise I switch back to the little antenna provided with the lilygo instead ?

@toxic0berliner
Copy link

silly me, just found the url in the github actions : https://docs.openmqttgateway.com/dev/
installing now...

@toxic0berliner
Copy link

but hey, I believe it's not using your latest build : in platformio.ini I see this :
rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP.git#v0.3.3

@DigiH
Copy link
Collaborator

DigiH commented Dec 4, 2024

Northernman is likely asleep in his part of the world right now, so I've done the following
• Created a branch with the 0.4.0 release and added his suggested change above
• Started a OpenMQTTGateway development build

@toxic0berliner @hash6iron @cipriancu
You can now web upload the development test build with SHA:81eb8b at the top of the dev upload page.

It will be available until it gets overwritten by the default development nightly build just after midnight UTC tonight.

Let's see what it brings.

@toxic0berliner
Copy link

oups, sorry, I didn't anticipate this last message to be time-sensitive and for sure now I look at it it's alredy gone, sorry for that and thanks for the efforts DigiH
I will be watching this topic more closely and have the device on my desk in case you pull the same strings again, else I will be patiently waiting for the MR to be merged, after all it's more my fault I'm not comfortable building&flashing ESP devices 😁

@DigiH
Copy link
Collaborator

DigiH commented Dec 5, 2024

It wasn't so much about 0.4.0 being merged, as you seemed to have done that already fine with your gitpod firmware build, but more to also include the above change from @NorthernMan54.

I have started the test build again, and it will be available with the same SHA in about 90 minutes, again only until just after midnight ;)

@toxic0berliner
Copy link

toxic0berliner commented Dec 5, 2024

got it !
flashed and configures, it's running, so far not much more luck but I'll try to monitor and maybe sweep across the frequency range again:

{"active":3,"frequency":868.381,"rssithreshold":-106,"rssi":-114,"avgrssi":-115,"count":0,"rtl433_stack":19480,"ookthreshold":15}

Thanks a lot !

@cipriancu
Copy link
Author

Hi all
got home and started to work firstly i checked again the frequency with HDSDR
image
and the 2 frequencies are 868.307 and 868.376

next, i flashed [SHA:1b50c8 TEST ONLY] with lilygo-rtl_433-fsk, i set different frequencies around both values 868.307, 868.31, 868.376, 868.38, 868.37,868.35 ( in this time I had the RTL-SDR turned on to check if I receive something) and on lilygo no success

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

Hin @cipriancu

next, i flashed [SHA:1b50c8 TEST ONLY]

That was the nightly development build again, with rtl_433_ESP 0.4.0, but without
state = radio.setFrequencyDeviation(40)
as from @NorthernMan54's suggestion above.

Let me start that build again, and in about 90 minutes you should be able to install the SHA:81eb8b build.

@cipriancu
Copy link
Author

in the meantime i flashed a via Platform IO https://github.com/1technophile/OpenMQTTGateway/tree/rtl_433_esp-v0.4.0
i set the frequency at 868.35 and it seems to work ,

N: [ OMG->MQTT ] topic: home/OMG_lilygo_rtl_433_ESP_FSK/RTL_433toMQTT/Vevor-7in1/0/63735 msg: {"model":"Vevor-7in1","id":63735,"channel":0,"battery_ok":1,"temperature_C":24.8,"humidity":49,"wind_avg_km_h":0,"wind_max_km_h":0,"wind_dir_deg":185,"rain_mm":0.466,"uv":0,"light_lux":11,"mic":"CHECKSUM","protocol":"Vevor Wireless Weather Station 7-in-1","rssi":-33,"duration":83996}

but it doesn't seems to capture all packets at every 20 seconds, i need to test a bit more

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

but it doesn't seems to capture all packets at every 20 seconds, i need to test a bit more

See how it goes when the SHA:81eb8b build is ready, with the wider frequency deviation.

@toxic0berliner don't you have an 868MHZ LilyGo board then, that you didn't get any reception at all with the 0.4.0 build?

@toxic0berliner
Copy link

I have 81eb8b I have been swiping the frequencies, so far no luck trying again around 868.35

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

I have 81eb8b I have been swiping the frequencies, so far no luck trying again around 868.35

I meant your actual LilyGo board, which version is the board hardware? What does it say on the back, under

LilyGo®
…

@toxic0berliner
Copy link

Wow, something new:
{"active":3,"frequency":868.35,"rssithreshold":-106,"rssi":-112,"avgrssi":-115,"count":1819,"rtl433_stack":5048,"ookthreshold":15}
The count is not 0 😯
Still, I don't see any new device in my mqtt integration it seems and the console doesn't log anything having submitted new info to mqtt between the count=0 and this 1819.
It seems stuck a 1819 now...
Maybe you've found my issue though:
P_20241209_130923

@toxic0berliner
Copy link

I believed my device to be 433 back then.
Maybe you could confirm I would have better luck with this one: https://lilygo.cc/products/lora3?variant=42476923682997

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

I'm afraid you'll need a 868/915MHZ version, where yours now says 433/470MHz.
That's why you are not seeing any reception of your 868MHz station.

https://de.aliexpress.com/item/1005003062523617.html

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

Cross over ;) yes, you would be a lot luckier with a 868MHz LilyGo 😃

Don't worry about the Paxcounter or Disaster-Radio versions, that is just different pre-installed firmware, which you will be overwriting anyway.

You will still be able to pick up any proper 433MHz devices with your version though.

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

@cipriancu - the SHA:81eb8b build is ready for a test drive …

@toxic0berliner
Copy link

It's ordered, will take a while to get there though.
@DigiH to avoid bothering you next time, now I'm more confident my flashing was correct just my device was wrong, I'm willing to git clone and build myself, but unsure what exactly to clone, care to share the full git url matching your 81eb8b build ?

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

Didn't you mention you used GitPod before?

I basically have forked this repo here, with the main branch being the 0.4.0 state right now. Once forked just create a new branch and in that branch make the change @NorthernMan54 suggested above - maybe best wait to see if @cipriancu comes back with good results first ;)

Then in OpenMQTTGateway, either forked as well or though GitPod again, all you have to do is redirect the rtl_433 library link to your own branch, as I did in the test build with

; rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP.git#v0.3.3
rtl_433_ESP = https://github.com/DigiH/rtl_433_ESP.git#freqdev

in Platform.ini. Then build and upload - 0.4.0 with the above frequency deviation change.

Alternatively just remove the branch tag #v0.3.3 at the end of the existing URL or change it to #0.4.0 to get the current state as is.

Or just clone my freqdev branch

https://github.com/DigiH/rtl_433_ESP/tree/freqdev

I hope it makes sense.

@cipriancu
Copy link
Author

ALL
firstly related [v0.4.0]
between 12:58 and 14:34, I captured 53 packets from 288
i installed now
SHA:81eb8b TEST ONLY

but I did not receive anything
@DigiH are you sure you've committed the changes for the frequency deviation?
here https://github.com/DigiH/rtl_433_ESP i see that the last commit was 5 days ago

with both [v0.4.0] or SHA:81eb8b home assistant is give me this

image

I'm thinking of downloading OpenMQTTgateway v1.8.0 and changing in the platform.io the link to rtl_433_ESP either to DigiH or NorthernMan54

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

@DigiH are you sure you've committed the changes for the frequency deviation?
here https://github.com/DigiH/rtl_433_ESP i see that the last commit was 5 days ago

If you look at the commit from 5 days ago, I only added what @NorthernMan54 suggested above 5 days ago

main...DigiH:rtl_433_ESP:freqdev

but at the same time also wondering if the second occurrence of radio.setFrequencyDeviation(40) at

https://github.com/DigiH/rtl_433_ESP/blob/freqdev/src/rtl_433_ESP.cpp#L276

should also be changed. As only one was mentioned I only changed the one. I'm not very versed with the radio tuning intricacies and honestly wasn't too sure about exactly what I was changing, but I just wanted to make the above suggested change available for testing ;)

So you can see that the change is included, and if it makes it worse and not better for you I suppose some other tweaking might be required to get a better reception than your current 53 out of 288.

I'm thinking of downloading OpenMQTTgateway v1.8.0 and changing in the platform.io the link to rtl_433_ESP either to DigiH or NorthernMan54

And this is what I did, creating an OpenMQTTGateway branch of the current development branch, and linking the rtl_433 library to my above changed rtl_433_ESP branch

1technophile/OpenMQTTGateway@development...rtl433test

which you can see is commit 81eb8b, i. e. the branch the test builds were created from.

But do let me know first you think there is anything wrong with the above, or maybe you want to try it with both occurrences of radio.setFrequencyDeviation(xx) changed to (80).

@NorthernMan54
Copy link
Owner

@DigiH A bit of a moment for me there, if you look at the compiler directives, the first radio.setFrequencyDeviation is for the CC1101 based build, and the second for the SX127X based build. So it should be the second one

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

@NorthernMan54 You know me, I do my BLE decoding and am used to creating test builds for that, but when it comes to the rtl_433 decoding I just went to the line you stated above ;P without actually looking too closely as I was also working on more BLE decoders at the same time.

So @cipriancu better change the second one then, possibly keeping the 1st for CC1101 requiring the same or similar change, if any of the Vevor7in1 owners do have an 868MHz CC1101?!?

Where would all the fun and excitement be without small hiccups like that along the way 😜

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

And yes, a few lines above it clearly states

…
#ifdef RF_CC1101
…

so my wondering about the second occurrence wasn't that off.

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

@cipriancu please let us know how you get on with the appropriate

#if defined(RF_SX1276) || defined(RF_SX1278)
…
state = radio.setFrequencyDeviation(80);
…

or do you quickly want me to make the change in my branch, so you can just link to it from Platform.ini in your OMG build?

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

or do you quickly want me to make the change in my branch, so you can just link to it from Platform.ini in your OMG build?

Done, both now with 80

main...DigiH:rtl_433_ESP:freqdev

so yo9u can just keep the rtl_433 link from the OMG test branch

rtl_433_ESP = https://github.com/DigiH/rtl_433_ESP.git#freqdev

@cipriancu
Copy link
Author

thanks, DigiH
I compiled Platform.ini the old version ( i think it was with 40) and I got 13 records in 15 minutes
then I compiled this new version and I got 20 records in 40 minutes,

but I wonder if there isn't a processing of the data that dont push a record in MQTT as long nothing is changing. because i have the weather station next to me inside the changes are minimal

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

but I wonder if there isn't a processing of the data that dont push a record in MQTT as long nothing is changing. because i have the weather station next to me inside the changes are minimal

AFAIK that should not happen that identical value messages are being filtered. I think you said that your station broadcasts every 20 seconds, so you really should ideally see a received and decoded message envy 20 seconds, even if and when the values do not change. At least that is what I was seeing with my weather station during initial testing and setup. So unless something has changed in regards to that it should still behave the same.

I very much doubt it though, as it would just require extra processing and storing previous values for comparison and all - and for what in the end, to suppress some duplicate messages - no, I very much doubt it :) @NorthernMan54 ??

Could it be that the 'missing' decodings might actually fall into another decoder. I have this with my fridge/freezer thermometers, that every now and then they get recognised and decoded as some other brand thermometer, but I do think that is actually unique to my thermometers, as there was quite a long issue thread about these particular ones - just a thought though if you have other devices detected, if one of them might look very similar to your station.

13 records in 15 minutes - with braodcsdsts every 20 seconds, correct? so 13 decoded from 45 broadcasts!?! 29% hits

20 records in 40 minutes - 20 out of 120 broadcasts. Only 17%

So it did actually get worse with the change, if the first was with 0.4.0 as is in the PR, and the seconds with 0.4.0 plus the
radio.setFrequencyDeviation change to 80. You did only compile after I submitted the change at the actually required second location, right?

As I said, I'm happy to help with creating forks and running test builds, but with the actual rtl_433 RF decoding side it's up to your guys to come up with what else might be worth trying ;) but I also have to say that the first 29, let's round it to 30% I don't find too bad actually, if correct receptions come in on an average of every 60 seconds, an interval some other stations actually broadcast at as their default.

@DigiH
Copy link
Collaborator

DigiH commented Dec 9, 2024

@cipriancu

Now with the frequency deviation set higher, which base frequency setting did you actually use? Still 868.35?

Looking at your list of samples further above, it looks as if the base frequency1 is always very close around 868.38 or 868.40

Maybe try another round with setting the frequency in the WebUI to that??

@cipriancu
Copy link
Author

Thanks, DigiH, for the detailed analysis.

I don’t think the frequency deviation needs to be set to 80. I believe it should stay at 40 because the two frequencies emitted by the weather station are 868.307 and 868.376.

I changed the base frequency to 868.34 since that, with a deviation of ±40, should cover the full spectrum of the weather station’s signals. With ±80, I suspect it might capture more noise, which could be affecting the decoding rate.

Let me know what you think, and I’ll continue testing with this setup.

image

@DigiH
Copy link
Collaborator

DigiH commented Dec 10, 2024

I honestly don't know enough about the RF rtl_433 decoding intricacies to know what other parameters might be helpful to try out and tweak, to possibly improve on your 30% reception and decoding rate which you had with the original frequency deviation 40 setting.

I'm happy to help though with creating test build with any such changes.

@toxic0berliner
Copy link

I just recieved the Lilygo 868 !!!
Built the latest lilygo-rtl_433-fsk thing available with gitpod by replacing as below :

# rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP.git#v0.4.0
rtl_433_ESP = https://github.com/DigiH/rtl_433_ESP.git#freqdev

Recieved a msg from the weather station right away, seems they are indeed not coming very frequently but will be monitoring over some time.
Seems to me also there's at least an issue in humidity % that is over 100% and another in wind direction that should be 0<x<360 or -180<x<180
image
Will look into it when I got some time.

Thanks for the efforts all of you !

@cipriancu
Copy link
Author

All moved my weather station and LilyGO setup into production using NorthernMan54's version with a deviation set to 40. While it works fine and I'm happy with the results even if i dont receive/decode a signal at each 20 seconds, there’s an occasional issue where I receive strange values.

My suspicion is that the CRC checksum for those records is failing. Is there a way to make RTL_433 validate the CRC checksum and discard invalid packets before sending the data via MQTT?

This would help filter out corrupted messages and prevent strange values from appearing in Home Assistant.
Here's some screenshots

image
image

@NorthernMan54
Copy link
Owner

The CRC logic in the decoder is here -

if ((add_bytes(b, 19) & 0xff) != b[19]) {

And looking at the logic it is already discarding them.

I wonder if the same data quality issue exists with using rtl_433 and a sdr ?

@NorthernMan54
Copy link
Owner

Also this compiler directive may give more insights into the signal decoding

RTL_VERBOSE=96

PS - I haven't used this option since the most recent update, fingers crossed it still works with the update

@toxic0berliner
Copy link

To be honest I'm going to be lazy now, I find that the base station is not sendig over RF, and it is doing quite a lot for me in fact:

  • it has the pressure sensor
  • it averages the values or does some magic to avoid the few but unmistakable erroneous values (300k lux, 1800°C, ...)
  • it gives a rain rate (mm/h) over the last minute while the RF only gets the total mm since startup
    I could fix all of that with a bit of work in home assistant, but hey, the base station already does it for me and I already put the work into making the man-in-the-middle attack on the base station to keep it local instead of pushing to the cloud, so...
    So I fear I'm gonna be lazy but for what it's worth I do believe it's all working properly now.
    Maybe one could enlighten me as to if -70 is a good RSSI or not, I could tryout another antenna or move the lilygo closer, beyond that I fear I'm not going to rebuild.
    But this should be confirmation enough to actually merge and get the new release someday live for everyone else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants