calebolson123 / BabySleepCoach

DIY Baby Sleep Tracking
https://calebolson.com
Other
209 stars 38 forks source link

Cant seem to get it started; Services not available? #38

Open wouterverduin opened 8 months ago

wouterverduin commented 8 months ago

Hi all! Been dying to try this out but cant get it running for now. Used the method in the readme with as little adjustments as possible (change port IP and backand tot my IP adress 192.168.1.50). After various attempts i get this:

Bounds not set, not running AI logic.
Compiled with warnings.

[eslint]
src/Charts.js
  Line 2:8:     'eventsWithinRange' is defined but never used                                                              no-unused-vars
  Line 3:10:    'FontAwesomeIcon' is defined but never used                                                                no-unused-vars
  Line 4:10:    'faSeedling' is defined but never used                                                                     no-unused-vars
  Line 4:22:    'faTree' is defined but never used                                                                         no-unused-vars
  Line 100:11:  'offset' is assigned a value but never used                                                                no-unused-vars
  Line 102:9:   'dayCount' is assigned a value but never used                                                              no-unused-vars
  Line 131:19:  'timeDiff' is assigned a value but never used                                                              no-unused-vars
  Line 168:3:   Date prototype is read only, properties should not be added                                                no-extend-native
  Line 198:34:  Expected '===' and instead saw '=='                                                                        eqeqeq
  Line 233:8:   React Hook useMemo has a missing dependency: 'forecast'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/CroppableVideoFeed.tsx
  Line 74:11:  'result' is assigned a value but never used                                                                @typescript-eslint/no-unused-vars
  Line 81:11:  'result' is assigned a value but never used                                                                @typescript-eslint/no-unused-vars
  Line 89:9:   img elements must have an alt prop, either with meaningful text, or an empty string for decorative images  jsx-a11y/alt-text

src/Settings.tsx
  Line 31:73:  Expected '===' and instead saw '=='  eqeqeq

src/SleepStats.js
  Line 3:73:    'faSeedling' is defined but never used  no-unused-vars
  Line 3:85:    'faTree' is defined but never used      no-unused-vars
  Line 111:22:  Expected '===' and instead saw '=='     eqeqeq
  Line 140:22:  Expected '===' and instead saw '=='     eqeqeq

src/VideoFeed.tsx
  Line 56:30:   '_notPresentProba' is assigned a value but never used                                                                                                                                                                                      @typescript-eslint/no-unused-vars
  Line 56:48:   '_time' is assigned a value but never used                                                                                                                                                                                                 @typescript-eslint/no-unused-vars
  Line 66:6:    React Hook useEffect has a missing dependency: 'setModelProba'. Either include it or remove the dependency array. If 'setModelProba' changes too often, find the parent component that defines it and wrap that definition in useCallback  react-hooks/exhaustive-deps
  Line 94:63:   Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations                                                                                                                                               no-mixed-operators
  Line 94:104:  Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations                                                                                                                                               no-mixed-operators
  Line 97:42:   img elements must have an alt prop, either with meaningful text, or an empty string for decorative images                                                                                                                                  jsx-a11y/alt-text

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

WARNING in [eslint]
src/Charts.js
  Line 2:8:     'eventsWithinRange' is defined but never used                                                              no-unused-vars
  Line 3:10:    'FontAwesomeIcon' is defined but never used                                                                no-unused-vars
  Line 4:10:    'faSeedling' is defined but never used                                                                     no-unused-vars
  Line 4:22:    'faTree' is defined but never used                                                                         no-unused-vars
  Line 100:11:  'offset' is assigned a value but never used                                                                no-unused-vars
  Line 102:9:   'dayCount' is assigned a value but never used                                                              no-unused-vars
  Line 131:19:  'timeDiff' is assigned a value but never used                                                              no-unused-vars
  Line 168:3:   Date prototype is read only, properties should not be added                                                no-extend-native
  Line 198:34:  Expected '===' and instead saw '=='                                                                        eqeqeq
  Line 233:8:   React Hook useMemo has a missing dependency: 'forecast'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/CroppableVideoFeed.tsx
  Line 74:11:  'result' is assigned a value but never used                                                                @typescript-eslint/no-unused-vars
  Line 81:11:  'result' is assigned a value but never used                                                                @typescript-eslint/no-unused-vars
  Line 89:9:   img elements must have an alt prop, either with meaningful text, or an empty string for decorative images  jsx-a11y/alt-text

src/Settings.tsx
  Line 31:73:  Expected '===' and instead saw '=='  eqeqeq

src/SleepStats.js
  Line 3:73:    'faSeedling' is defined but never used  no-unused-vars
  Line 3:85:    'faTree' is defined but never used      no-unused-vars
  Line 111:22:  Expected '===' and instead saw '=='     eqeqeq
  Line 140:22:  Expected '===' and instead saw '=='     eqeqeq

src/VideoFeed.tsx
  Line 56:30:   '_notPresentProba' is assigned a value but never used                                                                                                                                                                                      @typescript-eslint/no-unused-vars
  Line 56:48:   '_time' is assigned a value but never used                                                                                                                                                                                                 @typescript-eslint/no-unused-vars
  Line 66:6:    React Hook useEffect has a missing dependency: 'setModelProba'. Either include it or remove the dependency array. If 'setModelProba' changes too often, find the parent component that defines it and wrap that definition in useCallback  react-hooks/exhaustive-deps
  Line 94:63:   Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations                                                                                                                                               no-mixed-operators
  Line 94:104:  Unexpected mix of '&&' and '||'. Use parentheses to clarify the intended order of operations                                                                                                                                               no-mixed-operators
  Line 97:42:   img elements must have an alt prop, either with meaningful text, or an empty string for decorative images                                                                                                                                  jsx-a11y/alt-text

webpack compiled with 1 warning
No issues found.
Bounds not set, not running AI logic.

I continue to receive the "bounds not set.." message after this.

Even tried to get it started with: docker-compose up --build -d baby-sleep-coach

Any advice is well appreciated!

ikbiz commented 7 months ago

I have the same issue.

bbjay commented 7 months ago

I continue to receive the "bounds not set.." message after this.

This is normal as long as you haven't configured the focus region in the crop-tab. The other messages are just warnings, you can ignore them.

Are you seeing the camera video feed? If not, which camera are you using and what CAM_URL did you configure for it?

ikbiz commented 7 months ago

I am not seeing the camera feed. I'm using a Tapo C200 camera that I can access using VLC under the URL: rtsp://[username]:[password]@[Camera_IP]:554/stream1 The CAM_URL is the same URL.

I am also getting these errors (I apologize if I need to start another thread instead of adding on this one): ERROR Failed to fetch TypeError: Failed to fetch at http://localhost.local/static/js/bundle.js:816:54 at http://localhost.local/static/js/bundle.js:1613:80 at getSleepNotificationsEnabled (http://localhost.local/static/js/bundle.js:1023:34) at Settings (http://localhost.local/static/js/bundle.js:1027:36) at renderWithHooks (http://localhost.local/static/js/bundle.js:79874:22) at updateFunctionComponent (http://localhost.local/static/js/bundle.js:82756:24) at beginWork (http://localhost.local/static/js/bundle.js:84468:20) at beginWork$1 (http://localhost.local/static/js/bundle.js:89419:18) at performUnitOfWork (http://localhost.local/static/js/bundle.js:88688:16) at workLoopSync (http://localhost.local/static/js/bundle.js:88611:9) at renderRootSync (http://localhost.local/static/js/bundle.js:88584:11) at performSyncWorkOnRoot (http://localhost.local/static/js/bundle.js:88276:24)

Thanks again for your help.

bbjay commented 7 months ago

Do you see these errors in the webbrowser? What does your .env look like?

ikbiz commented 7 months ago

Yes, those errors are in the web-browser. Here is the .env file: CAM_URL= rtsp://{username}:{password}@{Camera_IP}:554/stream1 # full url of the baby camera APP_DIR=/usr/app/babysleepcoach # location of app root, primarily used for docker DEBUG=True OWL=False # lol VIDEO_PATH=/usr/app/babysleepcoach/video # for debugging & testing HATCH_IP=192.168.HATCH.IP # optional REACT_APP_BACKEND_IP=localhost:8001 # ip of flask server. Probably just localhost REACT_APP_RESOURCE_SERVER_IP=localhost:8000 # ip of resource server PORT=80 # port web app serves assets from

bbjay commented 7 months ago

Just to be sure, in CAM_URL you replaced the place holder values and it looks something like rtsp://user:123@192.168.1.11:554/stream1 correct?

Then you can try to replace localhost with pi-server.local in both REACTAPP* variables.

ikbiz commented 7 months ago

Thank you! Changing the REACT_APP links fixed it and it's up and running now.