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

Bifrost runs, but not able to be configured in Hue app (HA add-on) #88

Open
Intecpsp opened this issue Feb 26, 2025 · 10 comments
Open

Bifrost runs, but not able to be configured in Hue app (HA add-on) #88

Intecpsp opened this issue Feb 26, 2025 · 10 comments
Labels
bug Something isn't working question Further information is requested

Comments

@Intecpsp
Copy link

Intecpsp commented Feb 26, 2025

This issue is being opened up following chatter from Discord.

The first part was not being able to get Bifrost connected to Z2M (also HA add-on) or set up it's own bridge. I think the documentation around the config set up can be expanded here to fix that. Below are my configs

Z2M configuration.yaml snippet

frontend:
  enabled: true
  port: 8099 # The recommended HA port
  auth_token: <REDACTED>

Bifrost config.yaml snippets

bridge:
  name: Bifrost
  mac: <REDACTED> # MAC address of the HA server, can be found in internet router
  ipaddress: 192.168.10.234 # IP address of the HA server, can be found in Settings > System > Network > IPv4
  netmask: 255.255.255.0 # Network Mask of the HA server, can be found in Settings > System > Network > IPv4
  gateway: 192.168.10.1 # Gateway of the HA server, can be found in Settings > System > Network > IPv4
  timezone: Europe/Copenhagen # Hardcoded for now, only record found in https://github.com/chrivers/bifrost/blob/8957fa4ce32a1d463de8ccd5b356b62b2f2c3e51/src/hue/legacy_api.rs#L794
...
z2m:
  some-server:
    url: ws://homeassistant.local:8099/api?token=<REDACTED>

Also, in the Z2M config in the HA UI (Settings > Add-ons > Zigbee2MQTT > Configuration), go to the Network section at the bottom and move the Show disabled ports slider, then enter 8099 in the Frontend tcp-listen port, then Save, and Restart when prompted.

After getting that sorted out (and confirming NOTHING else on the HA server is using ports 80 or 443; oh, and deleting the generated cert.pem file for fresh generation) I came across this flow preventing me from adding the bridge to my app. Turns out, it's the Hue account causing issues. So I had to sign out (also, clear all storage from device), and then set up the app again WITHOUT a Hue account.

Now we're stuck on the current issue. The app hangs when trying to set up the timezone: video. I can confirm the Bifrost server and Ha server times appear to be in sync.

Update: just tried the dev branch, same behavior.

@BaronAdam
Copy link

I'm facing the same issue, my config is exctly the same (with my device info).

@Intecpsp
Copy link
Author

UPDATE: My HA server has automatically added a Philips Hue integration to the Bifrost server and it appears to be getting the correct data.

So maybe this issue is only related to the app? Android only, maybe?

@chrivers
Copy link
Owner

@Intecpsp The app (both for Android and iPhone) is known to be very picky, yes.

It's really quite strange what is causing this. Sadly, I can't reproduce it here :(

It could perhaps be related to the timezone - if you're not in Europe/Copenhagen, it's possible the app is trying to compensate for that.

Could you maybe try this for me:

  1. Set your phone's timezone to Europe/Copenhagen, and let the network set the clock.
    The time on your phone should then display the current time in Copenhagen.
  2. Reboot your phone, to make sure all programs pick up on the change
  3. Clean the hue app cache and data
  4. Try connecting the Hue app again
  5. If that doesn't work, try keeping the Copenhagen time zone, but setting your clock to the right local time. Then clean the hue app again, and try joining one more time.

Let me know if either of these make it any better.

Of course, it's not a permanent solution, but it would provide very useful data on where the problem might be hidden.

@Intecpsp
Copy link
Author

  1. Set your phone's timezone to Europe/Copenhagen, and let the network set the clock.
    The time on your phone should then display the current time in Copenhagen.

Do you have any idea what "Region" this would be? I have to set that before I can set the actual timezone, and "Europe" is not an option.

@chrivers
Copy link
Owner

What are the options? Is "Central Europe" or "Northern Europe" an option perhaps?

@Intecpsp
Copy link
Author

Intecpsp commented Mar 12, 2025

There are a lot of options and no form of "Europe" is to be found. Here is a vid I found showing that a region has to be selected before a timezone can be selected.

UPDATE: Found it under the Denmark region.

@Intecpsp
Copy link
Author

@Intecpsp The app (both for Android and iPhone) is known to be very picky, yes.

It's really quite strange what is causing this. Sadly, I can't reproduce it here :(

It could perhaps be related to the timezone - if you're not in Europe/Copenhagen, it's possible the app is trying to compensate for that.

Could you maybe try this for me:

  1. Set your phone's timezone to Europe/Copenhagen, and let the network set the clock.
    The time on your phone should then display the current time in Copenhagen.
  2. Reboot your phone, to make sure all programs pick up on the change
  3. Clean the hue app cache and data
  4. Try connecting the Hue app again
  5. If that doesn't work, try keeping the Copenhagen time zone, but setting your clock to the right local time. Then clean the hue app again, and try joining one more time.

Let me know if either of these make it any better.

Of course, it's not a permanent solution, but it would provide very useful data on where the problem might be hidden.

This doesn't seem to be the fix

@chrivers
Copy link
Owner

@Intecpsp thank you for testing and reporting back.

Just to be complete sure, you tested with the time zone set to "Denmark", and both with your clock to the correct (Danish) time, as well as the current local time?

If neither of those things help, then I think it's probably not actually related to time zones after all.

@Intecpsp
Copy link
Author

When I changed to Denmark it auto-populated Copenhagen (the only option) and changed the time (to 10 pm at the time). I ran through the steps you laid out and they did not allow me to pass the timezone page in the Hue app. I did look in my Clock app and it still has "Home" set to my timezone, but did not allow me to change it.

@chrivers
Copy link
Owner

Are you on Android or iPhone?

Surely, there's a way to change the time on your phone?

Sometimes, disabling "network time" is needed to manually set the time.

If you can find a way to test this on your phone (or any old phone you might have lying around, really), that would be greatly appreciated.

The same goes for anyone who sees this error. @BaronAdam, perhaps you are able to help us test these steps as well?

Thank you in advance.

@chrivers chrivers added bug Something isn't working question Further information is requested labels Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants