GithubHelp home page GithubHelp logo

youridijk / homebridge-atag-one Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 414 KB

HomeKit support for Atag One thermostat

License: Apache License 2.0

TypeScript 100.00%
homebridge-plugin atag-one atag homebridge-atag-one

homebridge-atag-one's Introduction

Atag One Homebridge plugin

This plugin adds HomeKit support for the Atag One Thermostat. This plugin requires no credentials for communicating with the thermostat, because it communicates locally to the thermostat.

Example config.json

{
  "accessory": "AtagOne",
  "name": "Atag One"
}

Optionally you can pass a minimumTargetValue key to the JSON to specify the lowest target temperature in HomeKit (the default is 16 degrees celsius).

In addition, you can specify an ipAddress key to specify the ip-address of the thermostat in case it can't be found in the network.

Extra, you can specify a cacheUrl option, to enable or disable storing the base url of your Atag One. This storing is used to speed up the booting of this plug-in. Without storing the base url, you have to wait for a broadcast message from the Atag One to control the Atag One.

Device discovery

To discover the thermostat in the local network, we can use the fact that the thermostat broadcasts a message approximately once every 10 seconds to the local network that it’s connected to. If you set up a listener for this message, you can access the IP-address of the device that sent the message. In our case this is the thermostat.

As long as Homebridge is running, this plugin will listen for this message. So, if the IP-address of the thermostat changes, this plugin detects it right away and will automatically use the newly found IP-address for communication.

An example config.json with these two keys:

{
  "accessory": "AtagOne",
  "name": "Atag One",
  "minimumTargetValue": 10,
  "ipAddress": "10.0.0.19",
  "cacheUrl": true
}

homebridge-atag-one's People

Contributors

dependabot[bot] avatar youridijk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

eriksmets

homebridge-atag-one's Issues

Getting these two errors frequently

[3/8/2022, 3:04:33 PM] [homebridge-atag-one] This plugin slows down Homebridge. The read handler for the characteristic 'Serial Number' was slow to respond! See https://git.io/JtMGR for more info.
[3/8/2022, 3:04:34 PM] [ATAG One] Error getting serial: FetchError: request to http://192.168.1.100:10000/ failed, reason: socket hang up
[3/8/2022, 3:19:46 PM] [homebridge-atag-one] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 13 exceeded minimum of 16. See https://git.io/JtMGR for more info.

connection error

The plugin will not connect to the Atag One.
[Atag One] Error getting temperatures in constructor: FetchError: request to http://192.168.2.1:10000/ failed, reason: connect ECONNREFUSED 192.168.2.1:10000

`SIGTERM` hot-loop

Great to see a plugin for the old ATAG One. I tried installing it, but Homebridge runs into a SIGTERM and restarts.
The Home app will on and off show the ATAG One, so I think your plugin finds the IP of the One, but some other problem occurs.

[2/13/2022, 3:08:22 PM] Homebridge v1.4.0 (HAP v0.10.0) (Homebridge 5264) is running on port 52808.
[2/13/2022,
3:08:22 PM] [Hue] Philips hue: event stream connected to https://192.168.1.9/eventstream/clip/v2
[2/13/2022, 3:08:22 PM] [Hue] warning: latest version: homebridge-hue v0.13.38
12/13/2022,
3:08:23 PM] [ATAG One] Error getting serial: Error: Base url is undefined!
[2/13/2022,
3:08:26 PM] Error: EACCES: permission denied, open
'device-config.json'
at Object.openSync (node: fs:585:3)
at Object.writeFileSync (node: fs:2155:35)
at updateDeviceConfig (/homebridge/node modules/homebridge-atag-one/src/files.ts:11:6)
at AtagOne.handleBroadcastMessage(/homebridge/nodemodules/homebridge-atag-one/src/AtagOne.ts:151:271
at
Socket.<anonymous> (/homebridge/node modules/homebridge-atag-one/src/AtagOne.ts:161:331
at
Socket.emit (node:events:520:28)
at
UDP.onMessage (node:dgram: 939: 8)
[2/13/2022,
3:08:26 PM] Got SIGTERM, shutting down Homebridge..
[2/13/2022,
3:08:31 PM] (Hue] goodbye
12/13/2022,
3:08:31 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
12/13/2022,
3:08:36 PM] [HB Supervisor] Restarting Homebridge...
[2/13/2022,
3:08:36 PM] [HB Supervisor] Starting Homebridge with extra flags:
-I
-P /homebridge/node modules
[2/13/2022,
3:08:36 PM] [HB Supervisor] Started Homebridge v1.4.0 with PID:
764
[2/13/2022,
3:08:37 PM] Loaded config.json with 1 accessories and 2 platforms.
[2/13/2022,
3:08:37 PM] Loaded 0 cached accessories from cachedAccessories.
12/13/2022,
3:08:37 PM1
==-
[2/13/2022,
3:08:38 PM] Loaded plugin: [email protected]
[2/13/2022,
3:08:38 PM] Registering accessory
'homebridge-atag-one.Atagone'
12/13/2022,
3:08:38 PM1
---
[2/13/2022,
3:08:38 PM] Loaded plugin: [email protected]
[2/13/2022,
3:08:38 PM] Registering accessory
'homebridge-dummy.DummySwitch'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.