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

homebridge-daikin-tempsensor-nocloud

v1.0.9

Published

Provides temperature sensor for HomeKit as plugin for homebridge: https://github.com/nfarina/homebridge

Downloads

118

Readme

verified-by-homebridge

node npm npm npm version

Node.js CI CodeQL

homebridge-daikin-tempsensor-nocloud

Supports Daikin Air Conditioners on HomeBridge by connecting to the optional Daikin Wifi Controller or by using the builtin wifi controller that comes with some models.

Installation

This plugin retrieves sensor and mode data from a Daikin WIFI controller in your local network and allows you to set operation modes and target temperatures. As it is a plugin for HomeBridge you will have access to this features using Apple Home.

The install may require you to run as an administrator (using a different login or sudo). It is recommended to configure your DHCP server to reserve an IP for the wifi controller. This plugin can be installed using the Homebridge Config UI X or manually by following these steps:

  1. Install homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-daikin-tempsensor-nocloud
  3. Update your configuration file. See sample-config.json in this repository for a sample.

Configuration

This screenshot shows the configuration in Homebridge Config UI X:

Users are advised to use the graphical configuration. In case you configure the setings manually, please make sure to check the file config.schema.json first to understand the settings and possible values.

Technical background information on the API being used

The apiroute is used for two main calls: Get info such as current activity and sensor readings from the thermostat and set the target temperature and modes. The Aircon LAN adapter provides two directories for these settings and data:

  1. /common uses the GET method for control and system information about the Aircon (e.g software version, MAC address, Reboot System, Region)

  2. /aircon uses the GET method to set Aircon related information (e.g Target Temperature, Modes like Heat and Cool, Temperature Sensor Readings, Timers)

Supported devices

Currently, this plugin supports Daikin wifi controllers supporting the "aircon" URLs (System: Default) and "skyfi" URLs (System: Skyfi).

To test http connectivity, use your browser to connect to your device using one of these URLs:

http://192.168.1.88/aircon/get_model_info
http://192.168.1.88/skyfi/aircon/get_model_info

replace the IP (192.168.1.88) with the IP of your device.

Your browser should return a line like this:

ret=OK,model=0AB9,type=N,pv=2,cpv=2,cpv_minor=00,mid=NA,humd=0,s_humd=0,acled=0,land=0,elec=0,temp=1,temp_rng=0,m_dtct=1,ac_dst=--,disp_dry=0,dmnd=0,en_scdltmr=1,en_frate=1,en_fdir=1,s_fdir=3,en_rtemp_a=0,en_spmode=0,en_ipw_sep=0,en_mompow=0

If it does not, your device is not yet supported.

To test https connectivity see HTTPS/Registered client support

The response of an usupported device will look like this:

ret=PARAM NG,msg=404 Not Found

HTTPS/Registered client support

Some models require requests via https containing a registered client token.

It is necessary to register a client token with each device. The same token may be registered with multiple devices.

These instructions are based on comments in GitHub Project ael-code/daikin-control Issue #27

  1. Generate a UUID4 (https://www.uuidgenerator.net can be used), e.g. 7b9c9a47-c9c6-4ee1-9063-848e67cc7edd
  2. Strip the - from the UUID, i.e. 7b9c9a47c9c64ee19063848e67cc7edd
  3. Grab the 13-digit key from the sticker on the back of the controller. e.g. 0123456789012
  4. Register the UUID as a client token
curl --insecure -H "X-Daikin-uuid: 7b9c9a47c9c64ee19063848e67cc7edd" -v "https://<controller-ip>/common/register_terminal?key=0123456789012"

This UUID must be used in client requests to the device.

Test your registered token using the above requests but using https instead of http, e.g.

curl --insecure -H "X-Daikin-uuid: 7b9c9a47c9c64ee19063848e67cc7edd" -v "https://192.168.1.88/aircon/get_model_info"
curl --insecure -H "X-Daikin-uuid: 7b9c9a47c9c64ee19063848e67cc7edd" -v "https://192.168.1.88/skifi/aircon/get_model_info"

In the configuration file, make sure you specify https in the apiroute option and add the registered token as the value of uuid in the configuration for each device, e.g.

        "accessories": [
            {
                "accessory": "Daikin-Local",
                "name": "Living room",
                "apiroute": "https://192.168.1.50",
                "uuid": "7b9c9a47c9c64ee19063848e67cc7edd",
                "system": "Default",
                "swingMode": "2",
                "defaultMode": "0",
                "fanMode": "FAN",
                "fanName": "Living room FAN"
            }
        ],

Make sure to use the correct token if a different token has been registered with each device.

Debugging and Testing

This plugins code makes heavy use of debug output. Normally, this debug output is not visible on the homebridge console. As explained in the Homebridge troubleshooting documentation you should start homebridge like this to see the debug output:

homebridge -D

For even more debug, use this:

DEBUG=* homebridge -D