iobroker.harmony
v3.0.0
Published
Control your harmony activities from ioBroker.
Readme

ioBroker.harmony
Version:
Tests:
ioBroker Logitech Harmony Adapter
Control your harmony activities from ioBroker.
Install
Install Harmony via ioBroker Admin. The adapter should find your hubs automatically.
If no hub is found, the instance settings offer two knobs:
- Network interface — the interface the adapter searches on. Pick one on hosts with several networks (multiple NICs, Docker, VPN) so both the broadcast and the hub's reply use the right one. The broadcast address is derived from that interface, so subnet masks other than /24 work as well (#331).
- Manual hub IPs — list your hub addresses. The adapter then contacts exactly those addresses and skips the broadcast entirely. Use this when a hub sits in a different subnet than ioBroker, or when broadcast traffic is blocked in your network (#147).
Instances updated from version 2.1.0 or older migrate the removed Discovery-Subnets setting automatically on first start: an address that is the broadcast address of one of your interfaces selects that interface, any other address becomes a manual hub IP. The adapter logs what it converted.
Usage
Activities
Start
Set the status state Instance.Hub_Name.activities.Activity_Name to a Number greater than 0.
During the activity's startup sequence, the status changes from 1 (startup) to 2(running)
Stop
Set the state Instance.Hub_Name.activities.Activity_Name to 0.
Alternatively, you can set the hub's status Instance.activities.currentStatus to any number.
During the activity's exit sequence, the status changes from 3 (stopping) to 0 (stopped)
Indicators
There are two indicators Instance.Hub_Name.activity and Instance.Hub_Name.connected.
Both are read-only, changing their values has no effect.
.hubConnected- Tells you whether the adapter is successfully connected to the hub..hubBlocked- Is set to true if Hub is busy starting/stopping activities or sending commands.activities.currentActivity- Gives you the name of the currently running activity.activities.currentStatus- Gives you the current status of the hub.- 0 = inactive
- 1 = starting
- 2 = active
- 3 = stopping
activities.<activity name\>- Status of this activity. Values are the same as above.
Devices
Send Command
Set Instance.Hub_Name.Device_Name.command to a number X to send command for X milliseconds.
A value smaller than 250 probably will send the command only once.
After sending, the state will be set to 0 again.
Changelog
3.0.0 (2026-08-06)
- (copilot) Adapter requires node.js >= 22 now
- (krobipd) State ID sanitisation hardened — tab/newline and other whitespace in hub-supplied device names no longer crash subscribe (#98). Dots are also collapsed so labels cannot split the ID path. Empty results fall back to
unnamed. - (krobipd) Async event handlers (
stateChange, hub discovery, client online/offline/state) now have proper error handling — a single failing await no longer terminates the adapter with an unhandled promise rejection. - (krobipd) Existing activities are now correctly recognised on every restart — the inverted
ifininitHubleft the bookkeeping empty and made every activity log asAdded new activityafter each adapter start. As a side effect, activities deleted on the hub are now also pruned from the state tree, and the per-activity-controlstate is no longer falsely flagged as stale during the cleanup pass. - (GermanBluefox) Breaking: the
Discovery-Subnetssetting was replaced by a network interface selector plus a manual hub list. Existing instances are migrated automatically on first start — a directed broadcast address selects the matching interface, any other address is carried over as a manual hub IP. The conversion is written to the log and runs exactly once. - (GermanBluefox) Breaking: dots in hub, activity, device and command names are now replaced by
_throughout, not just the first one. States whose name contained a dot are recreated under the new ID and the outdated objects are removed on the next hub sync. Adapt scripts, VIS views and aliases that referenced such states. - (GermanBluefox) Discovery now restarts by itself after a socket error, with a delay growing from 30 s to at most 5 min, instead of staying silently dead until the adapter is restarted.
- (GermanBluefox) A single unreachable address no longer stops discovery for every other hub — send failures are logged per address.
- (GermanBluefox) A broadcast address entered in the manual hub list works again instead of failing with
EACCESon every ping. - (GermanBluefox) Dependencies updated: TypeScript 6,
@tsconfig/node22,@iobroker/adapter-core3.4.3,@iobroker/testing5.3.0. The unusedsinon-chaiandchai-as-promisedtest helpers are gone. - (GermanBluefox)
npm run buildandnpm run checkcompile without errors again. The sources carried 26 strict-mode violations — unguardednullaccesses on hub clients and discovery sockets,Array.pop()results used as strings, anddeleteon properties typed as required — none of which were caught because the scripts had been failing for a while. - (GermanBluefox)
npm run lintworks again. It reported nothing but parse errors on every file (projectandprojectServicewere both enabled), andallowDefaultProjectsat outsideprojectService, so no rule ever ran. An unusedtsconfig.jsonleft over from the vendored discovery library was shadowing the real one for everything undersrc/discover/and hid the Node.js types from the linter.
2.1.0 (2026-04-15)
- (copilot) Adapter requires admin >= 7.7.22 now
2.0.5 (2026-02-06)
- (@GermanBluefox) Corrected the type of value
2.0.4 (2026-01-29)
- (@brkai) Trying to fix the activities
2.0.3 (2025-11-04)
- (@GermanBluefox) Corrected the table in the configuration
License
The MIT License (MIT)
Copyright (c) 2023-2026 iobroker-community-adapters [email protected]
Copyright (c) 2015-2019 Pmant [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
