[MyDomoAtHome] Support thread

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

lowca
Posts: 20
Joined: Tuesday 26 January 2016 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by lowca »

Thx.,
I have some problems., mdah crash if i dont have any camera and room plan...
Maybe its something with my db..
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

sorry I've seen that, will fix that tonight.

in the meantime:

sudo apt-get install MyDomoAtHome=0.1.22
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

ok new version with standalone auth and auto to domoticz (thanks to spawnrider):

It works in a "key":"value" mode. Basic value is:

{
"app_name": "MyDomoAtHome",
"auth": null,
"domoticz": {
"ssl": false,
"host": "127.0.0.1",
"port": "8080",
"path": "/",
"auth": null,
},
"port": "3002",
"passcode": ""
}

- multi-instances: just change the app_name tag between instances
- change the MDAH port: change the basic (top level) port (here 3002)
- protected device code: change the passcode above
- access domoticz in ssl mode: change domoticz:port and ssl to true
- change domoticz host or port: do it on domoticz:host and domoticz.port
- add a login/pass to access MDAH:change top-level "auth": null to "auth": { "username": "admin", "password": "admin" },
- manage login/pass on domoticz, do the same in domoticz:path
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
lowca
Posts: 20
Joined: Tuesday 26 January 2016 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by lowca »

Thx great work !
But in my system still crash without rooms ... (no camera ok)..
naitsirhc
Posts: 44
Joined: Sunday 17 January 2016 11:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by naitsirhc »

Hi epierre,

Thanks for your answer.
Did the steps again and am pleased to say, it works (although the HTTPS part)
When I type https://****.no-ip.biz I can see my domoticz homepage.

Unfortunatly I don't get the part:
In the domoticz configuration add a section to redirect to the gateway such as this (change your ip below),
Do I have to add:

location /iss/ {
proxy_pass http://10.0.0.170:3001/;
acces_log /......
error_log /.....
(because I want to test without a password, I deleted
auth_basic "Access Restricted";
auth_basic_user_file "/etc/nginx/.htpasswd";)

in /etc/nginx/sites-available/domoticz?????

Do I have to delete the other location? (127.0.0.1)

and create a .htpasswd for both (using htpasswd from package apache2-utils => htpasswd -c .htaccess YOURusername YOURpasswd)

And how to create the .htpasswd?

Are these the only steps to go to connect Imperihome?

please tell me I'm very close :-)
Und Tschjuß
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

naitsirhc wrote:
and create a .htpasswd for both (using htpasswd from package apache2-utils => htpasswd -c .htaccess YOURusername YOURpasswd)

And how to create the .htpasswd?

Are these the only steps to go to connect Imperihome?

please tell me I'm very close :-)
Hello,

From yesterday's version you don't need to make this step, just add (see here in section config.json https://github.com/empierre/MyDomoAtHome) :
{
"app_name": "MyDomoAtHome",
"auth": "auth": { "username": "admin", "password": "admin" },
"domoticz": {
"ssl": false,
"host": "127.0.0.1",
"port": "8080",
"path": "/",
"auth": null
},
"port": "3002",
"passcode": ""
}
change login/pass here ;-)
Last edited by epierre on Tuesday 19 April 2016 10:17, edited 1 time in total.
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
ahmedadelhosni
Posts: 11
Joined: Wednesday 30 December 2015 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by ahmedadelhosni »

Hello all,

On last Friday I followed the wiki and after a lot of tries the Imperihome was working very well with Domoticz. I tried after all to follow the secure remote access but failed, and on Sunday I suddenly found the Application not working at all. After many tries I decided to create a new raspain jessie image !

Now I am following again the steps in the wiki in here https://www.domoticz.com/wiki/ImperiHome

I installed all required packages and restarted mydomoathome but still when I connet through the App i get this error :
Unnable to connect. Please check your parameters.

my Local API Base Url is : http://192.168.0.4:3002/

my /etc/mydomoathome/config.json

{
"app_name": "MyDomoAtHome",
"auth": null,
"domoticz": {
"ssl": false,
"host": "192.168.0.4",
"port": "8080",
"path": "/",
"auth": null,
},
"port": "3002",
"passcode": ""
}

My domoticz.sh :
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

DAEMON=/home/$USERNAME/domoticz/$NAME
DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"



If I go to : http://192.168.0.4:8080/json.htm?type=d ... order=Name
I can find outputs in the browser

If I go to : http://192.168.0.4:8080/devices
I get Domoticz offline from the browser.

The Domoticz App itself is working well.


I am out of ideas !!

THanks.
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

@ahmedadelhosni sorry, an error in the example above corrected, please remove the extra coma withing the domoticz block:
"auth": null, <-- this one

also if it does not start, check /var/log/mydomoathome
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
ahmedadelhosni
Posts: 11
Joined: Wednesday 30 December 2015 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by ahmedadelhosni »

epierre wrote:@ahmedadelhosni sorry, an error in the example above corrected, please remove the extra coma withing the domoticz block:
"auth": null, <-- this one

also if it does not start, check /var/log/mydomoathome
Great. At last it can see my device and the system is added.

Still there is problem in the app now. A pop up window says "MyDodoAtHome (ImperiHome Standard System) : iss : Could not get devices infos."
Also another pop up error window : Multiple local error for 'MyDomoAtHome' . Falling back to remote mode.
Still trying to debug

Thanks for the quick help
Last edited by ahmedadelhosni on Tuesday 19 April 2016 10:36, edited 1 time in total.
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

ahmedadelhosni wrote:
epierre wrote:@ahmedadelhosni sorry, an error in the example above corrected, please remove the extra coma withing the domoticz block:
"auth": null, <-- this one

also if it does not start, check /var/log/mydomoathome
Great. At last it can see my device and the system is added.

Still there is problem in the app now. A pop up window says "MyDodoAtHome (ImperiHome Standard System) : iss : Could not get devices infos."

Still trying to debug

Thanks for the quick help
check the logs, there could be two processes running or ... this message is just saying the Imperihome application cannot connect the MDAH gateway
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

@naitsirhc what are you trying to make ? both ssl + login/pass ?

a full SSL for domoticz and MDAH could be:

Code: Select all

access_log off;
 add_header Cache-Control public;
 server_tokens off;
 server  {
   include    /etc/nginx/proxy_params;
   listen 443 ssl;                                          #<== 443 is the default SSL port, change by another port if desired
   keepalive_timeout 70;
   server_name localhost (my_DDNS);      #<== here put domain names (without https://) separated by spaces
   ssl on;
   ssl_certificate             /etc/ssl/ca/server.crt;
   ssl_certificate_key         /etc/ssl/ca/server.key;
   ssl_client_certificate /etc/ssl/ca/ca.crt;
   ssl_verify_client on;
   add_header X-Frame-Options SAMEORIGIN;
   location / {
     proxy_pass http://(DOMOTICZ_IP):8080/;
     access_log /var/log/nginx/domoticz.access.log;
     error_log /var/log/nginx/domoticz.error.log;
    }
location /iss/ {
    proxy_pass http://(MDAH_IP):3002/;
    auth_basic            "Access Restricted";
    auth_basic_user_file  "/etc/nginx/.htpasswd";
    access_log /var/log/nginx/domoticz.access.log;
    error_log /var/log/nginx/domoticz.error.log;
   }
 }
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
ahmedadelhosni
Posts: 11
Joined: Wednesday 30 December 2015 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by ahmedadelhosni »

Well I checked the mentioned path in usage.log

This is the output each time I reload the APP.

Code: Select all

{"url":"http://192.168.0.4:8080/json.htm?type=devices&filter=utility&order=Name","headers":{"User-Agent":"request"},"level":"info","message":"","timestamp":"2016-04-19T08:41:59.359Z"}
{"level":"info","message":"Domoticz server: http://192.168.0.4:8080/json.htm","timestamp":"2016-04-19T08:42:03.846Z"}
{"level":"info","message":"Node version: 4.2.2","timestamp":"2016-04-19T08:42:03.870Z"}
{"level":"info","message":"MDAH version: MyDomoAtHome 0.1.27","timestamp":"2016-04-19T08:42:03.873Z"}
{"level":"info","message":"OS version: Linux linux 4.1.13-v7+","timestamp":"2016-04-19T08:42:03.877Z"}
{"level":"info","message":"Hostname: raspberrypi 192.168.0.4 in /var/www","timestamp":"2016-04-19T08:42:03.884Z"}
{"level":"info","message":"MDAH port: 3002","timestamp":"2016-04-19T08:42:03.929Z"}
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

ahmedadelhosni wrote:Well I checked the mentioned path in usage.log

This is the output each time I reload the APP.
looks fine, still connectivity issue ?

don't reload the app if this is the only message you get
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
ahmedadelhosni
Posts: 11
Joined: Wednesday 30 December 2015 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by ahmedadelhosni »

Actually no devices are shown yet. Domoticz App can see devices well.

This for example works fine: http://192.168.0.4:8080/json.htm?type=c ... tchcmd=Off

Code: Select all

{
   "status" : "OK",
   "title" : "SwitchLight"
}
These are the running processes:

Code: Select all

pi@raspberrypi:~/domoticz $ ps aux | grep mydomo
www-data  1641  0.0  0.2   4596  2372 ?        Ss   11:05   0:00 /bin/bash /usr/share/mydomoathome/bin/mydomoathome
www-data  1644  2.7  3.1 123116 29452 ?        Sl   11:05   0:03 node /usr/local/bin/forever --minUptime 1000 --spinSleepTime 1000 --max-old-space-size=128 /usr/share/mydomoathome/app/mdah.js
www-data  1667  4.5  3.9 130452 37816 ?        Sl   11:05   0:04 /usr/bin/node /usr/share/mydomoathome/app/mdah.js
pi        1684  0.0  0.2   4260  1912 pts/0    S+   11:07   0:00 grep --color=auto mydomo

User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

ahmedadelhosni wrote:Actually no devices are shown yet. Domoticz App can see devices well.

This for example works fine: http://192.168.0.4:8080/json.htm?type=c ... tchcmd=Off

Code: Select all

pi@raspberrypi:~/domoticz $ ps aux | grep mydomo
www-data  1641  0.0  0.2   4596  2372 ?        Ss   11:05   0:00 /bin/bash /usr/share/mydomoathome/bin/mydomoathome
www-data  1644  2.7  3.1 123116 29452 ?        Sl   11:05   0:03 node /usr/local/bin/forever --minUptime 1000 --spinSleepTime 1000 --max-old-space-size=128 /usr/share/mydomoathome/app/mdah.js
www-data  1667  4.5  3.9 130452 37816 ?        Sl   11:05   0:04 /usr/bin/node /usr/share/mydomoathome/app/mdah.js
pi        1684  0.0  0.2   4260  1912 pts/0    S+   11:07   0:00 grep --color=auto mydomo

Can you access : http://192.168.0.4:3002/ if yes try the links in it to see devices
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
ahmedadelhosni
Posts: 11
Joined: Wednesday 30 December 2015 9:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by ahmedadelhosni »

epierre wrote:
ahmedadelhosni wrote:Actually no devices are shown yet. Domoticz App can see devices well.

This for example works fine: http://192.168.0.4:8080/json.htm?type=c ... tchcmd=Off

Code: Select all

pi@raspberrypi:~/domoticz $ ps aux | grep mydomo
www-data  1641  0.0  0.2   4596  2372 ?        Ss   11:05   0:00 /bin/bash /usr/share/mydomoathome/bin/mydomoathome
www-data  1644  2.7  3.1 123116 29452 ?        Sl   11:05   0:03 node /usr/local/bin/forever --minUptime 1000 --spinSleepTime 1000 --max-old-space-size=128 /usr/share/mydomoathome/app/mdah.js
www-data  1667  4.5  3.9 130452 37816 ?        Sl   11:05   0:04 /usr/bin/node /usr/share/mydomoathome/app/mdah.js
pi        1684  0.0  0.2   4260  1912 pts/0    S+   11:07   0:00 grep --color=auto mydomo

Can you access : http://192.168.0.4:3002/ if yes try the links in it to see devices
I can acess the link.

I can see results in http://192.168.0.4:8080/json.htm?type=devices

I can not reach this: http://192.168.0.4:3002/devices
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

@ahmedadelhosni what gives:

curl 'http://192.168.0.4:3002/devices'

anything in the logs ?
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
lowca
Posts: 20
Joined: Tuesday 26 January 2016 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by lowca »

@epierre
mdah 0.1.27 no room in room plan = crash ...
/usr/share/mydomoathome/app/mdah.js:1608
With empty room work ok ., but maybe it's a problem also for other users.. :?:
User avatar
epierre
Posts: 522
Joined: Wednesday 05 March 2014 13:16
Target OS: Linux
Domoticz version:
Location: France
Contact:

Re: [MyDomoAtHome] Support thread

Post by epierre »

@lowca thanks for reporting, I'll correct that ;-)
ImperiHome & MyDomoAtHome on top of:
868.42Mhz - Vera Lite - Fibaro SS-101, S-211, K-101, FWP - Fortress SSA2
433Mhz - Cubie Domoticz + RFXtrx + Oregon || Foscam 9821W
2,4Ghz - Cubie MySensors Gateway + COV + TempHumidity + Pressure + WaterMeter
lowca
Posts: 20
Joined: Tuesday 26 January 2016 22:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by lowca »

@epierre
0.1.28 rooms ok :) Thx ..
When installed on new system ., still problem with
"auth": null, <-- this one extra coma
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest