docker-wyze-bridge icon indicating copy to clipboard operation
docker-wyze-bridge copied to clipboard

BOA Server not starting

Open exiva opened this issue 2 years ago ā€¢ 24 comments

I can't seem to get the BOA server or webhooks to fire. I changed my environment to

environment:
    - [email protected]
    - WYZE_PASSWORD=haxme
    - NET_MODE=LAN
    - ENABLE_BOA=True
    - MOTION_HTTP=http://webhook.lan/event?cam=Back-Yard

and when I hover over the Info button, boa_url is None, and I'm not getting webhooks on motion. Testing with a v3 cam, has a SD installed in it.

the camera seem to be connecting in LAN mode, am I missing something?

2022/07/15 01:10:23 [Back Yard] šŸ“” Getting 120kb/s HD stream (20fps) via LAN mode (WiFi: 76%) FW: 4.36.9.139 šŸ”’ (DTLS) (2/3)

Using docker-wyze-bridge v1.7.3. I have a v3 on latest firmware, and a doorbell on latest firmware.

exiva avatar Jul 15 '22 01:07 exiva

This seems to be an known issue with some of the wyze firmware.

Will try to see if there's a workaround.

mrlt8 avatar Jul 15 '22 02:07 mrlt8

Oh, okay. So it's unstable & not a good replacement for OpenCV/Pamdiff at the moment. Perhaps a note in the docs about it's instability is warranted?

exiva avatar Jul 15 '22 04:07 exiva

Not yet. Seems like they're trying to do damage control and kill off boa completely after that article about the "always on" http server even though it was only accessible with the Timelapse feature.

I've been running the older firmware so didn't notice that they had actually switched to RDT which was what I initially wanted to use instead of boa since it should theoretically be able to work over P2P mode.

Not sure how far back the changes go, but if you run strings on iCamera you'd see that all references to boa are gone and replaced with rdt on the latest firmware versions.

mrlt8 avatar Jul 15 '22 05:07 mrlt8

Came to see if I was the only one and yes can confirm no "boa_url" shows for any of my cameras damn.

dnestico avatar Jul 15 '22 15:07 dnestico

Looks like boa was removed from the v3 on v4.36.8.32, so v4.36.8.26 should theoretically work.

Firmware v4.9.8.1002 for the v2 still seems to support boa as well as support for RDT.

mrlt8 avatar Jul 16 '22 02:07 mrlt8

Both my V2s and V3s are on the latest beta firmware so (except one has RTSP firmware) so guess I won't be able to use the boa server damn.

dnestico avatar Jul 16 '22 07:07 dnestico

Hi, some of you guys still have the v4.36.8.26 to get the boa server back working on my v3's.

Thanks

JochenKlenk avatar Jul 18 '22 12:07 JochenKlenk

https://download.wyzecam.com/firmware/v3/demo_wcv3_4.36.8.26.zip

mrlt8 avatar Jul 18 '22 15:07 mrlt8

@mrlt8 Just wondering, so I was reading the forums and some people said they had very little success when downloading timplapse videos when they switched to the RTSP firmware but almost none on the normal firmware.

Does the RTSP firmware include boa server or no? If it doesn't then oh well for me since my V3s are currently using RTSP firmware and my V2s will too since I managed to download the files before wyze removed them.

dnestico avatar Jul 18 '22 16:07 dnestico

There are some references to boa in the rtsp iCamera:

āžœ  v3_rtsp strings iCamera|grep boa
productservices/localstorage/timelapseboa.c
(%s) kill boa, timeNow:%ld, killTime:%ld
killall -9 boa
killall -9 boa  
/usr/boa/boa  
(%s) boa already off!
boaKiller
(%s) boa timer add fail, tmpId:%d
(%s) boa timer add ok, tmpId:%d
time_lapse_boa_open
time_lapse_boa_open
time_lapse_boa_save_alive
time_lapse_boa_save_alive
time_lapse_boa_close
time_lapse_boa_close
time_lapse_boa_init
(%s) boa init fail!
protocol_time_lapse_boa_server_func

mrlt8 avatar Jul 19 '22 02:07 mrlt8

Hi so I tested v4.36.8.26 on one cam and that also not work. Boa URL is NONE. Also I get some new errors now.

Fatal Python error: init_sys_streams: can't initialize sys standard streams Python runtime state: core initialized Traceback (most recent call last): File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 879, in exec_module File "", line 1012, in get_code File "", line 672, in _compile_bytecode KeyboardInterrupt 2022/07/19 10:33:50 [WyzeBridge] 172.30.32.2 - - [19/Jul/2022 10:33:50] "GET /snapshot/haustuer.jpg?1658219629285= HTTP/1.1" 304 - Traceback (most recent call last): File "/app/rtsp_event.py", line 7, in from datetime import datetime as dt File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 879, in exec_module File "", line 1012, in get_code File "", line 672, in _compile_bytecode

Thanks

JochenKlenk avatar Jul 19 '22 08:07 JochenKlenk

Could you run with DEBUG_LEVEL=debug and see if you can find the line around "Getting 120kb/s HD stream" where it shows something like:

{'status': '1', 'capacity': '30509', 'free': '2006'}

mrlt8 avatar Jul 19 '22 15:07 mrlt8

Hi, I set the debug command, but not seeing that output.

That is what I get.

2022/07/21 10:58:13 [terrasse ] šŸ”Š Audio Enabled - ALAW > AAC/16,000Hz 2022/07/21 10:58:152022/07/21 10:58:15 [RTSP][HAUSTUER] āœ… '/haustuer' stream is UP! (3/3)[RTSP][TERRASSE] āœ… '/terrasse' stream is UP! (3/3) Output file #0 does not contain any stream Output file #0 does not contain any stream 2022/07/21 10:58:44 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:44] "GET / HTTP/1.1" 200 - 2022/07/21 10:58:44 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:44] "GET /img/haustuer.jpg HTTP/1.1" 200 - 2022/07/21 10:58:44 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:44] "GET /img/terrasse.jpg HTTP/1.1" 200 - 2022/07/21 10:58:44 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:44] "GET /snapshot/haustuer.jpg?1658393925599= HTTP/1.1" 200 - Traceback (most recent call last): File "/app/rtsp_event.py", line 5, in import signal File "/usr/local/lib/python3.10/signal.py", line 14, in _IntEnum.convert( File "/usr/local/lib/python3.10/enum.py", line 563, in convert cls = cls(name, members, module=module) File "/usr/local/lib/python3.10/enum.py", line 387, in call return cls.create( File "/usr/local/lib/python3.10/enum.py", line 518, in create enum_class = metacls.new(metacls, class_name, bases, classdict) File "/usr/local/lib/python3.10/enum.py", line 298, in new enum_member.init(*args) KeyboardInterrupt 2022/07/21 10:58:44 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:44] "GET /snapshot/terrasse.jpg?1658393925599= HTTP/1.1" 200 - 2022/07/21 10:58:44 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:44] "GET /snapshot/terrasse.jpg?1658393925600= HTTP/1.1" 200 - 2022/07/21 10:58:45 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:45] "GET /snapshot/terrasse.jpg?1658393925600= HTTP/1.1" 304 - 2022/07/21 10:58:45 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:45] "GET /snapshot/haustuer.jpg?1658393925599= HTTP/1.1" 304 - 2022/07/21 10:58:45 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:45] "GET /snapshot/terrasse.jpg?1658393925599= HTTP/1.1" 304 - 2022/07/21 10:58:45 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:58:45] "GET /snapshot/haustuer.jpg?1658393925599= HTTP/1.1" 304 - 2022/07/21 10:58:45 [RTSP][TERRASSE] šŸ“– New client reading Fatal Python error: init_import_site: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "/usr/local/lib/python3.10/site.py", line 75, in import _sitebuiltins File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 879, in exec_module File "", line 1012, in get_code File "", line 672, in _compile_bytecode KeyboardInterrupt 2022/07/21 10:59:15 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:15] "GET /snapshot/haustuer.jpg?1658393955846= HTTP/1.1" 200 - Fatal Python error: init_import_site: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "/usr/local/lib/python3.10/site.py", line 73, in import os File "/usr/local/lib/python3.10/os.py", line 29, in from _collections_abc import _check_methods File "/usr/local/lib/python3.10/_collections_abc.py", line 1099, in class MutableSequence(Sequence): File "/usr/local/lib/python3.10/abc.py", line 106, in new cls = super().new(mcls, name, bases, namespace, **kwargs) KeyboardInterrupt 2022/07/21 10:59:15 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:15] "GET /snapshot/terrasse.jpg?1658393955848= HTTP/1.1" 200 - Traceback (most recent call last): File "/app/rtsp_event.py", line 7, in from datetime import datetime as dt File "/usr/local/lib/python3.10/datetime.py", line 1560, in time.resolution = timedelta(microseconds=1) File "/usr/local/lib/python3.10/datetime.py", line 515, in new s += int(seconds) # can't overflow KeyboardInterrupt 2022/07/21 10:59:15 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:15] "GET /snapshot/terrasse.jpg?1658393955848= HTTP/1.1" 304 - 2022/07/21 10:59:15 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:15] "GET /snapshot/haustuer.jpg?1658393955846= HTTP/1.1" 304 - 2022/07/21 10:59:44 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:44] "GET /snapshot/terrasse.jpg?1658393985606= HTTP/1.1" 200 - Traceback (most recent call last): File "/app/rtsp_event.py", line 5, in import signal File "/usr/local/lib/python3.10/signal.py", line 3, in from enum import IntEnum as _IntEnum File "/usr/local/lib/python3.10/enum.py", line 814, in class Flag(Enum): File "/usr/local/lib/python3.10/enum.py", line 170, in prepare enum_dict = _EnumDict() KeyboardInterrupt 2022/07/21 10:59:44 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:44] "GET /snapshot/haustuer.jpg?1658393985606= HTTP/1.1" 200 - 2022/07/21 10:59:45 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:45] "GET /snapshot/haustuer.jpg?1658393985606= HTTP/1.1" 304 - 2022/07/21 10:59:45 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:45] "GET /snapshot/terrasse.jpg?1658393985606= HTTP/1.1" 304 - 2022/07/21 10:59:49 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:49] "GET / HTTP/1.1" 200 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /img/haustuer.jpg HTTP/1.1" 304 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /img/terrasse.jpg HTTP/1.1" 304 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /snapshot/terrasse.jpg?1658393991006= HTTP/1.1" 200 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /snapshot/terrasse.jpg?1658393991007= HTTP/1.1" 200 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /snapshot/haustuer.jpg?1658393991005= HTTP/1.1" 200 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /snapshot/haustuer.jpg?1658393991005= HTTP/1.1" 304 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /snapshot/terrasse.jpg?1658393991007= HTTP/1.1" 304 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /snapshot/terrasse.jpg?1658393991006= HTTP/1.1" 304 - 2022/07/21 10:59:50 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 10:59:50] "GET /snapshot/haustuer.jpg?1658393991005= HTTP/1.1" 304 - 2022/07/21 11:00:20 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 11:00:20] "GET /snapshot/haustuer.jpg?1658394021004= HTTP/1.1" 200 - 2022/07/21 11:00:20 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 11:00:20] "GET /snapshot/haustuer.jpg?1658394021004= HTTP/1.1" 304 - 2022/07/21 11:00:20 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 11:00:20] "GET /snapshot/terrasse.jpg?1658394021005= HTTP/1.1" 200 - 2022/07/21 11:00:20 [WyzeBridge] 172.30.32.2 - - [21/Jul/2022 11:00:20] "GET /snapshot/terrasse.jpg?1658394021005= HTTP/1.1" 304 -

JochenKlenk avatar Jul 20 '22 08:07 JochenKlenk

Is there any update on RDT to get web server and webhooks on latest wyze fw?

exiva avatar Aug 14 '22 18:08 exiva

Still need to get the authentication working with the RDT_Client_Create() callback.. I believe the credentials are "admin" and the password is the ENR for the camera, but I keep getting RDT_Create failed[-10021]!!:

/** RDT fails to create safe channel */
#define     RDT_ER_CREATE_DTLS_FAIL                 -10021

mrlt8 avatar Aug 19 '22 04:08 mrlt8

Maybe the latest update fixed the boa server issue for some of the cameras šŸ‘€

All of them are running RTSP firmware and as you can see 2 of them have the "SD card" button, although doesn't seem to do much so far unless that expected and only one of them actually works so far

Screen Shot 2022-08-25 at 1 07 15 PM Screen Shot 2022-08-25 at 1 05 16 PM

dnestico avatar Aug 25 '22 17:08 dnestico

That's interesting, can you check the "sdParm" in the camera details? Boa info may also be missing from your Luna cam since it's not connected to the bridge.

I was originally planning to add the option to download/view all the recordings/alarms, but put that on pause since boa is missing on the newer firmware. You can read more about accessing the SD card over boa here: https://github.com/HclX/WyzeHacks/blob/master/info/http_server.md

mrlt8 avatar Aug 26 '22 00:08 mrlt8

Just checked again now it's only showing SD card option on the garage cam with that same white screen I sent before and also weird my Luna cam would be disconnected cuz just checked the RTSP stream and its working fine so not a big deal. Here is what "sdParm" says:

**{ "capacity": "30420", "free": "1149", "status": "1" }**

Screen Shot 2022-08-25 at 9 05 42 PM Screen Shot 2022-08-25 at 9 06 06 PM

dnestico avatar Aug 26 '22 01:08 dnestico

The camera will kill the boa server after some time so that could be why it's not showing up. However, the bridge should attempt to restart it if it can't reach the boa server. If you check the logs, you should see something like starting boa server.

Boa is probably not showing up on your luna cam because you have on-demand enabled. Try streaming from the camera and refresh the page to see if it shows up.

As for the SD Card page, that's actually coming from the camera itself (notice the url is using the camera's IP address). You can navigate around by appending the folder name to the url. e.g. to view the record folder where all the recordings get stored:

http://<my.cam.i.p>/cgi-bin/hello.cgi?name=/record

To actually download stuff off the SD card, you'd need to use

http://<my.cam.i.p>/SDPath/record/filename.mp4

mrlt8 avatar Aug 26 '22 02:08 mrlt8

I went to stream from the camera but don't see "starting boa server" in the logs, I do see it for another camera though which shows the SD card button aka the garage one like before.

For the luna cam when I went to watch it live in the webview by clicking "HLS" after waiting forever for the logs to load in HA, the logs just said the usual client reading stuff.

As for the garage cam maybe the boa server is working good because the logs keep showing logs like this "2022/08/25 23:01:45 [Garage Cam] Pulling photo file from camera (file_name='20220825_23_01_49.jpg')"

And thanks, I will check out those folders soon.

dnestico avatar Aug 26 '22 03:08 dnestico

Hi there, is there a workaround for getting notification on movement with the wyze-cams on the latest firmware? I'm currently running wyze-bridge -> camera.ui to get HKSV in homekit. My goal is to be able to get motion alerts working. It seems the MOTION_HTTP URL never gets called as BOA is no longer included in the firmware?

TristanBrotherton avatar Sep 01 '22 23:09 TristanBrotherton

Hi there, is there a workaround for getting notification on movement with the wyze-cams on the latest firmware? I'm currently running wyze-bridge -> camera.ui to get HKSV in homekit. My goal is to be able to get motion alerts working. It seems the MOTION_HTTP URL never gets called as BOA is no longer included in the firmware?

I initially tried the camera ui in homebridge but motion never worked for me. Now Iā€™m using scrypted with the opencv motion plugin. It took some tweaking the plugin settings to dampen detection a bit for my cams since I was getting way to many for tree shadow motion, but I now get motion notifications closer to how I want from the home app.

cheme75 avatar Sep 02 '22 00:09 cheme75

Not yet. The camera doesn't seem to expose any motion flags, so one of our options is to try to use RDT, which is what I believe they're using to transfer the time lapse videos from the camera to the mobile app and check for new 'alarm' files that get created on motion, but I'm still struggling to authenticate with the camera over RDT - I believe we need to use IOTC channel 10 with "admin" as the user and the ENR (parent ENR on the outdoor) as the password.

I believe the camera uses MQTT to publish motion to the app over AWS IOT Core, so if we could somehow connect to that, we'd be able to grab the motion events directly as well as make changes to the camera.

mrlt8 avatar Sep 03 '22 05:09 mrlt8

@mrlt8 It would be awesome if the motion events thing ever got figured out as I would 100% use those while since right now Im trying to train frigate to be more accurate and faster but haven't gotten it to the level wyzes person detection yet sadly, and also the doorbell still has issues with being behind so I've basically given up on that at this point and instead using my porch camera which is looking at same area.

dnestico avatar Sep 03 '22 18:09 dnestico