npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

innoxel-soap

v1.0.0

Published

innoxel master soap api client

Downloads

134

Readme

innoxel-soap

Library to access Innoxel Master 3 SOAP API.

node npm license

build Code Climate maintainability Code Climate issues Code Climate technical debt

The current version has been tested against firmware 1.6.0.0, but most parts already worked against firmware 1.4.1.0 and 1.5.1.0 too.

Installation

npm install innoxel-soap

or

yarn add innoxel-soap

Usage

Getting started

import { InnoxelApi } from "innoxel-soap";

const api = new InnoxelApi({
  user: "username",
  password: "***",
  ip: "192.168.0.100",
});
const [bootId, stateId] = await api.getBootAndStateIds();

Usage

InnoxelApi

The main export ist the InnoxelApi class. It provides the main functionality to send messages to innoxel master, and some convenience methods to retrieve/update certain data.

Constructor

The constructor of the InnoxelApi class acccepts the following configuration object:

{
  user: "<user name>", // username for accessing innoxel master
  password: "<password>", // required, password of the user
  ip: "<ip address>", // required, ip address of innoxel master
  port: 5001, // optional, defaults to 5001
}

Methods

Methods of the InnoxelApi class:

| method | description | parameters | | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | postMessage<T>(message: SoapMessage): Promise<T> | helper method for posting messages to innoxel master and parsing the returned xml (see SoapMessage below) | message: soap message objectreturns the parsed soap answer | | getBootAndStateIdXml(): Promise<string> | get current boot and state id response xml | | getBootAndStateIds(xml?: string): Promise<[bootId: string, stateId: string]> | get boot and state id, either by retrieving them from innoxel master, or by parsing the given xml | xml (optional) xml message to parse ids from | | getDeviceState(): Promise<IDeviceStatusResponse> | get current device state of innoxel master (requires administrator privileges) | | | getIdentities(): Promise<ModuleIdentityType[]> | get identity information for all modules | | | getWeather(): Promise<IModuleWeather> | get weather module data | | | getRoomClimate(moduleIds: number[]): Promise<IModuleRoomClimate[]> | get room climate data | moduleIds: array of module ids to query, or [-1] for all modules | | getModuleStates(): Promise<IModuleBase[]> | get module state data | | | triggerPushButton(moduleIndex: number, channel: number, event: ModuleInEvent = "autoImpulse"): Promise<void> | trigger a push button | moduleIndex: module index of the modulechannel: channel to triggerevent: how to "push" the button | | triggerOutModule(moduleIndex: number, channel: number, event: ModuleOutEvent = "toggle"): Promise<void> | trigger an Out module | moduleIndex: module index of the modulechannel: channel to triggerevent: how to trigger the channel | | setDimValue(moduleIndex: number, channel: number, dimValue: number, dimSpeed = 0): Promise<void> | set the value of a dimmer | moduleIndex: module index of the modulechannel: dimmer channeldimValue: value to set (0-100, 0: off)dimSpeed: dimming speed (0-15) | | setRoomClimate(moduleIndex: number, type: ModuleRoomClimateSetType, temperature: number) | set the temperature of a room climate module | moduleIndex: module index of the moduletype: type of temperature to settemperature: temperature to set |

SoapMessage

Class for building the soap message sent to innoxel master.

Limitations

  • The library was designed to fit my needs for an ioBroker adapter. If additional functionality is required please open an issue.
  • Innoxel Master needs to be polled to retrieve updates, there is no pushing or callback mechanism.
    • Whenever the state of i.e. a switch or dimmer changes, the state id changes too. So for performance reasons, consider using getBootAndStateIds() or getBootAndStateIdXml(), and only if this changes actually load the desired state data.
  • Switches can only be toggled, not set. So you can't set a switch off, but you can have it switch it's state from on=>off or off=>on.

Contributing

Running tests

npm test

There are two types of tests. Tests with mocks, and tests against an actual Innoxel Master, which are skipped by default. In order to run tests against Innoxel Master, copy .env.template as .env and adjust the required settings.