Update with main
This commit is contained in:
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM python:3.10-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt ./
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends gcc python3-dev libssl-dev && \
|
||||
pip3 install -r requirements.txt && \
|
||||
apt-get remove -y gcc python3-dev libssl-dev && \
|
||||
apt-get autoremove -y
|
||||
|
||||
COPY hc2mqtt hc-login HCDevice.py HCSocket.py HCxml2json.py ./
|
||||
|
||||
ENTRYPOINT ["python3"]
|
||||
CMD ["hc2mqtt", "/config/config.json"]
|
||||
25
README.md
25
README.md
@@ -41,7 +41,13 @@ Installing `sslpsk` needs some extra steps:
|
||||

|
||||
|
||||
```bash
|
||||
hc-login $USERNAME $PASSWORD > devices.json
|
||||
hc-login $USERNAME $PASSWORD > config/devices.json
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
docker-compose run -T app hc-login $USERNAME $PASSWORD > config/devices.json
|
||||
```
|
||||
|
||||
The `hc-login` script perfoms the OAuth process to login to your
|
||||
@@ -425,20 +431,3 @@ Synchronize with time server, `false` is disabled
|
||||
## FRIDA tools
|
||||
|
||||
Moved to [`README-frida.md`](README-frida.md)
|
||||
|
||||
## Home assistant
|
||||
|
||||
For integration with Home Assistant, the following MQTT sensor can be used to create a read only sensor
|
||||
|
||||
```yaml
|
||||
- unique_id: "coffee_machine"
|
||||
name: "Coffee Machine"
|
||||
state_topic: "homeconnect/coffeemaker/state"
|
||||
value_template: "{{ value_json.PowerState }}"
|
||||
json_attributes_topic: "homeconnect/coffeemaker/state"
|
||||
json_attributes_template: "{{ value_json | tojson }}"
|
||||
```
|
||||
|
||||
## Notes
|
||||
- Sometimes when the device is off, there is the error `ERROR [ip] [Errno 113] No route to host`
|
||||
- There is a lot more information available, like the status of a program that is currently active. This needs to be integrated if possible. For now only the values that relate to the `config.json` are published
|
||||
|
||||
6
compose.yaml
Normal file
6
compose.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- ./config:/config
|
||||
0
config/.gitkeep
Normal file
0
config/.gitkeep
Normal file
Reference in New Issue
Block a user