Skip to content

Commit

Permalink
Fixes for driver WUI and adding xmq drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
BIBOLV committed Oct 9, 2024
1 parent 0522832 commit 683e391
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
10 changes: 9 additions & 1 deletion wmbusmeters-ha-addon-edge/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ FROM $BUILD_FROM AS build

ENV LANG C.UTF-8

RUN apk add --no-cache alpine-sdk gcc linux-headers libxml2-dev cmake libusb-dev bash samurai
RUN apk add --no-cache alpine-sdk gcc linux-headers libxml2-dev cmake libusb-dev bash samurai libxslt1-dev pkg-config jq

ADD https://api.github.com/repos/wmbusmeters/wmbusmeters/git/refs/heads/master version.json
RUN git clone https://github.com/steve-m/librtlsdr.git && \
git clone https://github.com/wmbusmeters/wmbusmeters.git && \
git clone https://github.com/libxmq/xmq.git && \
git clone https://github.com/weetmuts/rtl-wmbus.git && \
git clone https://github.com/merbanan/rtl_433.git && \
git clone https://github.com/ED6E0F17/rtl_reset.git
Expand All @@ -21,9 +22,15 @@ RUN cmake -B build -G Ninja \
cmake --build build && \
cmake --install build

WORKDIR /xmq
RUN ./configure && make && make install

WORKDIR /wmbusmeters
RUN make

WORKDIR /wmbusmeters/drivers
RUN make generate_ha_discovery

WORKDIR /rtl-wmbus
RUN make release && chmod 755 build/rtl_wmbus

Expand All @@ -48,6 +55,7 @@ COPY --from=build /librtlsdr/build/src/librtlsdr.so.* /usr/lib/
COPY --from=build /librtlsdr/rtl-sdr.rules /usr/lib/udev/rules.d/rtl-sdr.rules
COPY --from=build /librtlsdr/build/src/rtl_* /usr/bin/
COPY --from=build /wmbusmeters/build/wmbusmeters /wmbusmeters/wmbusmeters
COPY --from=build /wmbusmeters/drivers/build/ha_mqtt_discovery/ /ha_mqtt_discovery/
COPY --from=build /rtl-wmbus/build/rtl_wmbus /usr/bin/rtl_wmbus
COPY --from=build /rtl_433/build/src/rtl_433 /usr/bin/rtl_433
COPY --from=build /rtl_reset/rtl_reset /usr/bin/rtl_reset
Expand Down
6 changes: 6 additions & 0 deletions wmbusmeters-ha-addon-edge/rootfs/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ http {
sub_filter "/save_json" "$http_x_ingress_path/save_json";
sub_filter "/get_json" "$http_x_ingress_path/get_json";
sub_filter "/decrypt" "$http_x_ingress_path/decrypt";
sub_filter "/kem" "$http_x_ingress_path/kem";
sub_filter "/drivers" "$http_x_ingress_path/drivers";
sub_filter "/add_driver" "$http_x_ingress_path/add_driver";
sub_filter "/edit_driver" "$http_x_ingress_path/edit_driver";
sub_filter "/delete_driver" "$http_x_ingress_path/delete_driver";
sub_filter "/check_filename" "$http_x_ingress_path/check_filename";
}
}
}

0 comments on commit 683e391

Please sign in to comment.