rtl_433 icon indicating copy to clipboard operation
rtl_433 copied to clipboard

Add support for Gridstream RF protocol from Landis & Gyr meters

Open krvmk opened this issue 1 year ago • 16 comments

This PR is to add initial support for the Gridstream RF protocol as discussed in #2531.

krvmk avatar Sep 02 '23 05:09 krvmk

Can you add relevant information from here: https://usermanual.wiki/Landis-Gyr-Technology/IWRS4/html

merbanan avatar Sep 02 '23 16:09 merbanan

Looks good, make sure to run the maintainer update script also.

merbanan avatar Sep 02 '23 17:09 merbanan

There are changes to README and man page that seem like they have crept in vs being intended.

gdt avatar Oct 05 '23 23:10 gdt

I think this might solve my need -- my water company just swapped out the previous meter for a Landis + Gyr GridLinx Interpreter which supposedly connects to the GridStream network.

Is there anything I can do to help get this out of development and into production? It looks like it maybe just failed a single test on code style...

doctorkb avatar Feb 02 '24 16:02 doctorkb

The CRLF problems need to be fixed, indentation fixed, some comments added, style updated (as per the review) and then it should be in good shape to merge. Maybe we need to manually merge with those fixes added?

zuckschwerdt avatar Feb 02 '24 16:02 zuckschwerdt

The CRLF problems need to be fixed, indentation fixed, some comments added, style updated (as per the review) and then it should be in good shape to merge. Maybe we need to manually merge with those fixes added?

The CRLF problems need to be fixed, indentation fixed, some comments added, style updated (as per the review) and then it should be in good shape to merge. Maybe we need to manually merge with those fixes added?

I had made most of the recommendations to a separate branch here, but I have not had time to move forward with finishing it up. https://github.com/krvmk/rtl_433/blob/merge/src/devices/gridstream.c

krvmk avatar Feb 02 '24 18:02 krvmk

Reset and repushed, but the maintainer_update changed a bunch of other stuff in the README. I'm not sure why.

krvmk avatar Feb 03 '24 06:02 krvmk

Should be good to go now.

krvmk avatar Feb 07 '24 04:02 krvmk

What's the status of this? I'm looking at #2531 and it sort of seems like if this were merged we could close the issue and be down two items.

gdt avatar Jun 04 '24 12:06 gdt

LGTM, we need some samples though and a rebase.

merbanan avatar Jun 04 '24 12:06 merbanan

LGTM, we need some samples though and a rebase.

What do you need for samples? There are some in the issue discussion #2531.

krvmk avatar Jun 05 '24 02:06 krvmk

Trouble is that this decoder uses extra headers of stdbool.h, stdlib.h, time.h. The one single bool should be an int. The usage of strftime() and localtime() is understandable but not what we usually have in decoders. What is stdlib used for?

zuckschwerdt avatar Jun 05 '24 08:06 zuckschwerdt

stdlib.h is described at https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html

It is surprising to me that use of it in rtl_433 is novel. But

./output_mqtt.c:#include <stdlib.h>
./output_influx.c:#include <stdlib.h>
./bitbuffer.c:#include <stdlib.h>
./pulse_data.c:#include <stdlib.h>
./output_file.c:#include <stdlib.h>
./baseband.c:#include <stdlib.h>
./data_tag.c:#include <stdlib.h>
./output_trigger.c:#include <stdlib.h>
./sdr.c:#include <stdlib.h>
./pulse_slicer.c:#include <stdlib.h>
./optparse.c:#include <stdlib.h>
./write_sigrok.c:#include <stdlib.h>
./pulse_detect.c:#include <stdlib.h>
./decoder_util.c:#include <stdlib.h>
./r_util.c:#include <stdlib.h>
./pulse_analyzer.c:#include <stdlib.h>
./rtl_433.c:#include <stdlib.h>
./r_api.c:#include <stdlib.h>
./term_ctl.c:#include <stdlib.h>
./samp_grab.c:#include <stdlib.h>
./mongoose.c:#include <stdlib.h>
./mongoose.c:#include <stdlib.h>
./am_analyze.c:#include <stdlib.h>
./bit_util.c:#include <stdlib.h>
./data.c:#include <stdlib.h>
./confparse.c:#include <stdlib.h>
./getopt/getopt.c:/* Don't include stdlib.h for non-GNU C libraries because some of them
./getopt/getopt.c:# include <stdlib.h>
./getopt/getopt.c:#include <stdlib.h>
./compat_paths.c:#include <stdlib.h>
./output_rtltcp.c:#include <stdlib.h>
./list.c:#include <stdlib.h>
./output_log.c:#include <stdlib.h>
./output_udp.c:#include <stdlib.h>
./pulse_detect_fsk.c:#include <stdlib.h>
./devices/flex.c:#include <stdlib.h>
./devices/blueline.c:#include <stdlib.h>
./fileformat.c:#include <stdlib.h>

gdt avatar Jun 05 '24 10:06 gdt

It is surprising to me that use of it in rtl_433 is novel. But

Decoders (src/devices) should not use stdlib because alloc() should not be used. It appears you don't alloc, why do you need stdlib?

zuckschwerdt avatar Jun 05 '24 10:06 zuckschwerdt

I guess it's easy enough to remove it and see if there is a warning.

gdt avatar Jun 05 '24 12:06 gdt

It is surprising to me that use of it in rtl_433 is novel. But

Decoders (src/devices) should not use stdlib because alloc() should not be used. It appears you don't alloc, why do you need stdlib?

Good catch. It was leftover from the initial attempt using a dynamic bitbuffer size.

krvmk avatar Jun 05 '24 14:06 krvmk