Compile RTL433 for HA

Hi,

For a weather station integration, I need to modify RTL433.

I don’t understand how to compile RTL433?
I’ve retrieve all sources of RTL433 on my own github and configure HA to point to this github as complementary module.

However, I’ve tried to make some changes in source code and installed it from this github but my changes seems to not be taken into account.

How is RTL433 compiled for HA?

thanks

Vincent

Are you using GitHub - pbkhrv/rtl_433-hass-addons: Collection of Home Assistant add-ons that use rtl_433?

After you clone the add-on repo, you need to modify all the references to refer to your GitHub URL, and upload your own container image. Then you need to add your GitHub as a repository in HA.

The code is compiled as part of the container image build. You can see the normal add-on is hard-coded to a specific tag, which you would need to modify or override.

# Build a specific commit or tag.
ARG rtl433GitRevision=22.11
RUN git checkout ${rtl433GitRevision}
WORKDIR ./build
RUN cmake ..
RUN make -j 4

Yes exactly,

That’s what I’ve done, I’ve changed all reference to my own github, change the source code, but I don’t understand how the compilation is made?

EDIT: I’ve seen your message edit, I will try that and keep you informed.

Thank you very much for your quick help !

1 Like

If you use the rtl_433-next add-on, then it should just pick up the latest change from the master branch. That would support a different version than the hard-coded tag, as it provides the build arg to override:

I have a lot of difficulties with all those configuration :sweat_smile:

I’ve changed the Git Revision, however, in config.json, it seems that a pre-built file is called instead of compiling my own release on the line “image” and I don’t understand how to regenerate this image locally?

{
“name”: “rtl_433 (next)”,
“image”: “ghcr.io/pbkhrv/rtl_433-hass-addons-rtl_433-next-{arch}”,
“version”: “next”,
“slug”: “rtl433-next”,
“description”: “Receive wireless sensor data via an SDR dongle and rtl_433”,
“url”: “OldTest_rtl_433-hass-addons/rtl_433-next at main · modelvincent/OldTest_rtl_433-hass-addons · GitHub”,
“arch”: [“armhf”, “armv7”, “aarch64”, “amd64”, “i386”],
“startup”: “application”,
“boot”: “auto”,

It’s built as part of a GitHub workflow. https://github.com/pbkhrv/rtl_433-hass-addons/blob/547bea4539486933326655a0026b6b9e04ad468c/.github/workflows/builder.yml

You’d either have to modify and enable the workflow in your project, or build the images and push manually.

Thanks for your help,

unfortunately, Github workflow and packaging are too arcane for me, I’ve tried all sort of things but I haven’t been able to make it compile. :cry:

if I let the “image” line in config.json, HA won’t recognized the package, but if I let him, HA download the package from the adress without compiling anything.

Do you have a way to force HA to compile RTL433 from my sources?

best regards

Vincent

Compiling the code is done during the container build. The application is packaged in the container image. HA is not doing anything with your source code.

I think you’re going to need to either modify the GitHub workflow to build the images automatically, or you’re going to have to build the images locally and push them to your own GitHub account.

Did you try following the tutorial that is listed in the instructions? Tutorial: Making your first add-on | Home Assistant Developer Docs

One other option might be to perform a local add-on build, which is usually for developer testing, but maybe it will work in this case: Local add-on testing | Home Assistant Developer Docs

I don’t have much experience doing any of the above, so this is about the extent of help I can provide, sorry.