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

ngx-ccu-jack-client

v1.0.3

Published

An angular api and mqtt client for the ccu addon ccu-jack

Downloads

3

Readme

Table of contents

Requirements & Compatibility

To connect ngx-ccu-jack-client with a backend a CCU-Jack server (installed as addon on a CCU or running as Docker container) is necessary. Please make sure CCU-Jack and the CCU are configured correctly.

| ngx-ccu-jack-client | angular | ngx-mqtt | rxjs | CCU-Jack | | ------------------- | ------------- | -------------- | ------------- | -------------- | | 1.0.x | 13.x.x | 9.0.x | >= 7.4.0 | >= 2.0.26 |

Getting Started

Install ngx-ccu-jack-client from npm:

npm install ngx-ccu-jack-client --save

Install needed peer dependencies. For compatible versions see console output after install of ngx-ccu-jack-client or see Requirements & Compatibility.

npm install ngx-mqtt --save
npm install rxjs --save

Import NgxCcuJackClientModule into app.module.ts and add your configuration:

import { NgxCcuJackClientModule } from 'ngx-ccu-jack-client';
// imports ...

@NgModule({
  declarations: [
    AppComponent
    // components ...
  ],
  imports: [
    NgxCcuJackClientModule.forRoot({
      connectMqttOnInit: true,
      hostnameOrIp: 'your-hostname-or-ip',
      port: 2122,
      secureConnection: true,
      auth: { user: 'your-user', password: 'your-password' }
    })
    // modules ...
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}

Import CcuJackApiService and/or CcuJackMqttService in the needed component(s):

import { CcuJackApiService, CcuJackMqttService } from 'ngx-ccu-jack-client';
import { Component } from '@angular/core';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {
  constructor(
    private readonly ccuJackApiService: CcuJackApiService,
    private readonly ccuJackMqttService: CcuJackMqttService
  ) {}
}

Documentation

API

The CcuJackApiService is used to access the rest interface of CCU-Jack. Master data of devices, rooms, functions, system variables and programs can be requested via this way. It is also possible to start a program and access and set the value of each data point. However, the CcuJackMqttService should be used to display the values of data points, as the values are immediately updated via this way if they are changed in the CCU.

See detailed CcuJackApiService documentation

MQTT

The CcuJackMqttService offers the possibility of a live connection of values of data points. In addition to that, values can be set and programs started.

See detailed CcuJackMqttService documentation

Sample Implementation

ngx-ccu-jack-client sample implementation

Troubleshooting

I can not build due to console error: 'Cannot find module 'ngx-mqtt' or its corresponding type declarations.'

Make sure you have installed ngx-mqtt and other needed peer dependencies. See Requirements & Compatibility and Getting Started for details.

I can not connect via MQTT due to SSL handshake error

In case of a self signed certificate make sure that your client has installed your root ca of the self signed certificate in the trusted root certificate store. In addition to that your self signed certificate should have the version 3 with subject alternative name if you access the CCU via IP and/or hostname. Finally your self signed certificate (and the private key) must be configured in the CCU and the CCU-Jack addon. See also CCU-Jack TLS documentation for details.

I can not get data via API due to CORS errors

It is important to use minimum the version 2.0.26 of CCU-Jack. Make sure CCU-Jack is configured correctly. See also CCU-Jack CORS documentation for details.

License

MIT

Dependencies