Page 2 of 5

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Sunday 28 February 2016 9:29
by epierre
sure this way but not suitable for many people, some would like just a package, going on ssh and shell can br too hard... compared with a pré-installed domoticz image

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Friday 04 March 2016 21:55
by epierre
Hello,

need some testers on :

- blinds devices
- push on / off buttons
- docker image

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 05 March 2016 15:28
by epierre
0.0.19 version out with correction to waterflow, gas, multiswitch, dimmer

we'regetting close, need some tester on blinds please !

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Thursday 10 March 2016 6:44
by joshimosh
@epierre
Good morning,
I have tried to install the beta version in nodejs. I followed your install procedure as described on github.
- downloaded nodejs_4.4.2_armhf.deb and npm_2.14.7_armhf.deb from http://www.e-nef.com/domoticz/mdah
- sudo dpkg -i nodejs_4.4.2_armhf.deb gave me errormessages -> npm not found
- sudo dpkg -i npm_2.14.7_armhf.deb gave me errormessages -> nodejs not installed

Please advise.
Thanks a lot in advance for your help
Cheers
Josh

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Thursday 10 March 2016 7:12
by epierre
@josh send me your email so we discuss it on the slack support.

nodejs includes npm, your error is strange.

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Monday 21 March 2016 15:36
by bdormael
Maybe a dumb question, please forgive me if it is.

- Ive installed the nodejs version which installs fine and runs in usr/share and runs on a different port then the old mydomoathome
- I also still have the old mydomotathome in /home/pi/domoticz running on a different port

When I start the domoticz service, always both are starting up.
Is there a way to uninstall the old mydomoathome so it doesn't try to start that service anymore ?

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Monday 21 March 2016 15:40
by epierre
@bdormael to migrate:
- sudo service MyDomoAtHome.sh stop
- sudo rm /etc/init.d/MyDomoAtHome.sh

To have the new on same port:
- sudo vi /etc/mydomoathome/config.json
and change the port number

To completely remove it: rm -rf /home/pi/domoticz/MyDomoAthome if your user is pi

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Monday 21 March 2016 19:46
by bdormael
epierre wrote:@bdormael to migrate:
- sudo service MyDomoAtHome.sh stop
- sudo rm /etc/init.d/MyDomoAtHome.sh

To have the new on same port:
- sudo vi /etc/mydomoathome/config.json
and change the port number

To completely remove it: rm -rf /home/pi/domoticz/MyDomoAthome if your user is pi
Perfect, thx

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Monday 21 March 2016 22:48
by lowca
Hello ..I'am Testing dimmer .
Domoticz server: http://192.168.0.200:8080
Node version: 4.3.2
MDAH version: 0.0.28

On and Off works ok..
But when setting level :

Code: Select all

http://192.168.0.200:8080undefined
::ffff:192.168.0.104 - - [21/Mar/2016:21:40:35 +0000] "GET /devices/73/action/setLevel/46 HTTP/1.1" 500 36 "-" "-"
And sometime works ok .,:

Code: Select all

http://192.168.0.200:8080/json.htm?type=command&param=switchlight&idx=73&switchcmd=Set%20Level&level=12&passcode=
::ffff:192.168.0.104 - - [21/Mar/2016:20:55:45 +0000] "GET /devices/73/action/setLevel/75 HTTP/1.1" 200 16 "-" "-"
On MDAH version: 0.0.19 all works ok .,

Code: Select all

::ffff:192.168.0.104 - - [21/Mar/2016:21:54:34 +0000] "GET /devices/73/action/setLevel/74 HTTP/1.1" 200 16
Edit:. MDAH version: 0.0.28 started this morning and it works., (cache , etc.) but works fine.,
and again got response 500 ., and now 200 .. I can not find a reason .

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Wednesday 23 March 2016 12:56
by lowca
Found that in : case 'setLevel' whet device_tab[deviceId].Action has Null value then go to :default and it works .
But more often have value "1" so go to case 1: .. so i add to case 1:

Code: Select all

...
else {
        lsetLevel = Math.ceil(actionParam * (device_tab[deviceId].MaxDimLevel) / 100);
        my_url = "/json.htm?type=command&param=switchlight&idx=" + deviceId + "&switchcmd=Set%20Level&level=" + lsetLevel + "&passcode=";
       }
Don't know why it happens ..

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Friday 25 March 2016 21:54
by Justintime
I cant get my devices listed. My gateway is running.

When i give the command http://gateway_ip:gateway_port/devices the webpage returns at connection refused.

tried to set the 127.0.0.1 as domo_path. but same result.

If i set the domo_path to my domoticz ip adres 192.168.1.165:xxx in the gateway it will stay like this:
is that correct?

AppName: MyDomoAtHome
MDAH: http://192.168.1.165:3002
Domoticz: http://127.0.0.1:8080
NodeJS: v4.2.2
Webmanager: EJS
Renderer: Express

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 9:00
by epierre
@Iowca is that better now ? version 0.0.37 around with instll fixes

@Justintime thanks for the Wiki correction
have you tried accessing the html page http://192.168.1.165:3002 ?

Re: RE: Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 17:50
by Justintime
epierre wrote:@Iowca is that better now ? version 0.0.37 around with instll fixes

@Justintime thanks for the Wiki correction
have you tried accessing the html page http://192.168.1.165:3002 ?
YW for the wiki. I was stuck on that one. :)

Yes I can access the html page gateway.
In the other post you can see what it's reading.
When I change the json.htm in my internal ip and port it Wil stay on 127.0.0.1 in the html page. Is that correct?

Re: RE: Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 18:28
by epierre
Justintime wrote:
epierre wrote:@Iowca is that better now ? version 0.0.37 around with instll fixes

@Justintime thanks for the Wiki correction
have you tried accessing the html page http://192.168.1.165:3002 ?
YW for the wiki. I was stuck on that one. :)

Yes I can access the html page gateway.
In the other post you can see what it's reading.
When I change the json.htm in my internal ip and port it Wil stay on 127.0.0.1 in the html page. Is that correct?
The "intrernal page" just reflects your configuration in /etc/mydomoathome/config.json

if you click on the links here you should see the results based on this configuration.

If you call http://192.168.1.165:3002/devices you should have a result, not a 4xx or 5xx code

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 21:22
by lowca
info: Node version: 4.3.2
info: MDAH version: MyDomoAtHome 0.0.45

Unfortunately, the same .. i use mysensors 2.0 without radio as dimmer , maybe i do something wrong ,. :mrgreen:
But add code from defautl: to case 1: i case 'lsetLevel' do the job ,. so its no problem .,
Btw: Great job.

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 21:33
by epierre
@lowca can you send me the /json.htm?type=devices&filter=all&used=true&order=Name of your device ?

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 21:39
by lowca
epierre wrote:@lowca can you send me the /json.htm?type=devices&filter=all&used=true&order=Name of your device ?

Code: Select all

{
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Set Level: 46 %",
         "Description" : "",
         "Favorite" : 0,
         "HardwareID" : 19,
         "HardwareName" : "Mysensor2",
         "HardwareType" : "MySensors Gateway with LAN interface",
         "HardwareTypeVal" : 42,
         "HaveDimmer" : true,
         "HaveGroupCmd" : true,
         "HaveTimeout" : false,
         "ID" : "0000000",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-03-26 21:39:29",
         "Level" : 46,
         "LevelInt" : 7,
         "MaxDimLevel" : 15,
         "Name" : "Dimm1",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "Status" : "Set Level: 46 %",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "AC",
         "SwitchType" : "Dimmer",
         "SwitchTypeVal" : 7,
         "Timers" : "false",
         "Type" : "Lighting 2",
         "TypeImg" : "dimmer",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "76"
      },

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 21:55
by epierre
@lowca thanks for reporting, I've found things lost in translation, a v0.0.47 is out, can you test it ?

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 22:13
by lowca
epierre wrote:@lowca thanks for reporting, I've found things lost in translation, a v0.0.47 is out, can you test it ?
Short tests but it looks ok. Thx :mrgreen:

Re: [MyDomoAtHome] Bêta version in nodeJS

Posted: Saturday 26 March 2016 22:17
by epierre
my pleasure !