Skip to content

Commit

Permalink
v2.5.2
Browse files Browse the repository at this point in the history
* Remove device name prefix from HA MQTT #1046

* img variable for motion_webhooks #1044

* Update CHANGELOG.md

* Update README.md
  • Loading branch information
mrlt8 authored Nov 24, 2023
1 parent 0b7de59 commit 2265112
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 32 deletions.
35 changes: 6 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ You can then use the web interface at `http://localhost:5000` where localhost is

See [basic usage](#basic-usage) for additional information or visit the [wiki page](https://github.com/mrlt8/docker-wyze-bridge/wiki/Home-Assistant) for additional information on using the bridge as a Home Assistant Add-on.

## What's Changed in v2.5.2

* FIX: MQTT Naming Warning in Home Assistant #1046 Thanks @ejpenney!
* NEW: `{img}` variable for `motion_webhooks` #1044
* e.g., `MOTION_WEBHOOKS: http://0.0.0.0:123/webhooks/endpoint?camera={cam_name}&snapshot={img}`

## What's Changed in v2.5.1

* FIX `ON_DEMAND=False` option was broken in v2.5.0 #1036 #1037
Expand All @@ -52,35 +58,6 @@ See [basic usage](#basic-usage) for additional information or visit the [wiki pa
* NEW API Endpoint:
* `/api/all/update_snapshot` - trigger interval snapshots via web API #1030

## What's Changed in v2.4.0

* Motion Events!
* Pulls events from the wyze API, so it doesn't require an active connection to the camera to detect motion - great for battery cams.
* Motion status and timestamp available via MQTT and REST API:
* MQTT topics: `wyzebridge/{cam-name}/motion` or `wyzebridge/{cam-name}/motion_ts`
* REST endpoint: `/api/{cam-name}/motion` or `/api/{cam-name}/motion_ts`
* Webhooks ready and works with ntfy.sh `triggers`.
* See [Camera Motion wiki](https://github.com/mrlt8/docker-wyze-bridge/wiki/Camera-Motion) for more information.
* Other fixes and changes:
* Potential improvements for audio sync. Audio will still lag on frame drops. (#388)
* Using **wallclock** seems to help in some situations:
`- FFMPEG_FLAGS=-use_wallclock_as_timestamps 1`
* UPDATE FFmpeg to [v6.0](https://github.com/homebridge/ffmpeg-for-homebridge/releases/tag/v2.1.0)
* UPDATE MediaMTX version from v1.0.3 to v1.1.0 (#1002)
* Store and reuse s3 thumbnail from events to reduce calls to the wyze api (#970)
* Increase default `MTX_WRITEQUEUESIZE` (#984)
* keep stream alive if livestream enabled (#985)
* Catch RuntimeError if libseccomp2 is missing (#994)
* Refactored API client to better handle exceptions and limit connections.
* Check bitrate from videoParams for all 11.x or newer firmware (#975)
* buffer mtx event data (#990)
* Exclude battery cams from scheduled RTSP snapshots (#970)
* New ENV/Options:
* `MOTION_API=True` to enable motion events. (Default: False)
* `MOTION_INT=<float>` number of seconds between motion checks. (Default: 1.5)
* `MOTION_START=True` to have the bridge initiate a connection to the camera on a motion event. (Default: False)
* `MOTION_WEBHOOK=<str>` webhooks url. Can use `{cam_name}` in the url to make a request to a url with the camera name. Image url and title are available in the request header.
* `MOTION_WEBHOOK_<CAM-NAME>=<str>` Same as `MOTION_WEBHOOK` but for a specific camera.

[View previous changes](https://github.com/mrlt8/docker-wyze-bridge/releases)

Expand Down
8 changes: 7 additions & 1 deletion app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## What's Changed in v2.5.2

* FIX: MQTT Naming Warning in Home Assistant #1046 Thanks @ejpenney!
* NEW: `{img}` variable for `motion_webhooks` #1044
* e.g., `MOTION_WEBHOOKS: http://0.0.0.0:123/webhooks/endpoint?camera={cam_name}&snapshot={img}`

## What's Changed in v2.5.1

* FIX `ON_DEMAND=False` option was broken in v2.5.0 #1036 #1037
Expand Down Expand Up @@ -386,4 +392,4 @@ Some ENV options have been deprecated:
* `MOTION_COOLDOWN` -> `BOA_COOLDOWN`


[View previous changes](https://github.com/mrlt8/docker-wyze-bridge/releases)
[View previous changes](https://github.com/mrlt8/docker-wyze-bridge/releases)
2 changes: 1 addition & 1 deletion app/wyzebridge/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def publish_discovery(cam_uri: str, cam: WyzeCamera, stopped: bool = True) -> No

payload = dict(
base_payload | data["payload"],
name=f"Wyze Cam {cam.nickname} {' '.join(entity.title().split('_'))}",
name=" ".join(entity.title().split("_")),
uniq_id=f"WYZE{cam.mac}{entity.upper()}",
)

Expand Down
2 changes: 1 addition & 1 deletion app/wyzebridge/wyze_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def webhook(self, uri: str, img: Optional[str] = None) -> None:
if url := env_cam("motion_webhooks", uri, style="original"):
logger.debug(f"[MOTION] Triggering webhook for {uri}")
msg = f"Motion detected on {uri}"
get_http_webhooks(url.format(cam_name=uri), msg, img)
get_http_webhooks(url.format(cam_name=uri, img=str(img)), msg, img)

def set_motion(self, mac: str, files: list) -> None:
for stream in self.streams.values():
Expand Down

0 comments on commit 2265112

Please sign in to comment.