Commit Graph
210 Commits
Author SHA1 Message Date
dependabot[bot]andGitHub 58c63fcf1a chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/commits)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 20:59:34 +00:00
github-actions[bot]andGitHub 4eb196c7c2 Merge pull request #188 from ioBroker/dependabot/npm_and_yarn/alcalzone/release-script-5.2.1
chore(deps-dev): bump @alcalzone/release-script from 5.2.0 to 5.2.1
2026-06-16 20:56:09 +00:00
dependabot[bot]andGitHub c1a354803c chore(deps-dev): bump @alcalzone/release-script from 5.2.0 to 5.2.1
Bumps [@alcalzone/release-script](https://github.com/AlCalzone/release-script) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/AlCalzone/release-script/releases)
- [Changelog](https://github.com/AlCalzone/release-script/blob/master/CHANGELOG.md)
- [Commits](https://github.com/AlCalzone/release-script/compare/v5.2.0...v5.2.1)

---
updated-dependencies:
- dependency-name: "@alcalzone/release-script"
  dependency-version: 5.2.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-16 20:53:16 +00:00
BluefoxandGitHub a3e29e0580 Merge pull request #182 from ioBroker-Bot/update-from-template-W8917-dependabot-addIgnoreTypesNode-1780171547
[iobroker-bot] Add Dependabot Ignore Rule for @types/node Major Version Updates
2026-06-16 22:52:05 +02:00
github-actions[bot] 85b4f519e1 Update from template: W8917-dependabot-addIgnoreTypesNode 2026-05-30 20:06:17 +00:00
GermanBluefox 21a11d9675 chore: release v2.1.0
* (mokusone) Added optional entity exclude filter with glob patterns, configurable via the admin UI, plus a verbose-logging toggle for inspecting matches
* (@klein0r) Use `/core/` instead of `/api/` when connecting to supervisor directly (e.g., in ha app)
* (@klein0r) Use ENV var SUPERVISOR_TOKEN as fallback for password
v2.1.0
2026-05-16 20:08:21 +02:00
GermanBluefox 1883937e4a Bump version 2026-05-16 20:07:53 +02:00
BluefoxandGitHub 962189ba74 Merge pull request #177 from mokusone/upstream-pr-entity-filter
Add optional entity exclude filter with verbose logging
2026-05-16 19:50:10 +02:00
7dd63fa9c8 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-16 19:49:12 +02:00
BluefoxandGitHub 5f57a27ff6 Merge branch 'master' into upstream-pr-entity-filter 2026-05-16 19:20:43 +02:00
GermanBluefox db95c5c6c5 Fixed linter 2026-05-16 19:17:55 +02:00
GermanBluefox 34ac9d9220 Fixed linter 2026-05-16 19:11:49 +02:00
BluefoxandGitHub 262704dc00 Merge pull request #170 from ioBroker-Bot/update-from-template-S6020-addChangelogOld-1777809390
[iobroker-bot] Add CHANGELOG_OLD.md to store older changelog entries
2026-05-16 19:09:09 +02:00
BluefoxandGitHub 12e59a82ef Merge pull request #174 from biglouis/fix/dynamic-attribute-objects-on-state-changed
fix: dynamically create missing attribute objects in state_changed handler
2026-05-16 19:06:47 +02:00
BluefoxandGitHub 488627f37c Merge pull request #166 from klein0r/master
Use /core/ instead of /api/ when connecting to supervisor directly
2026-05-16 19:06:18 +02:00
BluefoxandGitHub 664d55bbe9 Merge pull request #160 from ioBroker-Bot/update-from-template-X0000-updateNodeJsAtTestAndRelease-1775505314
[iobroker-bot] Update Node.js versions in test-and-release workflow
2026-05-16 19:00:43 +02:00
BluefoxandGitHub 3ab1492c4d Merge pull request #156 from ioBroker-Bot/update-from-template-X0000-updateDependabotSettings-1775001747
[iobroker-bot] Update Dependabot Configuration – Add npm Cooldown
2026-05-16 19:00:26 +02:00
GermanBluefox 2e267c03dd Fixing repo checker issues 2026-05-16 18:59:10 +02:00
mokusone 0512ee7cd3 fix(filter): cleanup must work for flat-state entities (no parent channel)
The previous cleanup implementation only iterated objects with
type === 'channel' and read entity_id from native. Both assumptions
break for entities written by older adapter versions: those exist as
flat states under hass.0.entities.<domain>.<entity_id>.<sub> with no
parent channel object and often no native.entity_id.

The admin UI shows them as folders because sub-states are present, but
`iobroker object get hass.0.entities.text.iob_…` returns "not found".
So the cleanup found nothing to delete even with valid patterns.

Refactor: iterate every object under entities.*, derive entity_id from
the first two path components after the namespace prefix, group by
entity_id, then delete each id individually (longest first, no
recursive flag — there is no parent to recurse into). Custom-config
protection still applies per entity group.

Works for both old flat-state and new channel+sub-state structures.
2026-05-15 04:14:48 +02:00
mokusone a40dc58e35 feat(filter): add cleanupExcludedOnStart option to delete stale objects
When enabled, on each adapter start the adapter scans all existing
hass.0.entities.* channels and deletes those whose entity_id matches
any of the configured excludePatterns. This complements the existing
filter (which only prevents new objects from being created) by also
cleaning up objects that were synced before the filter was activated
or before the patterns were extended.

Safety:
- Channels (and any of their sub-states) holding common.custom config
  (history/influxdb/sql) are kept and a warning is logged so the user
  can decide manually.
- Existing deleteStaleObjects() 50% sanity-guard is intentionally NOT
  applied here — the user explicitly opted in to the cleanup.
- Per-id deletion only logs when verboseFilterLog is also active.

Default is false (opt-in). Adds new admin checkbox + i18n keys for all
11 languages (machine translations for non-en/de still pending).
2026-05-15 04:14:41 +02:00
mokusoneandClaude Opus 4.7 a4932a1a8c fix(admin): remove invalid 'multiline' property from excludePatterns
The JSON Config schema for type 'text' enforces additionalProperties:false
and 'multiline' is not a documented property. Its presence caused the
admin UI to fail schema validation and refuse to render the panel.

Multi-line behaviour is already provided by 'minRows: 6' alone — the
schema explicitly states: "Set this attribute to 2 or more if you want
to have a textarea with more than one row."

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 22:12:51 +02:00
mokusone 7b5679a753 docs: document entity exclude filter and add changelog entry
Adds a new README section explaining the glob syntax, providing examples and
covering the verbose-logging toggle. Also adds a WORK IN PROGRESS changelog
entry for the next release.
2026-05-14 11:40:28 +02:00
mokusone fc7efd4768 feat(filter): add verbose filter logging option
New `verboseFilterLog` boolean (default `false`). When enabled, the initial
sync logs every excluded entity_id individually on INFO level. This is
useful when iterating on exclude patterns or verifying that the filter
catches the intended entities.

The verbose output is intentionally limited to the first sync. Subsequent
debouncedSync() calls only emit the aggregate count to avoid log spam
during normal operation. Live `state_changed` events for filtered entities
remain on DEBUG.

Admin UI gets a checkbox below the patterns field; i18n keys added for
all 11 supported languages.
2026-05-14 11:40:28 +02:00
mokusone 288273005a feat(admin): add exclude patterns UI field with i18n
JSON-Config field `excludePatterns` (multiline textarea, 6 rows by default,
full width). Help text explains the syntax: glob with `*`, `#` for comments,
empty = filter inactive.

i18n translations added for all 11 supported languages so the label and
help text are localised consistently with the rest of the admin UI.
2026-05-14 11:40:28 +02:00
mokusone 6889664c28 feat(filter): integrate exclude filter into parseStates and state_changed
Adapter now consults the exclude-pattern list (new `native.excludePatterns`
config option, multi-line string) at two points:

- `parseStates()` skips matching entities entirely. They are not registered
  as ioBroker objects and no state is written. A summary INFO line reports
  the count when the filter dropped anything from a sync.
- The `state_changed` event handler short-circuits matching live updates
  with a DEBUG line, so a filtered entity that still emits state changes
  in HA does not cause any churn in ioBroker.

Patterns are parsed once at adapter start: trimmed, empty lines and lines
starting with `#` are dropped. An empty resulting list means the filter is
inactive — adapter behaviour is then identical to the previous version.

Default config ships with example comments only, so existing installations
see no functional change after the update.
2026-05-14 11:40:28 +02:00
mokusone 9b95ece284 feat(filter): add isExcluded helper with unit tests
Glob-based entity_id matcher used by the upcoming exclude-filter feature.
Single wildcard `*` (matches any sequence including dots), all other characters
matched literally with regex metacharacters escaped. Case-sensitive, anchored.

Empty pattern array always returns false, so the helper is a no-op when the
adapter is not configured to filter anything.

New mocha unit-test suite invoked via `npm run test:unit` (separate from the
existing js-controller-backed test:integration).
2026-05-14 11:40:28 +02:00
github-actions[bot]andGitHub 1f0e93d357 Merge pull request #176 from ioBroker/dependabot/npm_and_yarn/protobufjs-7.5.8
chore(deps-dev): bump protobufjs from 7.5.5 to 7.5.8
2026-05-12 20:39:35 +00:00
dependabot[bot]andGitHub 53e8009ffb chore(deps-dev): bump protobufjs from 7.5.5 to 7.5.8
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.5.5 to 7.5.8.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/protobufjs-v7.5.8/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.5.5...protobufjs-v7.5.8)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-version: 7.5.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-12 20:37:32 +00:00
github-actions[bot]andGitHub 97ca4ca01c Merge pull request #175 from ioBroker/dependabot/npm_and_yarn/protobufjs/utf8-1.1.1
chore(deps-dev): bump @protobufjs/utf8 from 1.1.0 to 1.1.1
2026-05-12 20:21:26 +00:00
dependabot[bot]andGitHub 06bfc37720 chore(deps-dev): bump @protobufjs/utf8 from 1.1.0 to 1.1.1
Bumps [@protobufjs/utf8](https://github.com/dcodeIO/protobuf.js) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/dcodeIO/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dcodeIO/protobuf.js/compare/protobufjs-cli-v1.1.0...protobufjs-cli-v1.1.1)

---
updated-dependencies:
- dependency-name: "@protobufjs/utf8"
  dependency-version: 1.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-12 20:19:29 +00:00
Torsten Pattberg cb3f490e25 fix: dynamically create missing attribute objects in state_changed handler
When Home Assistant reports a new attribute for an entity after the initial
sync (e.g. source_list or media_channel appearing when a media player becomes
active), setState was called without a corresponding ioBroker object — causing
'has no existing object' warnings.

Fix: check if the attribute object exists in hassObjects before calling
setState. If missing, create it on-the-fly via setForeignObjectAsync before
writing the state.
2026-05-12 15:58:31 +02:00
Matthias KleineandGitHub af1052af03 Merge branch 'master' into master 2026-05-07 10:41:49 +02:00
GermanBluefox 0d39cc9d1d chore: release v2.0.4
* (@GermanBluefox) Tried to keep the custom settings of the objects when updating them with new data from HASS
v2.0.4
2026-05-05 14:31:50 +02:00
Matthias KleineandGitHub 47b80f47c2 Merge branch 'master' into master 2026-05-05 12:07:10 +02:00
github-actions[bot]andGitHub c0defc48a5 Merge pull request #171 from ioBroker/dependabot/npm_and_yarn/axios-1.16.0
chore(deps-dev): bump axios from 1.15.0 to 1.16.0
2026-05-05 09:00:06 +00:00
dependabot[bot]andGitHub d525d5b26b chore(deps-dev): bump axios from 1.15.0 to 1.16.0
Bumps [axios](https://github.com/axios/axios) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-05 08:05:56 +00:00
GermanBluefox a64ef243f0 Tried to keep the custom settings of the objects when updating them with new data from HASS 2026-05-05 10:01:38 +02:00
github-actions[bot] f4956c5040 Update from template: S6020-addChangelogOld 2026-05-03 11:57:00 +00:00
Matthias Kleine ab85a9311d .dev-server to gitignore 2026-04-28 13:23:10 +02:00
Matthias Kleine 6159ef5c59 Updated home assistant logo 2026-04-28 13:23:02 +02:00
Matthias Kleine 5657211716 Use ENV var SUPERVISOR_TOKEN as fallback for password 2026-04-28 11:15:02 +02:00
Matthias Kleine 7575b129c0 Use /core/ instead of /api/ when connecting to supervisor directly 2026-04-28 11:05:24 +02:00
github-actions[bot]andGitHub 9a24c2be91 Merge pull request #163 from ioBroker/dependabot/npm_and_yarn/protobufjs-7.5.5
chore(deps-dev): bump protobufjs from 7.5.4 to 7.5.5
2026-04-17 06:04:54 +00:00
dependabot[bot]andGitHub d541114da1 chore(deps-dev): bump protobufjs from 7.5.4 to 7.5.5
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.5.4 to 7.5.5.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.5.4...protobufjs-v7.5.5)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-version: 7.5.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-17 05:34:02 +00:00
github-actions[bot]andGitHub eb7b8b0e68 Merge pull request #162 from ioBroker/dependabot/npm_and_yarn/follow-redirects-1.16.0
chore(deps-dev): bump follow-redirects from 1.15.11 to 1.16.0
2026-04-15 20:07:41 +00:00
dependabot[bot]andGitHub e139c9bc27 chore(deps-dev): bump follow-redirects from 1.15.11 to 1.16.0
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.11 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.11...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-15 19:06:08 +00:00
github-actions[bot]andGitHub 40550a747b Merge pull request #161 from ioBroker/dependabot/npm_and_yarn/axios-1.15.0
Bump axios from 1.14.0 to 1.15.0
2026-04-12 11:57:13 +00:00
dependabot[bot]andGitHub 9a886b1155 Bump axios from 1.14.0 to 1.15.0
Bumps [axios](https://github.com/axios/axios) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-12 11:55:15 +00:00
github-actions[bot] c19bb8452e Update from template: X0000-updateNodeJsAtTestAndRelease 2026-04-06 19:55:44 +00:00
GermanBluefox 039e856f7a Merge remote-tracking branch 'origin/master'
# Conflicts:
#	io-package.json
2026-04-02 10:32:44 +02:00