Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

Error when a hub have no devices #121

@Ronnie-J

Description

@Ronnie-J

Describe the bug
I did a fresh install of the latest docker iobroker and with this repo. When I link with my Eufy account I keep getting this error in the log. Im guessing from the description this.hub.devices is not iterable that it has something to do with one of my hubs having no devices.

To Reproduce
Build the iobroker with this recipe:

version: '2'

services:
  iobroker:
    restart: always
    image: buanet/iobroker:latest
    container_name: iobroker
    hostname: iobroker
    ports:
      - "8081:8081" # Main
      - "8082:8082" # Web Server
      - "8087:8087" # Rest API
    volumes:
      - iobrokerdata:/opt/iobroker

Install the adapter, authorize and the error will apper.

Expected behavior
I expected to have no error.

Screenshots & Logfiles

eufy-security.0 | 2021-04-14 22:41:09.938 | error | at processTicksAndRejections (internal/process/task_queues.js:97:5)
-- | -- | -- | --
eufy-security.0 | 2021-04-14 22:41:09.938 | error | at fulfilled (/opt/iobroker/node_modules/eufy-security-client/build/http/station.js:5:58)
eufy-security.0 | 2021-04-14 22:41:09.938 | error | at Generator.next (<anonymous>)
eufy-security.0 | 2021-04-14 22:41:09.938 | error | at Station.<anonymous> (/opt/iobroker/node_modules/eufy-security-client/build/http/station.js:177:43)
eufy-security.0 | 2021-04-14 22:41:09.938 | error | (979) TypeError: this.hub.devices is not iterable
eufy-security.0 | 2021-04-14 22:41:09.937 | error | (979) unhandled promise rejection: this.hub.devices is not iterable
Unhandled | 2021-04-14 22:41:09.937 | error | promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

Versions:

  • Adapter version: 0.5.2
  • JS-Controller version: 3.1.6
  • Node version: v12.20.1
  • Operating system: linux

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfixed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions