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-fujitsu-smart

v0.2.8

Published

Homebridge accessory for Fujistu Mini-Split AC systems with smart temperature support using Xiaomi sensors

Downloads

12

Readme

homebridge-fujitsu-smart

Homebridge plug in for Fujistu Mini Split with web-based scheduling UI and smart temperature support.

This started life as an extension to the current mini-split module but with fan control, and rapidly got out of hand ...

Warning this plugin this is currently experimental, use at your own risk! It will probably burn your house down.

UI Multiple Schedules Room Temps Graphs

Installation

  1. Install homebridge
  2. Install this plugin: npm install -g homebridge-fujitsu-smart
  3. Edit your config.json file (See below).
"accessories": [
    {
        "accessory": "FGLairSmartThermostat",
        "name": "Fujitsu Mini Spit",
        "username": "FGLAIR USERNAME",
        "password": "FGLAIR PASSWORD",
        "temperatureDisplayUnits": 1,
        "smart": {
            "miio": {
                "username": "MII USERNAME",
                "password": "MII PASSWORD",
                "region": "cn"
            },
            "feelslike": true,
            "portnr": 8080,
            "weather": {
                "key": "OPENWEATHERMAPAPI KEY",
                "zipcode": "94707"
            }
        }
    },
]

| Key | Description | | --- | --- | | accessory | Must be FGLairSmartThermostat | | name | Name to appear in the Home app | | username | FGLair Username | | password | FGLair Password | | model (optional) | Appears under "Model" for your accessory in the Home app | | region (optional) | Region for thermostat, change for China & E.U. (Default: "us") | | temperatureDisplayUnits (optional) | Celcius (0) or Fahrenheit (1) (Default: 0) | | includeFilter (optional) | Include a filter fan service. The filter fan is run when the program doesnt need to heat or cool and keeps the air moving through the system air filter (Default: false) | | smart (optional) | Smart configuration. | | smart.miio (optional) | Use multiple temperature and occupancy sensors to adapted thermostat. Currently supports the Mi Home platform | | smart.miio.username | Mi Home Username | | smart.miio.password | Mi Home Password | | smart.miio.region (optional) | Will default to cn which supports the latest range of sensor types, but can be set to other regions | | smart.feeslike (optional) | If true the temperatures will be adjusted based on the humidity, to better refect the temperatures rooms feel | | smart.portnr (optional) | Port number for Web UI (Default: 8080) | | smart.weather (optional) | If provided, allows the Web UI to display the current weather. Weather information is read from the OpenWeatherMap API. Provide one of city, latLong, cityId or zipcode | | smart.weather.key | OpenWeatherMap API key | | smart.weather.lang (optional) | Language for weather information (Default: en) | | smart.weather.city (optional) | City name for weather | | smart.weather.latLong (optional) | [Longitude,Latitude] for weather | | smart.weather.cityId (optional) | OpenWeatherMap city id for weather | | smart.weather.zipcode (optional) | Zipcode for weather |

Smart operation

Smart operation uses Xiomi temperature, humidity and movement sensors to adjust the thermostat target temperature depending on where you are in your house (in a similar way to the Ecobee thermostat) and the schedule defined. Smart operation takes over the scheduling from your home thermostat and you should disable it.

Sensors must be registered using the Mi Home application.

This plugin will read the sensors periodically, then caclulate a weighted temperature based on the defined schedule, and adjust the thermostat based on this. If the wall temperature is changed by hand, this will override the schedule for a set period of time before the schedule resumes.

Current limitations

  • Only one air conditioner is displayed, the API chooses the first device. I only have one system, so feel free to contribute changes if you have more than one A/C unit.
  • Timeout on token is not enabled, when token is invalid the API will re-authenticate.
  • Auth. Token is not cached
  • Previous thermostat state is not cached
  • For US users, Aqara devices seem like the obvious sensor choice. If anyone knows how to easily read these (no ferreting around for tokens in encypted backups) please let me know as I've had no luck :-(

Wouldn't it be nice ...

  • If HomeKit devices could be allowed read other HomeKit devices state (e.g. sensors). I realize there are security concerns here, but still ...

TODO

  • Lots and lots of testing. Seriously this could burn your house down at the moment.

Contributions

Portions of this software adapted from the projects listed below. A huge thank you, for all their work.

  • The original homebridge-fujitsu plugin https://github.com/smithersDBQ/homebridge-fujitsu

  • The pyfujitsu project under Apache License Copyright (c) 2018 Mmodarre https://github.com/Mmodarre/pyfujitsu

  • The homebridge-dummy-thermostat under the Unlicense https://github.com/X1ZOR/homebridge-dummy-thermostat

  • The node-mihome library https://github.com/maxinminax/node-mihome