forked from excaliburpartners/EnergySmartBridge
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First attempt at conversion to home assistant addon
- Loading branch information
1 parent
cceca75
commit 90f1daf
Showing
37 changed files
with
88 additions
and
48 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Publish" | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2.0.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish | ||
uses: home-assistant/builder@master | ||
with: | ||
args: | | ||
--all \ | ||
--docker-hub "ghcr.io/starsoccer" \ | ||
--image "energysmartbridge/{arch}" \ | ||
--target energysmartbridge |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"files.associations": { | ||
"*.yaml": "home-assistant" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
FROM mono:latest AS build | ||
|
||
WORKDIR /build | ||
COPY ./EnergySmartBridge . | ||
COPY ./src . | ||
RUN nuget restore /build/EnergySmartBridge.sln | ||
RUN msbuild /build/EnergySmartBridge.sln /t:Build /p:Configuration=Release | ||
RUN mv /build/bin/Release /app | ||
|
||
FROM nginx:1.24.0 | ||
#ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx | ||
|
||
RUN apt-get update && apt-get install -y openssl | ||
RUN apt-get update && apt-get install -y openssl && apt-get install -y mono-devel | ||
|
||
COPY energysmart-proxy/nginx.conf.template . | ||
COPY nginx.conf.template . | ||
|
||
RUN openssl req -nodes -new -x509 -sha1 -subj '/CN=energysmartwaterheater.com' -keyout /etc/nginx/energysmartwaterheater.com.key -out /etc/nginx/energysmartwaterheater.com.crt -days 3650 | ||
|
||
EXPOSE 443/tcp | ||
|
||
RUN apt-get install -y mono-devel | ||
COPY --from=build /app . | ||
COPY --from=build /app/EnergySmartBridge.ini /config/EnergySmartBridge.ini | ||
COPY startup.sh . | ||
COPY run.sh . | ||
|
||
EXPOSE 443/tcp | ||
|
||
CMD ["sh", "startup.sh"] | ||
CMD [ "sh", "run.sh" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "Energy Smart Bridge" | ||
description: "Energy Smart Bridge" | ||
version: "0.0.1" | ||
slug: "energy_smart_bridge" | ||
image: "ghcr.io/starsoccer/energysmartbridge/{arch}" | ||
init: false | ||
host_network: true | ||
arch: | ||
- aarch64 | ||
- amd64 | ||
- armv7 | ||
ports: | ||
443/tcp: 443 | ||
options: | ||
MQTT_PORT: 1883 | ||
MQTT_SERVER: null | ||
MQTT_USERNAME: null | ||
MQTT_PASSWORD: null | ||
MQTT_PREFIX: "energysmart" | ||
MQTT_DISCOVERY_PREFIX: "homeassistant" | ||
HTTPS: 443 | ||
log_level: "info" | ||
schema: | ||
MQTT_PORT: port | ||
MQTT_SERVER: str | ||
MQTT_USERNAME: str | ||
MQTT_PASSWORD: password | ||
MQTT_PREFIX: str | ||
MQTT_DISCOVERY_PREFIX: str | ||
HTTPS: port | ||
log_level: list(fatal|error|warn|info|debug|trace) |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
set -e | ||
|
||
echo Listing Versions! | ||
echo "nginx Version: $(nginx -v)" | ||
|
||
for keyval in $(grep -E '": [^\{]' my.json | sed -e 's/: /=/' -e "s/\(\,\)$//"); do | ||
echo "export $keyval" | ||
eval export $keyval | ||
done | ||
|
||
#envsubst < /nginx.conf.template > /etc/nginx/nginx.conf; | ||
exec nginx -g 'daemon off;' & mono EnergySmartBridge.exe -i -c /config/EnergySmartBridge.ini -e |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name: Energy Smart Bridge Repo | ||
url: 'https://github.com/starsoccer/energysmartbridge' |
This file was deleted.
Oops, something went wrong.