diff --git a/Dockerfile b/Dockerfile index da24b517..ec890b16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,8 +50,8 @@ RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - RUN apt-get install -y nodejs #RUN apt-get install npm RUN npm install -g npm@2.x -RUN wget http://www.e-nef.com/domoticz/mdah/node-mydomoathome-0.2.30.deb -RUN dpkg -i node-mydomoathome-0.2.30.deb +RUN wget http://www.e-nef.com/domoticz/mdah/node-mydomoathome-0.2.31.deb +RUN dpkg -i node-mydomoathome-0.2.31.deb RUN mv /etc/mydomoathome/config.json /etc/mydomoathome/config.json.old VOLUME /etc/mydomoathome/ diff --git a/mdah.js b/mdah.js index 832134c2..910f38e8 100644 --- a/mdah.js +++ b/mdah.js @@ -425,9 +425,10 @@ function DevMultiSwitch(data) { var ret = data.LevelNames.split('|'); var mydev = {MaxDimLevel: null, Action: null, graph: null, Selector: ret}; - //console.log(mydev); + console.log(mydev); device_tab[data.idx] = mydev; - var lvl = (data.Level) / 10; + var lvl = Math.round((data.Level) / 10); + console.log(lvl); params.push({"key": "Value", "value": ret[lvl].toString()}); params.push({"key": "Choices", "value": res}); myfeed.params = params; diff --git a/packaging/synology/build/INFO b/packaging/synology/build/INFO index 555f0594..f0bb697a 100644 --- a/packaging/synology/build/INFO +++ b/packaging/synology/build/INFO @@ -1,5 +1,5 @@ package="MyDomoAtHome" -version="0.2.29" +version="0.2.30" description="Node MyDomoAtHome! The installable NodeJS System Service for Imperihome ISS to Domoticz gateway" support_url="https://github.com/empierre/MyDomoAtHome/issues" arch="noarch" @@ -13,7 +13,7 @@ displayname="MyDomoAtHome" dsmuidir="app" adminport="3002" changelog="First version" -checksum="42d7dad177f3a89c35a75df87779fbe9" +checksum="7acc99c9393ad16b7336909b91f74129" checkport="yes" startable="yes" helpurl="https://github.com/empierre/MyDomoAtHome/"