-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
230delphi
committed
Sep 26, 2021
1 parent
dc0a75a
commit 4b74d8a
Showing
5 changed files
with
88 additions
and
0 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 @@ | ||
/tmp/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,26 @@ | ||
# docker build --build-arg BUILD_FROM="homeassistant/amd64-base:latest" | ||
ARG BUILD_FROM | ||
FROM $BUILD_FROM | ||
|
||
ENV LANG C.UTF-8 | ||
LABEL maintainer="[email protected]" | ||
|
||
|
||
#ENV SQUID_VERSION=5.0 \ | ||
# SQUID_CACHE_DIR=/var/spool/squid \ | ||
# SQUID_LOG_DIR=/var/log/squid \ | ||
# SQUID_USER=proxy | ||
|
||
RUN apk add --no-cache golang | ||
|
||
|
||
#COPY entrypoint.sh /sbin/entrypoint.sh | ||
#RUN chmod 755 /sbin/entrypoint.sh | ||
|
||
#EXPOSE 3128/tcp | ||
#ENTRYPOINT ["/sbin/entrypoint.sh"] | ||
|
||
# Copy data for add-on | ||
COPY run.sh / | ||
RUN chmod a+x /run.sh | ||
CMD [ "/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,33 @@ | ||
{ | ||
"name": "AlphaESS Proxy", | ||
"version": "1", | ||
"slug": "hello_world", | ||
"description": "AlphaESS Proxy Data collector", | ||
"arch": [ | ||
"armhf", | ||
"armv7", | ||
"aarch64", | ||
"amd64", | ||
"i386" | ||
], | ||
"startup": "application", | ||
"boot": "auto", | ||
"options": { | ||
"MQTTAddress": "tcp://127.0.0.1:1883", | ||
"MQTTUser": "myuser", | ||
"MQTTPassword": "mypass", | ||
"AlphaESSID": "alphaess1", | ||
"MQTTTopicBase": "homeassistant/sensor/", | ||
"TZLocation": "Europe/Dublin", | ||
"ProxyIPPort": "0.0.0.0:17777" | ||
}, | ||
"schema": { | ||
"MQTTAddress": "str", | ||
"MQTTUser": "str", | ||
"MQTTPassword": "str", | ||
"AlphaESSID": "str", | ||
"MQTTTopicBase": "str", | ||
"TZLocation": "str", | ||
"ProxyIPPort": "str" | ||
} | ||
} |
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,20 @@ | ||
#!/usr/bin/with-contenv bashio | ||
git clone https://github.com/230delphi/alphaess-to-mqtt/ | ||
cd alphaess-to-mqtt | ||
go build *.go | ||
CONFIG="alphaESS-proxy.conf" | ||
|
||
{ | ||
echo "l=${ProxyIPPort}"; | ||
echo "MQTTAddress=${MQTTAddress}"; | ||
echo "MQTTUser=${MQTTUser}"; | ||
echo "MQTTPassword=${MQTTPassword}"; | ||
echo "MQTTTopicBase=${MQTTTopicBase}"; | ||
echo "AlphaESSID=${AlphaESSID}"; | ||
echo "TZLocation=${TZLocation}"; | ||
echo "proxyConnection=MQTTReadProxyConnection"; | ||
} > "${CONFIG}" | ||
|
||
# Start Proxy server | ||
bashio::log.info "Starting Proxy server..." | ||
alphaESS-proxy -config ${CONFIG} < /dev/null |