Skip to content

Commit

Permalink
Upgrading to latest icomfort-js (#30)
Browse files Browse the repository at this point in the history
* Fixing readme, upgrading icomfort module
  • Loading branch information
kate-hall authored Dec 29, 2018
1 parent 98df3f3 commit f2d3d80
Show file tree
Hide file tree
Showing 22 changed files with 2,551 additions and 645 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
config
*.env
.gitignore

# Logs
logs
*.log

# Dependency directories
/node_modules
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ Smart Home Alexa Skills are very limited, temperature-wise, in what you can requ
"Alexa, turn [device name] down"
```

## Alexa Companion App

<img width="375" alt="alexa-companion-app" src="https://cloud.githubusercontent.com/assets/8494775/22136065/f50d990c-de86-11e6-8d21-2cc657c065f7.png">

## Set-Up Instructions

Want to get this up and running on your own Alexa? **Visit the [Wiki](https://github.com/kate-hall/alexa-icomfort/wiki) for instructions!**

I only have my own iComfort model to work with and develop against, so other systems may need tweaking (especially those with multiple appliances or zones, since I only have one to control my entire home's temperature). If you encounter any issues or have a suggestion, please open [an issue on this repository](https://github.com/kate-hall/alexa-icomfort/issues).

Having issues with Alexa not finding your thermostat, even though you can see it in the app? Try asking "Alexa, switch acccounts."

## Thanks
- Thanks to [Daniel McQuiston](https://github.com/danielmcq) for his [iComfort](https://github.com/deHugo/icomfort-js) repository, which I use to access the Lennox iComfort system.
- Thanks to [Krishnaraj Varma](https://github.com/krvarma/) for his [Alexa Smart Home Skill for Particle Devices](https://github.com/krvarma/particle-alexa-smart-home-skill) repository, which I used as the foundation of the Smart Home portion of the skill.
Expand Down
50 changes: 50 additions & 0 deletions data/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
var iComfort = require("../src/iComfort");
var iComfortSerial = ""; // YOUR APPLIANCE SERIAL HERE! Run Test 1 alone and assign resulting Gateway_SN value

var changeTemperatureTestVars = {
Away_Mode: 0,
Central_Zoned_Away: 2,
ConnectionStatus: 'GOOD',
Cool_Set_Point: 72,
DateTime_Mark: '/Date(1483815385897+0000)/',
Fan_Mode: 0,
GMT_To_Local: -28800,
GatewaySN: iComfortSerial,
Golden_Table_Updated: true,
Heat_Set_Point: 70,
Indoor_Humidity: 31,
Indoor_Temp: 70,
Operation_Mode: 3,
Pref_Temp_Units: '0',
Program_Schedule_Mode: '1',
Program_Schedule_Selection: 4,
System_Status: 0,
Zone_Enabled: 1,
Zone_Name: 'Zone 1',
Zone_Number: 0,
Zones_Installed: 1
};

/* auth defined globally in icomfort */
var getSystemsInfoParams = {UserId: auth.username};
var getInfoParams = {GatewaySN: iComfortSerial, TempUnit: 0};

/* Data 1 = Retrieves appliance ID for later lookups and system name for Alexa device naming */
iComfort.getSystemsInfo(getSystemsInfoParams, auth)
.then(console.log)
.catch(console.error);

/* Data 2 = Contains current temperature parameters to overwrite when changing temperature */
// iComfort.getThermostatInfoList(getInfoParams, auth)
// .then(console.log)
// .catch(console.error);

/* Data 3 = Returns data on min and max temperatures of your unit, not used in Alexa Skill */
// iComfort.getGatewayInfo(getInfoParams, auth)
// .then(console.log)
// .catch(console.error);

/* Data 4 = Careful! This test will change your actual temperature, uncomment to run */
// iComfort.setThermostatInfo(getInfoParams, changeTemperatureTestVars, auth)
// .then(console.log)
// .catch(console.error);
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
"description": "An Alexa Smart Home Skill for interacting with the Lennox iComfort WiFi",
"main": "index.js",
"scripts": {
"test": "jest"
"test-icomfort": "npm explore icomfort -- npm run test",
"getData": "node data/index.js"
},
"author": "Kate Hall <[email protected]> and Daniel McQuiston <[email protected]>",
"license": "MIT",
"dependencies": {
"icomfort": "^1.1.1",
"request": "^2.79.0",
"request-promise-native": "^1.0.3"
},
"repository": {
"type": "git",
"url": "https://github.com/kate-hall/alexa-icomfort.git"
},
"dependencies": {
"icomfort": "^1.3.0",
"request": "^2.79.0",
"request-promise-native": "^1.0.3"
},
"devDependencies": {
"jest": "~22.1.4"
"mocha": "^5.0.4"
}
}
Binary file added src/Archive.zip
Binary file not shown.
89 changes: 89 additions & 0 deletions src/node_modules/icomfort/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 5 additions & 41 deletions src/node_modules/icomfort/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/node_modules/icomfort/src/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 33 additions & 5 deletions src/node_modules/icomfort/src/lib/base.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 35 additions & 1 deletion src/node_modules/icomfort/src/lib/definitions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f2d3d80

Please sign in to comment.