Skip to content

Commit

Permalink
Support for domoticz temp Farenheit
Browse files Browse the repository at this point in the history
close#145
  • Loading branch information
empierre committed Oct 7, 2017
1 parent 9d7d23e commit cd6aa60
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ The initial goal is to provide a REST API to ImperiHome ISS that would only allo

M4 milestone will provide extended support to other platforms with Docker and Synology
- [X] End to end authentificaton
- [X] Support domoticz Farenheit
- [X] Synology
- [X] Synology hosted package
- [X] Debian package - noarch
Expand Down Expand Up @@ -172,6 +173,7 @@ And check again
{
"app_name": "MyDomoAtHome",
"auth": null,
"tempmode": "C",
"domoticz": {
"ssl": false,
"host": "127.0.0.1",
Expand Down
11 changes: 8 additions & 3 deletions mdah.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ function getConf(){
app.set('port', process.env.PORT || nconf.get('port'));
app_name = nconf.get('app_name') || "MyDomoAtHome";
passcode = nconf.get('passcode') || passcode;
if (nconf.get('tempmode') == 'F') {
tempmode = 'F';
} else {
tempmode = 'C';
}
}
if (!(nconf.get('domoticz:host') || (nconf.get('domoticz:port')))) {
logger.warn('domoticz access configuration not found in /etc/mydomoathome/config.json, defaulting')
Expand Down Expand Up @@ -1318,7 +1323,7 @@ function DevTH(data) {
}

params = [];
params.push({"key": "Value", "value": data.Temp, "unit": C","graphable": "true"});
params.push({"key": "Value", "value": data.Temp, "unit": "+tempmode,"graphable": "true"});
myfeed.params = params;
return (myfeed);
case 'Humidity':
Expand All @@ -1345,7 +1350,7 @@ function DevTH(data) {

var params = [];
params.push({"key": "Hygro", "value": data.Humidity, "unit": "%", "graphable": "true"});
params.push({"key": "Temp", "value": data.Temp, "unit": C", "graphable": "true"});
params.push({"key": "Temp", "value": data.Temp, "unit": "+tempmode, "graphable": "true"});
myfeed.params = params;
return (myfeed);
case 'Temp + Humidity + Baro':
Expand All @@ -1360,7 +1365,7 @@ function DevTH(data) {

var params = [];
params.push({"key": "Hygro", "value": data.Humidity, "unit": "%", "graphable": "true"});
params.push({"key": "Temp", "value": data.Temp, "unit": C", "graphable": "true"});
params.push({"key": "Temp", "value": data.Temp, "unit": "+tempmode, "graphable": "true"});
myfeed.params = params;
combo.push(myfeed);

Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/deb-src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: MyDomoAtHome
Version: 0.2.25
Version: 0.2.26
Section: base
Priority: extra
Provides: MyDomoAtHome
Expand Down
4 changes: 2 additions & 2 deletions packaging/synology/build/INFO
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package="MyDomoAtHome"
version="0.2.25"
version="0.2.26"
description="Node MyDomoAtHome! The installable NodeJS System Service for Imperihome ISS to Domoticz gateway"
support_url="https://github.com/empierre/MyDomoAtHome/issues"
arch="noarch"
Expand All @@ -13,7 +13,7 @@ displayname="MyDomoAtHome"
dsmuidir="app"
adminport="3002"
changelog="First version"
checksum="f25d01bba6e6aedc897e21e1ef3f70f3"
checksum="d9c2a245c6e53b02ba9df6387516b463"
checkport="yes"
startable="yes"
helpurl="https://github.com/empierre/MyDomoAtHome/"
Expand Down

0 comments on commit cd6aa60

Please sign in to comment.