- Linux (e.g. Raspberry Pi) / OSX / Windows
- NodeJS >= 12.x
- Trådfri gateway
- Install this adapter over the iobroker admin GUI or via
npm install iobroker.tradfri --production
- In the ioBroker GUI, add an adapter instance.
- Configure the instance by entering the IP/hostname of your gateway and the security code that can be found on the label at the bottom.
Make sure you install the most recent released version. If there are compilation errors, you might have to install build-essential:
apt-get -y install build-essential
If you are running on older NodeJS versions (< 10), the installation may fail with the following error somewhere in the log:
Can't find Python executable "python", you can set the PYTHON env variable.
To solve it, open an administrative shell:
- Press the ⊞ Windows key
- Enter
cmd
, press Ctrl + Shift + Enter - Confirm the UAC prompt and run the following command:
npm install --add-python-to-path --global windows-build-tools
This may take a while... afterwards the installation should succeed.
You can send custom CoAP packets from other adapters by using sendTo
. Example from JavaScript:
sendTo("tradfri.0", "request", options, (ret) => {
// do something with the result
});
The options
object looks as follows:
{
path: string,
method?: "get" | "post" | "put" | "delete", // optional, default = "get"
payload?: object // optional, should be a JSON object
}
The result object ret
looks as follows:
{
error: string | null,
result: {
code: string, // see https://tools.ietf.org/html/rfc7252#section-12.1.2
payload: object | Buffer
}
}
- Fix: support for Node.js 18
- Fixed a typo preventing the adapter from controlling air purifiers
- Fix: actually create states for STARKVIND Air Purifier
- Add support for STARKVIND Air Purifier
- Improve support for older browsers
- Update dependencies
The MIT License (MIT)
Copyright (c) 2017-2022 AlCalzone [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.