Skip to content

Commit

Permalink
Bump TheengsGateway to v120 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
1technophile committed Dec 13, 2023
1 parent c9dbb70 commit 73c47e6
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 9 deletions.
66 changes: 66 additions & 0 deletions theengsgateway/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
## [1.9.0]
### What's Changed
On top of numerous new devices supported, this version brings exciting features like the support of encrypted advertisements, the capability to resolve private BLE addresses, HA MQTT discovery tuning, and TLS/Websockets support. Let's dive in!

### New devices
|Devices|Model|Measurements|
|-|:-:|:-:|
| April Brother|N07|temperature/humidity/battery/packet ID|
| BM6 Battery Monitor|BM6|battery|
| GOVEE|H5100|temperature/humidity/battery|
| GOVEE|H5104|temperature/humidity/battery|
| GOVEE|H5179|temperature/humidity/battery|
| INKBIRD|IBS-TH12S|temperature/humidity/battery|
| NUT | NUTALE | tracker |
| Oral B| Toothbrush| state, mode, sector, pressure, time|
| Lippert|BottleCheck|temperature/level/sync status/voltage/battery/reading quality/acceleration x/y-axis|
| ShellyBlu|Button1|button press type/battery/packet ID|
| ShellyBlu|Door/Window|contact/rotation/battery/packet ID|
| ShellyBlu|Motion|motion, illuminance, battery, packet ID|
| ThermoPro|TP357s|temperature/humidity|

### New features
* Add support for ShellyBLU Button1 encrypted advertisements by @koenvervloesem in https://github.com/theengs/gateway/pull/145
* Add -c option to choose path for configuration file by @koenvervloesem in https://github.com/theengs/gateway/pull/143
* Add support for encrypted PVVX advertisements by @koenvervloesem in https://github.com/theengs/gateway/pull/146
* Publish encrypted properties when PUBLISH_ADVDATA is 1 by @koenvervloesem in https://github.com/theengs/gateway/pull/150
* Add support for decrypting ShellyBLU Door/Window advertisements by @koenvervloesem in https://github.com/theengs/gateway/pull/153
* Decode advertisement with service data for each UUID separately by @koenvervloesem in https://github.com/theengs/gateway/pull/154
* Simplify decoding of advertisements by @koenvervloesem in https://github.com/theengs/gateway/pull/157
* Simplify configuration and arguments merging by @koenvervloesem in https://github.com/theengs/gateway/pull/158
* feat/websockets-ssl by @radim-kliment in https://github.com/theengs/gateway/pull/160
* Document TLS and WebSocket options by @koenvervloesem in https://github.com/theengs/gateway/pull/161
* Support encrypted ShellyBLU Motion advertisements by @koenvervloesem in https://github.com/theengs/gateway/pull/172
* Resolve private addresses for known IRKs by @koenvervloesem in https://github.com/theengs/gateway/pull/173
* Update encryption code to Decoder 1.6.2 by @koenvervloesem in https://github.com/theengs/gateway/pull/176
* [DISC] HA discovery device classes and units additions by @DigiH in https://github.com/theengs/gateway/pull/177

### Miscelleanous
* Stop scan loop and show error message on BleakError by @koenvervloesem in https://github.com/theengs/gateway/pull/179
* [DISC] Align discovery by @1technophile in https://github.com/theengs/gateway/pull/183
* Clean up configuration code by @koenvervloesem in https://github.com/theengs/gateway/pull/162
* Fix typo preventing startup by @kw217 in https://github.com/theengs/gateway/pull/169
* Clean up code with newly activated Ruff rules by @koenvervloesem in https://github.com/theengs/gateway/pull/156
* Bump Theengs Decoder to v1.6.4 by @1technophile in https://github.com/theengs/gateway/pull/184

### Documentation
- [DOCS] Add H1 title by @1technophile in https://github.com/theengs/gateway/pull/164
- [DOCS] Add compatible list by @1technophile in https://github.com/theengs/gateway/pull/140
- [DOCS] Clarify support of non-Linux platforms by @koenvervloesem in https://github.com/theengs/gateway/pull/155
- [DOCS] Remove new icon by @1technophile in https://github.com/theengs/gateway/pull/141
- [DOCS] Fix typo in docs by @jcherniak in https://github.com/theengs/gateway/pull/147

### CI
* [CI] Enable all Ruff rules by @koenvervloesem in https://github.com/theengs/gateway/pull/163
* [CI] Update GitHub actions by @koenvervloesem in https://github.com/theengs/gateway/pull/151
* Update pre-commit configuration and fix newly found issues by @koenvervloesem in https://github.com/theengs/gateway/pull/165
* [CI] Run pre-commit checks on all supported Python versions by @koenvervloesem in https://github.com/theengs/gateway/pull/170
* Automatic versioning from Git metadata by @koenvervloesem in https://github.com/theengs/gateway/pull/149

### New Contributors
* @jcherniak made their first contribution in https://github.com/theengs/gateway/pull/147
* @radim-kliment made their first contribution in https://github.com/theengs/gateway/pull/160
* @kw217 made their first contribution in https://github.com/theengs/gateway/pull/169

**Full Changelog**: https://github.com/theengs/gateway/compare/v1.1.0...v1.2.0

## [1.8.0]
## What's Changed
* Docstring fixes by @koenvervloesem in https://github.com/theengs/gateway/pull/133
Expand Down
6 changes: 5 additions & 1 deletion theengsgateway/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@
| TIME_BETWEEN | int | No | Seconds to wait between scans, defaults to `60` |
| LOG_LEVEL | string | No | TheengsGateway log level, defaults to `WARNING` |
| DISCOVERY | boolean | No | Activate discovery or not `true` |
| DISCOVERY_TOPIC | string | No | Home Assistant discovery topic`homeassistant/sensor` |
| DISCOVERY_TOPIC | string | No | Home Assistant discovery topic`homeassistant` |
| DISCOVERY_DEVICE_NAME | string | No | Device name `TheengsGateway` |
| DISCOVERY_FILTER | string | No | Excluded BLE devices models `[IBEACON,GAEN,MS-CDP,APPLE_CONT]` |
| ADAPTER | string | No | Bluetooth adapter (e.g. hci1 on Linux) |
| SCANNING_MODE | string | No | Change scanning mode between `active` and `passive`, defaults to `active` |
| TIME_SYNC | string | No | Addresses of BLE devices to synchronize time (defaults to the empty list `[]`) |
| TIME_FORMAT | boolean | No | Use 12-hour (`yes`) or 24-hour (`no`) time format for clocks (defaults to `no`) |
| IDENTITIES | json | No | IRK to resolve private addresses, example { "00:11:22:33:44:55:66":"0dc540f3025b474b9ef1085e051b1add","AA:BB:CC:DD:EE:FF":"6385424e1b0341109942ad2a6bb42e58"} |
| BINDKEYS | json | No | Addresses and key to decrypt data, example { "00:11:22:33:44:55:66":"0dc540f3025b474b9ef1085e051b1add","AA:BB:CC:DD:EE:FF":"6385424e1b0341109942ad2a6bb42e58"} |
| ENABLE_TLS | boolean | No | Activate TLS |
| ENABLE_WEBSOCKET | boolean | No | Activate WebSocket |

For more details please refer to [TheengsGateway](https://theengs.github.io/gateway/).
4 changes: 2 additions & 2 deletions theengsgateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG BUILD_FROM
FROM $BUILD_FROM
LABEL io.hass.version="1.8.0" io.hass.type="addon" io.hass.arch="armv7|armhf|aarch64|i386|amd64"
LABEL io.hass.version="1.9.0" io.hass.type="addon" io.hass.arch="armv7|armhf|aarch64|i386|amd64"
RUN apt-get update && apt-get upgrade -y && \
apt-get install --no-install-recommends -y build-essential bluez python3-pip python3-dev && \
pip3 install --extra-index-url=https://www.piwheels.org/simple TheengsGateway==1.1.0
pip3 install --extra-index-url=https://www.piwheels.org/simple TheengsGateway==1.2.0
ENV current /root
ENV HOME $current
WORKDIR $current
Expand Down
16 changes: 12 additions & 4 deletions theengsgateway/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "TheengsGateway",
"version": "1.8.0",
"version": "1.9.0",
"slug": "theengsgw",
"description": "TheengsGateway HA Add-on",
"url": "https://github.com/mihsu81/addon-theengsgw",
Expand Down Expand Up @@ -28,13 +28,17 @@
"TIME_BETWEEN": 60,
"LOG_LEVEL": "WARNING",
"DISCOVERY": true,
"DISCOVERY_TOPIC": "homeassistant/sensor",
"DISCOVERY_TOPIC": "homeassistant",
"DISCOVERY_DEVICE_NAME": "TheengsGateway",
"DISCOVERY_FILTER": "[IBEACON]",
"ADAPTER": "",
"SCANNING_MODE": "active",
"TIME_SYNC": "[]",
"TIME_FORMAT": false
"TIME_FORMAT": false,
"ENABLE_TLS": false,
"ENABLE_WEBSOCKET": false,
"IDENTITIES": "",
"BINDKEYS": ""
},
"schema": {
"MQTT_HOST": "str",
Expand All @@ -57,6 +61,10 @@
"ADAPTER": "str?",
"SCANNING_MODE": "str?",
"TIME_SYNC": "str?",
"TIME_FORMAT": "bool?"
"TIME_FORMAT": "bool?",
"ENABLE_TLS": "bool?",
"ENABLE_WEBSOCKET": "bool?",
"IDENTITIES": "str?",
"BINDKEYS": "str?"
}
}
23 changes: 21 additions & 2 deletions theengsgateway/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,22 @@ DISCOVERY_FILTER=$(bashio::config 'DISCOVERY_FILTER')
ADAPTER=$(bashio::config 'ADAPTER')
TIME_SYNC=$(bashio::config 'TIME_SYNC')
TIME_FORMAT=$(bashio::config 'TIME_FORMAT')
IDENTITIES=$(bashio::config 'IDENTITIES')
BINDKEYS=$(bashio::config 'BINDKEYS')
ENABLE_TLS=$(bashio::config 'ENABLE_TLS')
ENABLE_WEBSOCKET=$(bashio::config 'ENABLE_WEBSOCKET')

# Convert the booleans to integers (1 for true, 0 for false) in single lines
PRESENCE=$( [ "$PRESENCE" = "true" ] && echo 1 || echo 0 )
PUBLISH_ALL=$( [ "$PUBLISH_ALL" = "true" ] && echo 1 || echo 0 )
PUBLISH_ADVDATA=$( [ "$PUBLISH_ADVDATA" = "true" ] && echo 1 || echo 0 )
DISCOVERY=$( [ "$DISCOVERY" = "true" ] && echo 1 || echo 0 )
TIME_FORMAT=$( [ "$TIME_FORMAT" = "true" ] && echo 1 || echo 0 )
ENABLE_TLS=$( [ "$ENABLE_TLS" = "true" ] && echo 1 || echo 0 )
ENABLE_WEBSOCKET=$( [ "$ENABLE_WEBSOCKET" = "true" ] && echo 1 || echo 0 )

bashio::log.info "IDENTITIES: ${IDENTITIES}"
bashio::log.info "BINDKEYS: ${BINDKEYS}"

{
echo "{"
Expand All @@ -54,8 +63,18 @@ TIME_FORMAT=$( [ "$TIME_FORMAT" = "true" ] && echo 1 || echo 0 )
echo " \"discovery_device_name\": \"${DISCOVERY_DEVICE_NAME}\","
echo " \"discovery_filter\": \"${DISCOVERY_FILTER}\","
echo " \"adapter\": \"${ADAPTER}\"",
echo " \"time_sync\": \"${TIME_SYNC}\"",
echo " \"time_format\": \"${TIME_FORMAT}\""
echo " \"time_sync\": ${TIME_SYNC}",
echo " \"time_format\": \"${TIME_FORMAT}\"",
echo " \"enable_tls\": ${ENABLE_TLS}",
echo " \"enable_websocket\": ${ENABLE_WEBSOCKET}"
# Check if IDENTITIES is not empty, then include it
if [ -n "${IDENTITIES}" ]; then
echo ", \"identities\": ${IDENTITIES}"
fi
# Check if BINDKEYS is not empty, then include it
if [ -n "${BINDKEYS}" ]; then
echo ", \"bindkeys\": ${BINDKEYS}"
fi
echo "}"
} > "${CONFIG}"

Expand Down

0 comments on commit 73c47e6

Please sign in to comment.