Hue Essentials says "Away from Home" even though I am on the same network

I am on the same network. The diyhue is at 192.168.135.220.

The client (macOS) machine is at 192.168.134.105. The network is 192.168.132.5 and the netmask is 255.255.255.252, so it is factually on the same network.

When I try from iOS:

  • When selecting diyhue from the list of discovered bridges, the app crashes.
  • When manually inputting IP address of diyhue, configuration succeeds but it is unable to connect.

Thanks for the feedback.

As long as Hue Essentials is able to reach diyHue by its IP address it will connect locally. No advanced checks whether it’s the same network or so, it only checks if it can connect with the IP. If that fails, it falls back to Away from Home.

Can you please share your crash identifier? Crash identifier

Thanks for the reply!

UX Note: You can’t access the crash identifier if you haven’t configured a bridge. This creates a situation where, if someone only has a diyhue bridge, they cannot access their crash identifier.

My crash identifier is A1E0E536-946B-4667-B091-9E071D9EBBBF.

I also suspect diyhue has a network configuration issue, where I’ve detailed my observations here: DIYHue overwrites gateway in config file · Issue #943 · diyhue/diyHue · GitHub.

As long as Hue Essentials is able to reach diyHue by its IP address it will connect locally. No advanced checks whether it’s the same network or so, it only checks if it can connect with the IP. If that fails, it falls back to Away from Home.

As I understand it, this does not reflect my observations. It can connect by its IP address, as evidenced by the fact that the initial pairing works when I input the IP address. I can also connect to diyhue via Safari at the IP address. I will attach evidence. It seems like the initial connection succeeds, but all subsequent connections fail.


Thanks for the information. Unfortunately I could not find any crashes with your id, so not sure what is going on.

You said diyHue appears in the list of discovered bridges, so it is definitely reachable. Hue Essentials only shows bridges in the list if it can get a response from /api/config.

When you tap the connect button in your list of already added bridges, it will do a request to /api/<yourusername>. It seems this is failing with some sort of network error. If it was any other error Hue Essentials would have shown more details. I guess diyHue is returning something invalid, not sure. Will have to look into this.

When it does connect using Away from Home, it is connected through the diyHue server, so that works differently.

Based on your message, I ran through it again, keeping a closer eye on the HTTP logs on the diyHue side. I think you’ll find them interesting:

2023-10-25 23:02:39,049 - werkzeug - INFO - 192.168.134.100 - - [25/Oct/2023 23:02:39] "POST /api/ HTTP/1.1" 200 -
2023-10-25 23:02:40,047 - services.stateFetch - INFO - start lights sync
2023-10-25 23:02:40,079 - flaskUI.restful - DEBUG - {'devicetype': 'Hue Essentials#iPhone'}
2023-10-25 23:02:40,081 - werkzeug - INFO - 192.168.134.100 - - [25/Oct/2023 23:02:40] "POST /api/ HTTP/1.1" 200 -
2023-10-25 23:02:40,842 - werkzeug - INFO - 192.168.135.105 - - [25/Oct/2023 23:02:40] "GET /static/js/12.b22bce35.chunk.js HTTP/1.1" 304 -
2023-10-25 23:02:41,109 - flaskUI.restful - DEBUG - {'devicetype': 'Hue Essentials#iPhone'}
2023-10-25 23:02:41,110 - werkzeug - INFO - 192.168.134.100 - - [25/Oct/2023 23:02:41] "POST /api/ HTTP/1.1" 200 -
2023-10-25 23:02:41,414 - flaskUI.restful - DEBUG - [{'success': {'/config/linkbutton': {'lastlinkbuttonpushed': 1698274961}}}]
2023-10-25 23:02:41,420 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/config.yaml
2023-10-25 23:02:41,421 - werkzeug - INFO - 192.168.135.105 - - [25/Oct/2023 23:02:41] "PUT /api/<censored-1>/config HTTP/1.1" 200 -
2023-10-25 23:02:42,139 - flaskUI.restful - DEBUG - {'devicetype': 'Hue Essentials#iPhone'}
2023-10-25 23:02:42,140 - flaskUI.restful - DEBUG - [{'success': {'username': '<censored-2>'}}]
2023-10-25 23:02:42,153 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/config.yaml
2023-10-25 23:02:42,154 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/lights.yaml
2023-10-25 23:02:42,154 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/groups.yaml
2023-10-25 23:02:42,155 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/scenes.yaml
2023-10-25 23:02:42,155 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/rules.yaml
2023-10-25 23:02:42,155 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/resourcelinks.yaml
2023-10-25 23:02:42,156 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/schedules.yaml
2023-10-25 23:02:42,158 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/sensors.yaml
2023-10-25 23:02:42,159 - configManager.configHandler - DEBUG - Dump config file /config/diyhue/behavior_instance.yaml
2023-10-25 23:02:42,159 - werkzeug - INFO - 192.168.134.100 - - [25/Oct/2023 23:02:42] "POST /api/ HTTP/1.1" 200 -
2023-10-25 23:02:42,195 - werkzeug - INFO - 192.168.134.100 - - [25/Oct/2023 23:02:42] "GET /api/<censored-2> HTTP/1.1" 200 -

Notes:

  • 192.168.134.100 is my iPhone, it is what I used Hue Essentials from.
  • 192.168.134.105 is my laptop, which I used to click the “Link App” button.
  • censored-1 indicates the key in-use for the web app on my laptop.
  • censored-2 indicates the key in-use by Hue Essentials on iPhone.

So, at least as far as DiyHue is concerned, that 200 is being returned. I tried curling it myself from the laptop:

{
  "backup": {
    "errorcode": 0,
    "status": "idle"
  },
  "datastoreversion": "126",
  "dhcp": true,
  "factorynew": false,
  "internetservices": {
    "internet": "disconnected",
    "remoteaccess": "disconnected",
    "swupdate": "disconnected",
    "time": "disconnected"
  },
  "linkbutton": false,
  "modelid": "BSB002",
  "portalconnection": "disconnected",
  "portalservices": false,
  "portalstate": {
    "communication": "disconnected",
    "incoming": false,
    "outgoing": false,
    "signedon": false
  },
  "proxyaddress": "none",
  "proxyport": 0,
  "replacesbridgeid": null,
  "swupdate": {
    "checkforupdate": false,
    "devicetypes": {
      "bridge": false,
      "lights": [],
      "sensors": []
    },
    "notify": true,
    "text": "",
    "updatestate": 0,
    "url": ""
  },
  "swupdate2": {
    "autoinstall": {
      "on": true,
      "updatetime": "T14:00:00"
    },
    "bridge": {
      "lastinstall": "2020-12-11T17:08:55",
      "state": "noupdates"
    },
    "checkforupdate": false,
    "lastchange": "2020-12-13T10:30:15",
    "state": "unknown"
  },
  "zigbeechannel": 25,
  "Hue Essentials key": "<censored-3>",
  "Remote API enabled": false,
  "apiversion": "1.56.0",
  "bridgeid": "844709FFFE20214B",
  "ipaddress": "192.168.135.220",
  "netmask": "255.255.255.0",
  "gateway": "192.168.135.1",
  "mac": "84:47:09:20:21:4b",
  "name": "DiyHue Bridge",
  "swversion": "19561788040",
  "timezone": "Europe/London",
  "UTC": "2023-10-25T23:18:22",
  "localtime": "2023-10-26T00:18:22",
  "whitelist": {
    ...
    "<censored-2>": {
      "create date": "2023-10-25T23:10:52",
      "last use date": "2023-10-25T23:14:36",
      "name": "Hue Essentials#iPhone"
    } 
  }
}

Because I’m stubborn, I tried doing a PUT to set the netmask/gateway in config. While that did work, in that it was reflected in the config when I called back, it indeed did not make any difference in behavior.

As a sanity check, tried the API debugger from the same machine as I can successfully curl from.

Tried for both /config and /api/config.

I’ve managed to fix my issue. Details at Certificate can't be generated on first boot. (Supervisor) · Issue #20 · diyhue/hassio-addon · GitHub.

Thanks for explaining the pairing logic, it led me down the path that led me to the answer.

I also get the message “Away from home” when I am at the same network.
Is there a way for me to fix that? I am no programmer…
I’m using Android 14

Thanks in advance.