Skip to content

fix: online state, offline device delete, Node.js 26 tests, @iobroker/testing 6 - #880

Merged
DutchmanNL merged 1 commit into
mainfrom
claude/cloud-adapters-open-actions-ahcfka
Oct 1, 2026
Merged

DutchmanNL merged 1 commit into
mainfrom
claude/cloud-adapters-open-actions-ahcfka

Conversation

@DutchmanNL

Copy link
Copy Markdown
Contributor

Fixes the open online-state and device-delete bugs and the two repository-checker errors in #870, which are blocking the next stable update (#869).

Bug fixes

  • Log voll seit letzter stable #788, online state not refreshing with 0.7.3 #794: _online written as text. When a device couldn't be initialised, getDeviceJSON passed { val: false, ack: true } to create_state, which wrote it as the string '{"val":false,"ack":true}'. js-controller then logged has to be type "boolean" but received type "string", which is visible in the logs posted in Log voll seit letzter stable #788. It now writes false and marks the device disconnected. This is based on fix online state #792 by @arteck (co-author). That PR has merge conflicts, so I carried over the fix rather than its maxRetries = 0 change, which belongs to the feature request add maxRetries per device #793.
  • Log voll seit letzter stable #788: log spam. "Unable to initialise …" is now a warning once per outage. Later attempts for a device that stays offline are logged at debug level, and the flag resets once the device answers. This is what was asked for in the thread.
  • Unable to delete offline device in V0.9.2 #787: offline devices could not be deleted. The deleteDevice message used this.devices[ip].name (the friendly name) as the object ID. Device objects are keyed by MAC address, and a device that has been offline since adapter start has no name in memory, so deletion always failed with Device with IP … not found. It now uses the MAC address and falls back to the device objects when the device isn't in memory. delDevice also accepts instance numbers above 9.
  • README links to a document that is not in the repository #876: removed the README link to docs/DEPLOYMENT_SETUP.md, which doesn't exist and broke the iobroker.net docs build. A short paragraph about trusted publishing replaces it.

CI / repository checker

Tests (local, Node 22)

  • npm run lint: 0 errors (3 any warnings that were already there)
  • test:js 1, test:package 59, test:unit 49 passing
  • npm run test:integration: the adapter starts with @iobroker/testing 6

W3032 (the tag run for v0.9.2 failed) clears with the next successful release.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CnLX1Q3mvPvMb6JY4hHKfL


Generated by Claude Code

…/testing 6

- The online state of a device that cannot be initialised was written as
  the text '{"val":false,"ack":true}', which js-controller rejected with
  "has to be type boolean but received type string" (#788, #794). It is
  written as false again and the device is marked disconnected. Based on
  #792 by @arteck.
- "Unable to initialise" is logged as a warning once per outage, later
  attempts for a device that stays offline go to debug (#788).
- Deleting a device from the instance settings looked the object up by the
  device's friendly name instead of its MAC address, and devices offline
  since adapter start have no name in memory, so it always failed with
  "Device with IP ... not found" (#787). It now uses the MAC and falls back
  to the device objects for devices not in memory.
- delDevice: instance number in the ID prefix may have more than one digit.
- check-copilot-template.yml looked for open issues labelled both
  copilot-setup and automation, but update issues are labelled
  template-update, so a new issue was opened every week. It now matches
  on automation only.
- adapter-tests matrix covers 22.x, 24.x and 26.x (repo checker E3025, #872)
- @iobroker/testing ^5.3.0 -> ^6.3.0 (repo checker E0036)
- concurrency block in the checker's expected form (W3009)
- README: removed the link to docs/DEPLOYMENT_SETUP.md, which does not
  exist (#876)

Supersedes #792 and #873.

Co-authored-by: arteck <6681528+arteck@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CnLX1Q3mvPvMb6JY4hHKfL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants