Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin philosophy discussion #27

Open
jlg89 opened this issue Jan 15, 2021 · 12 comments
Open

Plugin philosophy discussion #27

jlg89 opened this issue Jan 15, 2021 · 12 comments

Comments

@jlg89
Copy link

jlg89 commented Jan 15, 2021

I'm a programmer, but I haven't yet learned my way around the guts of homebridge and its plugins. So I'm still working on being able to be helpful in that way. Between @jimhe, @rcoletti116, and @dotfortun3-code, though, I think this plugin already has a good contributor base. But I am an electrical engineer, I have a relatively complex smart home, and I have a non-technical wife, so I feel at least moderately qualified to help think through a plugin feature set that would appeal to the broadest user base and create the fewest issues, either technically or domestically.

It seems logical to assume that the ultimate goal would be for the plugin to offer full access to the infinitude feature set--current set/actual/outdoor temps, humidity data, occupancy sensor status, read/write for multi-zone schedules, comfort profiles, manual overrides, etc.--so that homebridge would have equivalent functionality to the Carrier thermostat. But that's a lot to bite off.

IMHO, multi-zone schedules and comfort profiles should be the last things addressed in this plugin, and until they are fully addressed, they shouldn't be touched. The primary function of the plugin should mimic someone using the thermostat to manually adjust the set temp, which defaults to a temporary override of the schedule. From a programming perspective, this would at least involve, for the selected zone, setting the "currentActivity" to "manual," setting "htsp" or "clsp" to the user-selected temp, setting "hold" to "on," and setting "otmr" to the time the t-stat should return to the current schedule (either a couple of hours, or the next schedule change, or maybe a plugin config setting like "defaultHoldTimeout"). Doing it this way eliminates the plugin's sensitivity to thermostat configuration (e.g., whether or not it's in "auto" mode, has schedules defined, etc.), which makes it attractive to a broader user base and easier to support.

Thoughts?

@rcoletti116
Copy link
Contributor

Thanks for writing this and putting on the table a discussion on where this plugin can and should go.

I would love to see the plugin further extended, and have spent some time trying to familiarize myself with the current code. The way the plugin is written is very centric to the thermostat zones and extending outside this is proving difficult for me (would be happy to have someone else look it over).

My personal goals/wishlist would be to get the OAT sensor finished/working and finalize FilterMaintenance to contain filter change notifications inside HomeKit. We have humidity values captured already and I use them in regular automations myself.

Other ideas would be to add a fan service?. One of the primary challenges with Homekit and Infinity are of course the limitations HK has for its thermostat service in comparison to what the Infinity does. Me personally, I have a single zone. My 2nd zone in my house actually doesn't use Infinity system at all, but does have a native HK thermostat. My personal goal is for no one in the house to have to manually touch the thermostats and that holds true for the most part.

@dotfortun3-code
Copy link
Contributor

I really enjoyed extending the plug-in to add some of the features I did. Admittedly it was mostly experimentation and learning a bit of HomeBridge.

I'd like to go back and refactor my changes and submit a PR for this repo. Maybe this weekend.

I made more changes to the plug-in then were necessary for a PR, which was part of the reason for branching it.

I like to see the discussion about the plug-in. My ultimate goal with the changes I made were for making the thermostat work well when using Siri for control since I rely mostly on HomePods.

It's been a dream of mine for years now to get the Infinity stat working with the rest of my automations.

@rcoletti116
Copy link
Contributor

I noticed you refactored the way the infinitude API is used in yours. It looks like you call the API directly instead of parsing the xml. Did you do that out of necessity for getting the schedule/next activity?

@jlg89
Copy link
Author

jlg89 commented Jan 16, 2021

@rcoletti116 the limitations of HK vs. Infinitude t-stats are something I haven't researched either. I do have an Apple Developer account, so tell me if I can help by digging up any API info etc. My Infinity system has three zones, with one main t-stat and two slaves, so I can certainly help with testing & troubleshooting.

I did some playing around with @dotfortun3-code's version, and figured out how to tweak InfinitudeClient.js to update the manual temp setting instead of the schedule temp, but I couldn't figure out how to code switching the t-stat to manual/temporary override mode. I'm sure it's pretty straightforward if you know your way around js, which I don't.

@dotfortun3-code
Copy link
Contributor

I noticed you refactored the way the infinitude API is used in yours. It looks like you call the API directly instead of parsing the xml. Did you do that out of necessity for getting the schedule/next activity?

The documentation for Infinitude's API isn't that great and I was having issues getting it to write to the config for setting the temperature. I was able to get it working using the API, and updated the rest for consistency.

I don't think it was a necessity, I just couldn't get it working the other way.

I did some playing around with @dotfortun3-code's version, and figured out how to tweak InfinitudeClient.js to update the manual temp setting instead of the schedule temp, but I couldn't figure out how to code switching the t-stat to manual/temporary override mode. I'm sure it's pretty straightforward if you know your way around js, which I don't.

This shouldn't be hard to do, this was mostly how the original plugin works, it just needs some tweaking to work with schedules. I believe all that should have to be done would be adding a parameter to setTargetTemperature to pass in the intended activity and use that instead of reading it from the scheduled activity. I would prefer something like that to be a setting for the plugin as my personal preference is to have it set the scheduled temperature, so it holds that temp next time it hits that schedule, but I completely understand that it is probably not how everyone using the plugin would want it to work.

Perhaps add an operation mode setting or something like: manual, hold time, or set scheduled activity

@jlg89
Copy link
Author

jlg89 commented Jan 18, 2021

I would prefer something like that to be a setting for the plugin as my personal preference is to have it set the scheduled temperature, so it holds that temp next time it hits that schedule, but I completely understand that it is probably not how everyone using the plugin would want it to work.

Perhaps add an operation mode setting or something like: manual, hold time, or set scheduled activity

That's a great idea. Have a config setting like "OperationType" that maybe defaults to "manual" to cause a temporary manual override (do the least invasive thing) but can be set to "schedule" to affect the current schedule setting. And a "HoldTime" setting that defaults the "otmr" time for a manual override to the next scheduled activity, or can be set to a specific timespan. I'm not sure how the HK thermostat device handles manual mode, as all I see are "off/heat/cool/auto" options. But I'm probably missing something.

FWIW the way the plugin currently handles zones seems to work OK, as it creates a separate thermostat device in HK for each zone.

@rcoletti116
Copy link
Contributor

I'm not sure how the HK thermostat device handles manual mode, as all I see are "off/heat/cool/auto" options.

That’s right, HK only allows those profiles so there won’t be 1:1 mapping with Infinity. Thus you often see creative ways in leveraging Off and Auto. So any use of manual vs schedule would be a backend homebridge things to discern which one to change and not something controllable in the Home app.

@etomnash
Copy link

etomnash commented Feb 9, 2021

I have some recent experience to report regarding problems getting either fork of this plugin to run. as well as thoughts about a possible (hopefully easy) simple status read out only plugin to use as a temporary or permanent work around.

Background:

Homebridge running well on a Raspberry Pi 4 with 4 plugins working (GlobalCache for old Lutron radiora lights; Davis weatherlinklive; Purpleair; and HTTP Temperature reading OAT from Infinitude as suggested on this thread).

Infinitude running on another Raspberry Pi 4 reading out all config and status data in web browser. api GETs work fine for status and config. Passthrough to Carrier works fine so Infinity iOS app works fine.

I am able to get api status down to Zones level (and OAT as noted above). However, I can’t get api status readout at a single zone. What I would like is rt (room temperature) from each of my 2 zones to show up on Homekit. Drilling down as far as Zones gets all zone information, but I can’t find any plugin that can parse that. So, a plugin that just parses zone status information would meet my immediate needs -- but my javascript skills are not up to writing that...

Problems running either of the two Homebridge Infinitude plug ins separately or together [Infinitude running from default demon call in production mode.]:

Have installed the following combinations with the indicated results, latest Homebridge and plugins as of today:

  1. Homebridge Infinitude by itself with config generated by dialog.

Homekit runs on iOS, shows tstats but they do not update. Everything else ok. Restart HomeKit, nothing updates, including lights.

log snippet:

[08/02/2021, 13:45:17] [InfinitudePlatform] Creating new thermostat in zone: upstairs Thermostat
HAP Warning: Characteristic 000000AB-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 0000004A-0000-1000-8000-0026BB765291. Adding anyway.
[08/02/2021, 13:45:17] [InfinitudePlatform] Creating new thermostat in zone: bedroom Thermostat
HAP Warning: Characteristic 000000AB-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 0000004A-0000-1000-8000-0026BB765291. Adding anyway.

  1. Homebridge Infinitude Schedules by itself with config generated by dialog.
    Fails to run. Homebridge does not start.

log snippet:

[08/02/2021, 13:19:48] ERROR LOADING PLUGIN homebridge-infinitude-schedules:
[08/02/2021, 13:19:48] Error: Cannot find module 'hap-nodejs'
Require stack:

  • /usr/local/lib/node_modules/homebridge-infinitude-schedules/src/InfinitudeThermostat.js
  • /usr/local/lib/node_modules/homebridge-infinitude-schedules/src/InfinitudePlatform.js
  • /usr/local/lib/node_modules/homebridge-infinitude-schedules/src/index.js
  • /usr/local/lib/node_modules/homebridge/lib/plugin.js
  • /usr/local/lib/node_modules/homebridge/lib/pluginManager.js
  • /usr/local/lib/node_modules/homebridge/lib/api.js
  • /usr/local/lib/node_modules/homebridge/lib/server.js
  • /usr/local/lib/node_modules/homebridge/lib/cli.js
  • /usr/local/lib/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (/usr/local/lib/node_modules/homebridge-infinitude-schedules/src/InfinitudeThermostat.js:1:24)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    [08/02/2021, 13:19:48] ====================
    [08/02/2021, 13:19:48] Loaded plugin: @timjwilkinson/[email protected]
  1. Both Homebridge Infinitude installed and Homebridge Infinitude Schedules Installed with one config generated by dialog.

Runs, tstats show up in Homekit, but nothing updates.

Log snippet:

08/02/2021, 13:25:34] ---
[08/02/2021, 13:25:34] Loaded plugin: [email protected]
[08/02/2021, 13:25:34] Registering platform 'homebridge-infinitude.InfinitudePlatform'
[08/02/2021, 13:25:34] ---
[08/02/2021, 13:25:34] ====================
[08/02/2021, 13:25:34] ERROR LOADING PLUGIN homebridge-infinitude-schedules:
[08/02/2021, 13:25:34] Error: Cannot find module 'hap-nodejs'
Require stack:

  • /usr/local/lib/node_modules/homebridge-infinitude-schedules/src/InfinitudeThermostat.js
  • /usr/local/lib/node_modules/homebridge-infinitude-schedules/src/InfinitudePlatform.js
  • /usr/local/lib/node_modules/homebridge-infinitude-schedules/src/index.js
  • /usr/local/lib/node_modules/homebridge/lib/plugin.js
  • /usr/local/lib/node_modules/homebridge/lib/pluginManager.js
  • /usr/local/lib/node_modules/homebridge/lib/api.js
  • /usr/local/lib/node_modules/homebridge/lib/server.js
  • /usr/local/lib/node_modules/homebridge/lib/cli.js
  • /usr/local/lib/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (/usr/local/lib/node_modules/homebridge-infinitude-schedules/src/InfinitudeThermostat.js:1:24)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    [08/02/2021, 13:25:34] ====================

[08/02/2021, 13:25:58] [Temperature and Humidity] Successfully got data. Temp 11.8, hum 81
(node:29307) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'htsp' of undefined
at InfinitudeThermostat. (/usr/local/lib/node_modules/homebridge-infinitude/src/InfinitudeThermostat.js:141:82)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ... to show where the warning was created)
(node:29307) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:29307) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:29307) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'htsp' of undefined
at InfinitudeThermostat. (/usr/local/lib/node_modules/homebridge-infinitude/src/InfinitudeThermostat.js:141:82)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:29307) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:29307) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'htsp' of undefined
at InfinitudeThermostat. (/usr/local/lib/node_modules/homebridge-infinitude/src/InfinitudeThermostat.js:141:82)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:29307) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:29307) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'htsp' of undefined
at InfinitudeThermostat. (/usr/local/lib/node_modules/homebridge-infinitude/src/InfinitudeThermostat.js:141:82)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:29307) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
[08/02/2021, 13:26:19] [Temperature and Humidity] Request to Davis API succeeded: {"data":{"did":"001D0A711170","ts":1612819578,"conditions":[{"lsid":266538,"data_structure_type":1,"txid":1,"temp": 53.2,"hum":81.0,"dew_point": 47.5,"wet_bulb": 49.8,"heat_index": 53.2,"wind_chill": 50.5,"thw_index": 50.5,"thsw_index": 56.1,"wind_speed_last":3.75,"wind_dir_last":290,"wind_speed_avg_last_1_min":6.81,"wind_dir_scalar_avg_last_1_min":270,"wind_speed_avg_last_2_min":7.00,"wind_dir_scalar_avg_last_2_min":269,"wind_speed_hi_last_2_min":9.37,"wind_dir_at_hi_speed_last_2_min":257,"wind_speed_avg_last_10_min":7.75,"wind_dir_scalar_avg_last_10_min":266,"wind_speed_hi_last_10_min":12.93,"wind_dir_at_hi_speed_last_10_min":250,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":0,"rain_storm_start_at":null,"solar_rad":135,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":67,"rainfall_year":1074,"rain_storm_last":67,"rain_storm_last_start_at":1612233001,"rain_storm_last_end_at":1612378861},{"lsid":367563,"data_structure_type":1,"txid":2,"temp":null,"hum":null,"dew_point":null,"wet_bulb":null,"heat_index":null,"wind_chill":null,"thw_index":null,"thsw_index":null,"wind_speed_last":null,"wind_dir_last":null,"wind_speed_avg_last_1_min":null,"wind_dir_scalar_avg_last_1_min":null,"wind_speed_avg_last_2_min":null,"wind_dir_scalar_avg_last_2_min":null,"wind_speed_hi_last_2_min":null,"wind_dir_at_hi_speed_last_2_min":null,"wind_speed_avg_last_10_min":null,"wind_dir_scalar_avg_last_10_min":null,"wind_speed_hi_last_10_min":null,"wind_dir_at_hi_speed_last_10_min":null,"rain_size":1,"rain_rate_last":null,"rain_rate_hi":null,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":null,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":null,"rain_storm_start_at":null,"solar_rad":null,"uv_index":null,"rx_state":2,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":0,"rainfall_year":1,"rain_storm_last":null,"rain_storm_last_start_at":null,"rain_storm_last_end_at":null},{"lsid":266536,"data_structure_type":4,"temp_in": 65.2,"hum_in":52.5,"dew_point_in": 47.4,"heat_index_in": 63.5},{"lsid":266535,"data_structure_type":3,"bar_sea_level":29.974,"bar_trend":-0.013,"bar_absolute":29.581}]},"error":null}
[08/02/2021, 13:26:19] [Temperature and Humidity] Successfully got data. Temp 11.8, hum 81
[08/02/2021, 13:26:32] [HttpTemperature] Call to getState: waiting_response is "false"
[08/02/2021, 13:26:32] [HttpTemperature] Requesting temperature on "http://172.16.1.57:3000/api/status/oat", method GET
(node:29307) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'htsp' of undefined
at InfinitudeThermostat. (/usr/local/lib/node_modules/homebridge-infinitude/src/InfinitudeThermostat.js:141:82)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:29307) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
(node:29307) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'htsp' of undefined
at InfinitudeThermostat. (/usr/local/lib/node_modules/homebridge-infinitude/src/InfinitudeThermostat.js:141:82)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:29307) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
(node:29307) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'htsp' of undefined
at InfinitudeThermostat. (/usr/local/lib/node_modules/homebridge-infinitude/src/InfinitudeThermostat.js:141:82)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:29307) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)
(node:29307) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'htsp' of undefined
at InfinitudeThermostat. (/usr/local/lib/node_modules/homebridge-infinitude/src/InfinitudeThermostat.js:141:82)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:29307) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)
[08/02/2021, 13:26:33] [HttpTemperature] HTTP successful response: 55
[08/02/2021, 13:26:33] [HttpTemperature] Converted Fahrenheit temperature to celsius: 12.777777777777777

@jlg89
Copy link
Author

jlg89 commented Feb 12, 2021

@etomnash that's really a separate issue from this thread, you're having installation and/or configuration problems. It looks like your issue with homebridge-infinitude is that you have schedules defined, and your t-stat is probably in Auto mode, either of which will cause that plugin to fail. You also shouldn't try to run both homebridge-infinitude and homebridge-infinitude-schedules at the same time.

@etomnash
Copy link

Apologies. I realized after posting that I should have posted the problems as new issues.

My main point got lost: given these difficulties I am looking for a light weight solution to get just rt (room temperature) from individual zones. I could use the same solution as for oat (HttpTemperature plugin or similar) but the Infinitude api does not allow drilling down to a specific zone as far as I can tell. It would be very useful to have the ability to parse the data delivered by the api call http://xx.xx.xx.xx:3000/api/status/zones

I thought that this might be a reasonable "philosophical" suggestion. I will try to suggest directly to the Infinitude developer that a deeper layer of api access would be very helpful, but I think their focus is elsewhere.

Thanks for pointing out that Auto mode and/or schedules causes home bridge-infinitude to fail. The problem with home bridge-infinitude-schedules seems to be that module 'hap-nodejs' is missing. I am not sure what I could be doing wrong in installation or configuration to cause that.

I know not to run both forks of the plugin simultaneously but did it to see if it solved the missing module problem for home bridge-Infinitude-schedules.

@dotfortun3-code
Copy link
Contributor

I know not to run both forks of the plugin simultaneously but did it to see if it solved the missing module problem for home bridge-Infinitude-schedules.

I will take a look at this and see what I can find. I noticed that periodically popping up about hap-nodejs, but I am not sure what is causing the issue. I believe it's supposed to use a globally available version but it can't seem to find it. If I add it to the package.json for the plugin, homebridge complains about it.

@rcoletti116
Copy link
Contributor

I know not to run both forks of the plugin simultaneously but did it to see if it solved the missing module problem for home bridge-Infinitude-schedules.

I will take a look at this and see what I can find. I noticed that periodically popping up about hap-nodejs, but I am not sure what is causing the issue. I believe it's supposed to use a globally available version but it can't seem to find it. If I add it to the package.json for the plugin, homebridge complains about it.

I think this is because you have it required in InfinitudeThermost.js but don't include it in your dependencies. Best practice is to use the global version. Check out the main plugin and compare line 1-2 of InfinitudeThermostat.js to yours https://github.com/jimhe/homebridge-infinitude/blob/master/src/InfinitudeThermostat.js. You'll see how it invokes the hap service without including as a dependency of the plugin itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants