Coder Social home page Coder Social logo

jmbwell / homebridge-infinitive-thermostat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samueltoloko/homebridge-advanced-thermostat

3.0 3.0 1.0 60 KB

Homebridge plugin for thermostats supported by github.com/acd/infinitive

License: Apache License 2.0

JavaScript 100.00%

homebridge-infinitive-thermostat's People

Contributors

jmbwell avatar lboue avatar samueltoloko avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cheitzig

homebridge-infinitive-thermostat's Issues

Error getting temperature display units

Hello, I have Infinitive working in HomeKit via HomeAssistant, but would like to migrate the integration over to Homebridge using this plugin. For the most part the plugin is working, but I'm getting an error in Homebridge:

[1/18/2021, 9:40:48 AM] [Thermostat Test] Error getting temperature display units null

The error seems to result in the temperature not showing up in HomeKit when I try to set the temperature.

Any help would be appreciated!

Thanks.

Adding a thermometer using outdoor temperature

Hi,

Wondering if I might elicit your help in resolving an issue I’m having. I also posted to the parent project, which you've seen, but that doesn't match well to your current project. I also posted to the Homebridge plug-in development forum on Discord: https://discord.com/channels/432663330281226270/432672072859385856.

I tried to extend your plug-in to also expose a Temperature Sensor that represents the outside temperature. See: https://github.com/cheitzig/homebridge-infinitive-thermostat. FWIW, I think it ultimately should be a platform vs. an accessory because that'd allow, for example, the temperature sensor to be in a different room. The structure of the existing project is to expose the thermostat as a HomeKit accessory, so I added a second service to the Accessory with the idea that it would then expose the outside temperature within the same HomeKit tile. The code I added includes:

  • A new “getter” called getCurrentOutsideTemperature
  • A new service called TemperatureService
  • An attribute to store the Outside temperature

The relevant code line changes (my line numbers) include: 26, 39, 53, 219-248, and 706-717

So it appears correct, but doesn't work, so I must be doing something wrong. I started by writing my own function, getCurrentOutdoorTemperature, and call it on line 709 from the .on('get' of the TemperatureService. When I run it this way though, HomeKit gives an error that says "This accessory isn't responding". getCurrentOutdoorTemperature is almost identical to your existing getCurrentTemperature function with the exception of getting the outside vs. the inside temperature from my furnace API.

If I just hard-set the outdoor temperature (line 39), and update the TemperatureService’s CurrentTemperature characteristic to that value (lines 706-710), the Temperature Sensor shows up fine (granted, just showing the hard-coded temperature). Also, if I call the same “getter” that is used for the internal/house temperature (line 708, currently commented out), things also work fine (or rather, then outside temperature is listed as the inside temperature, which at least appears to work).

To answer your question on the parent GitHub, I don't get an error or dump other than "This accessory isn't responding", although maybe I'm not looking in the right place. It's weird that it works when hard-coded or even calling your existing function, but not when I call my nearly identical function.

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.