Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New to HACS | Only seeing option to download not to install, can't get API key #89

Closed
kmanan opened this issue Jan 8, 2023 · 18 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request question

Comments

@kmanan
Copy link

kmanan commented Jan 8, 2023

Hi, I'm sure I am missing something basic here but the instructions say Install to HACS but I am only seeing Download button. And then in Integrations, it is asking for an API key, I don't know where to get the API key. What am I doing wrong?

@jcgoette
Copy link
Owner

jcgoette commented Jan 8, 2023

Install to HACS

Not sure where you are getting this from?

I don't know where to get the API key.

Under user settings in BB.

@kmanan
Copy link
Author

kmanan commented Jan 8, 2023

HACS
Navigate to integrations section.
Click "Explore & Add Repositories" in the bottom right corner.
Search for "Baby Buddy".
Click "INSTALL THIS REPOSITORY IN HACS".
Click "Install".

https://github.com/jcgoette/baby_buddy_homeassistant#hacs

I think I figured out what my issue is. I am not running BabyBuddy anywhere. So now I'm installing BabyBuddy as an add-on using https://github.com/OttPeterR/addon-babybuddy. And then I'll get the API key. Would be great if you could consider idiot-proofing the instructions since yours is the more popular search result for Baby Buddy Home Assistant:

  1. Install BabyBuddy instance as HA add-on through https://github.com/OttPeterR/addon-babybuddy
  2. Download https://github.com/jcgoette/baby_buddy_homeassistant through HACS
  3. Install download integration through HA Integrations menu

@kmanan
Copy link
Author

kmanan commented Jan 8, 2023

Ok, so was able to make significant progress but am not able to get your integration to work. It keeps saying Invalid Authentication. I am able to access my Baby Buddy Add-on through HA. And also through HA iPhone app on 5G. So Baby Buddy seems to be working, unable to figure out why I keep getting Invalid authentication.

@jcgoette
Copy link
Owner

jcgoette commented Jan 8, 2023

Would be great if you could consider idiot-proofing the instructions since yours is the more popular search result for Baby Buddy Home Assistant

I can add something about having to have BB up and running first, but not everyone is hosting BB via HA... :)

I can try spinning up BB Add-on at some point to help troubleshoot. Maybe @OttPeterR can give an assist in the meantime.

@kmanan
Copy link
Author

kmanan commented Jan 8, 2023

My best guess is that it has something to do with the fact that I am running my HA through a duckdns domain. I setup the nginx stuff but that's also questionable (I'm a n00b at all this). It's the port and host entries to setup your integ that's probably what I am doing wrong. And I'm not entering any path since I don't know what needs to go there

@jcgoette
Copy link
Owner

jcgoette commented Jan 8, 2023

I trust you read through this?

@kmanan
Copy link
Author

kmanan commented Jan 8, 2023

I did. But I am not able to get it to run exactly as the instructions say. As of now my, I can only access my BB through https://example.duckdns.org/68152197_baby_buddy It's not on a subdomain like the instructions says because the BB instance keeps giving an error. So my setup is a bit wonky atm and don't know how to fix it

@jcgoette
Copy link
Owner

jcgoette commented Jan 9, 2023

If you can access the BB instance via a domain like you posted above, I think the integration should be able to work. Maybe try something like this:

@OttPeterR
Copy link

Hey, I'm in this tread now too. Unfortunately this is the first time I've heard about this issue so we'll be solving a new problem together! The error seems more involved with communication between the BB application and the HA integration and less-so of my addon (it just packages BB up for easy installation) but I'll share how I have my stuff setup so maybe you could get some inspiration from that 😃

  1. install nginx proxy and baby buddy HA addons
  2. inside HA BB addon config, set port to 8910
  3. access BB via hassio.local:8910 -> grab API key -> setup HA integration

And for external access, inside nginx make a proxy host like so:

  • bb.yourdomain.duckdns.org
  • forward hostname/ip:
  • forward port: 8910
  • yes websockets, yes block common exploits
  • [ssl tab] generate a new cert and yes force ssl

hope this helps 😄

@kmanan
Copy link
Author

kmanan commented Jan 9, 2023

Hey, I'm in this tread now too. Unfortunately this is the first time I've heard about this issue so we'll be solving a new problem together! The error seems more involved with communication between the BB application and the HA integration and less-so of my addon (it just packages BB up for easy installation) but I'll share how I have my stuff setup so maybe you could get some inspiration from that 😃

  1. install nginx proxy and baby buddy HA addons
  2. inside HA BB addon config, set port to 8910
  3. access BB via hassio.local:8910 -> grab API key -> setup HA integration

And for external access, inside nginx make a proxy host like so:

  • bb.yourdomain.duckdns.org
  • forward hostname/ip:
  • forward port: 8910
  • yes websockets, yes block common exploits
  • [ssl tab] generate a new cert and yes force ssl

hope this helps 😄

hey! Thanks for responding. I added a comment to your repo as well. But this setup simply doesn't work for me. Here's what happens:

Currently, I access my HA using https://example.duckdns.org
In here, on the left menu, I have Baby Buddy option and I can access the dashboard at https://example.duckdns.org/68152197_baby_buddy/dashboard -> this is HTTPS enabled

Now, when i go thr Ngix route, everything pretty much breaks. Once I change the CSRF to be https://babybuddy.example.duckdns.org

And now I go into my HA which is example.duckdns.org -> my Baby Buddy dashboard URL is broken and BB dashboard is not accessible unless I manually enter the URL babybuddy.example.duckdns.org in the browser URL bar and then get to the BB dashboard. And this URL is not HTTPS even though my nginx is all green.

@kmanan
Copy link
Author

kmanan commented Jan 11, 2023

Seems like things are working. I changed the port, no Nginx, no mariaDB. In the Baby Buddy integration from @OttPeterR the CSRF record is https://example.duckdns.org and port is random. Then when adding the @jcgoette integration, the host is the RPi IP (format is http://RPi IP:randomport) No path and the API key. Now I have 4 sensors ready!

@jcgoette
Copy link
Owner

Can any beneficial documentation changes come out of this? Either for this repo or @OttPeterR 's?

@OttPeterR
Copy link

I think a general disambiguating section that could be copy pasted to each repo might help. i.e. explaining the differences of the addon, integrations, and actual BB application. I'll try and write up something tomorrow...

@kmanan
Copy link
Author

kmanan commented Jan 12, 2023

I think it's more than that (that definitely took me a while to figure out). I didn't need Nginx or use the duckdns.org path in the host field of @jcgoette's integration. Had to enter the IP address and port in the host section. If HA is on example.duckdns.org worked very differently for me than the how-to section. Got it working now, next challenge is to figure out how to make Baby Buddy expose more sensors, you'll see me annoying other devs now 😂😂

@jcgoette
Copy link
Owner

So then @kmanan , "can any beneficial documentation changes come out of this? Either for this repo or @OttPeterR 's?"

@kmanan
Copy link
Author

kmanan commented Jan 16, 2023

Yes, sorry. Been caught up with errands. Here are my suggestions:

For @OttPeterR's repo:

  1. A disclaimer that nginx etc. is not needed in case one already has duckdns on Home Assistant OS setup (I recently learned that Home Assistant OS and Home Assistant Docker are 2 different things and work differently)
  2. For the instructions itself:
  3. Enable Addon
  4. Toggle ON show in sidebar
  5. Under Configuration tab:
  1. Check if HA left sidebar BabyBuddy link shows login page and if you can login
  2. If babybuddy gives error for untrusted CSRF origins -> something is incorrect in csrf trusted origins in Add-On config

Now for this repo:

  1. Have BabyBuddy setup and running either in a docker container, somewhere in Linux, or using Peter's Add-On
  2. Add integration:
  • Host: http://192.168.xyz.pqr:<port provided in Peter's addon or your specific BB install>
  • Port: Provide port
  • No Path
  • API key: Get from Baby Buddy add-on (click left bar -> login -> settings -> API)
  • Should have some sensors showing up
  • Go to Baby Buddy add-on, create baby and start adding data
  • More sensors should start showing up

Those are my suggestions. I am running into an issue where I am unable to get the Last Feed sensor show when the last feed was. Last Diaper Change is working as expected.

@jcgoette
Copy link
Owner

I agree with some of these. I'll update the README eventually.

Re: your last point, has been requested many times before. I just need to bite the bullet and do a breaking change.

@kocsenc
Copy link

kocsenc commented Oct 12, 2023

@kmanan can you screenshot what your BB Integration configuration looks like? It sounds like what fixed it for you was using the port inside of the host field? I'm running into this exact issue and still haven't been able to figure out the exact config for the integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request question
Projects
None yet
Development

No branches or pull requests

4 participants