[MyDomoAtHome] Support thread

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

Moderator: leecollings

Post Reply
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 »

DRuw wrote:Hi all,
I have some issues with getting my domoticz correctly in Imperihome..
for some reason, all items go to a folter called weather, also switches etc.
Any Idea how to fix this?
Hello,

can you explain a little bit more your issue ? there is a mapping from Domoticz so that items go to the same forlder as domoticz.
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 »

thorbj wrote:Hi, I'm trying to set up MyDomoAtHome on my Raspberry Pi running Domoticz.
After setup, when I try to access the devices list, I det a 502 Bad Gateway error. I notice that the MyDomoAtHome.sh service crashes immideately after I start it.

Code: Select all

 sudo /usr/bin/plackup -E production -s Starman --workers=4 -p 5001 -a /home/pi/domoticz/MyDomoAtHome/bin/app.pl --pid /tmp/mydomoathome.pid
Pid_file "/tmp/mydomoathome.pid" already exists.  Overwriting!
2015/09/24-13:31:37 Can't connect to TCP port 5001 on 0.0.0.0 [Adressen er allerede i bruk]
Well it says there is already a pid file meaning a process running, and second line says that the port 5001 is already in use, so you need to kill the "starman master" process manually before starting a new one.
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 »

ntougait wrote:Hi,

I had previous version of MyDomoAtHome working fine. Decided to update so i reinstalled following the wiki.
the update-mdah script is here to manage auto-upgrade, it stops, update libs and update source code before restarting the service.

recently the default port has been moved from 5001 to 3001, so be carefull on doing a "reinstall"
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
thorbj
Posts: 113
Joined: Thursday 20 November 2014 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Norway
Contact:

Re: [MyDomoAtHome] Support thread

Post by thorbj »

epierre wrote:Well it says there is already a pid file meaning a process running, and second line says that the port 5001 is already in use, so you need to kill the "starman master" process manually before starting a new one.
Great, now it seems I get te service to stay running at least. But I still get 502 Bad Gateway when trying to access http://ip:5001/devices

I've followed the wiki guide, and set up remote access. Where do I start to look for errors?
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
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 »

thorbj wrote:
epierre wrote:Well it says there is already a pid file meaning a process running, and second line says that the port 5001 is already in use, so you need to kill the "starman master" process manually before starting a new one.
Great, now it seems I get te service to stay running at least. But I still get 502 Bad Gateway when trying to access http://ip:5001/devices

I've followed the wiki guide, and set up remote access. Where do I start to look for errors?
what does this gives to you:

Code: Select all

lsof -i tcp:5001
I guess something else is already on the listening port for this is more an apache/nginx answer than a gateway one...
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
thorbj
Posts: 113
Joined: Thursday 20 November 2014 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Norway
Contact:

Re: [MyDomoAtHome] Support thread

Post by thorbj »

epierre wrote:what does this gives to you:

Code: Select all

lsof -i tcp:5001
I guess something else is already on the listening port for this is more an apache/nginx answer than a gateway one...

Code: Select all

pi@DomoCore ~ $ sudo lsof -i tcp:5001
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   2146     root   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
nginx   2147 www-data   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
nginx   2148 www-data   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
nginx   2149 www-data   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
nginx   2150 www-data   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
pi@DomoCore ~ $
Yeah, there seems to be more listening to port 5001. How can I find out what? I'm pretty fresh at this...
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
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 »

thorbj wrote:
epierre wrote:what does this gives to you:

Code: Select all

lsof -i tcp:5001
I guess something else is already on the listening port for this is more an apache/nginx answer than a gateway one...

Code: Select all

pi@DomoCore ~ $ sudo lsof -i tcp:5001
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   2146     root   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
nginx   2147 www-data   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
nginx   2148 www-data   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
nginx   2149 www-data   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
nginx   2150 www-data   10u  IPv4   7382      0t0  TCP *:5001 (LISTEN)
pi@DomoCore ~ $
Yeah, there seems to be more listening to port 5001. How can I find out what? I'm pretty fresh at this...
ok so in the config.yml modify port 5001 to 3001, this is the port you will use for the 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
thorbj
Posts: 113
Joined: Thursday 20 November 2014 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Norway
Contact:

Re: [MyDomoAtHome] Support thread

Post by thorbj »

Ok, so now I changed port to 3001 in MyDomoAtHome.sh, and in nginx config. I didn't find port in config.yml.
Still I get bad gateway.
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
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 »

thorbj wrote:Ok, so now I changed port to 3001 in MyDomoAtHome.sh, and in nginx config. I didn't find port in config.yml.
Still I get bad gateway.
Sorry I meant MyDomoAtHome.sh and start2.sh please replace "-p 5001" by "-p 3001", and also edit /etc/init.d/MyDomoAtHome.sh and do the same.

What configuration do you have in nginx ? the listen should be any port if you want to use custom certificate in https, and the forward to port 3001. If you're home you don't need to access through nginx (plack is nginx like).
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
thorbj
Posts: 113
Joined: Thursday 20 November 2014 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Norway
Contact:

Re: [MyDomoAtHome] Support thread

Post by thorbj »

Here is my nginx config:

Code: Select all

 
access_log off;
add_header Cache-Control public;
server_tokens off;
server  {
   include    /etc/nginx/proxy_params;                                                   
   listen 443 ssl;                                                                     
   keepalive_timeout 70;
   server_name localhost ++;
   ssl on;
   ssl_certificate             /etc/ssl/ca/server.crt;
   ssl_certificate_key         /etc/ssl/ca/server.key;
   add_header X-Frame-Options SAMEORIGIN;
   location / {
     proxy_pass http://localhost:8080/;                                                        access_log /var/log/nginx/domoticz.access.log;
     error_log /var/log/nginx/domoticz.error.log;                                            }
}
server {
   include /etc/nginx/proxy_params;
   listen 80;
   keepalive_timeout 70;
   server_name localhost ++;
   add_header X-Frame-Options SAMEORIGIN;
   location / {
     proxy_pass http://localhost:8080/;
     access_log /var/log/nginx/domoticz.access.log;
     error_log /var/log/nginx/domoticz.error.log;
    }
 }
server  {
   include    /etc/nginx/proxy_params;
   listen 3001;
   keepalive_timeout 70;                                                                    
 server_name localhost ++;
   add_header X-Frame-Options SAMEORIGIN;
   location / {
     proxy_pass http://10.10.10.127:3001/;
     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;
    }
 }
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
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 »

thorbj wrote:Here is my nginx config:

Code: Select all

 
access_log off;
add_header Cache-Control public;
server_tokens off;
server  {
   include    /etc/nginx/proxy_params;                                                   
   listen 443 ssl;                                                                     
   keepalive_timeout 70;
   server_name localhost ++;
   ssl on;
   ssl_certificate             /etc/ssl/ca/server.crt;
   ssl_certificate_key         /etc/ssl/ca/server.key;
   add_header X-Frame-Options SAMEORIGIN;
   location / {
     proxy_pass http://localhost:8080/;                                                        access_log /var/log/nginx/domoticz.access.log;
     error_log /var/log/nginx/domoticz.error.log;                                            }
     location /iss {
     proxy_pass http://10.10.10.127:3001/;
     auth_basic            "Access Restricted";
     auth_basic_user_file  "/etc/nginx/.htpasswd";
     error_log /var/log/nginx/domoticz.error.log;                                            }
}
 }
ok this is what I thought.

the nginx is here to do the SSL tunneling. I've modified above so that :

https://yourip:443/ will forwardto domoticz
https://yourip:443/iss will forwardto mdah

and you will access yourotherip:8080 for domoticz and http://10.10.10.127:3001/ for mdah.

you tried to have two processes (nginx and iss) listening to the same port on the same machine.
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
thorbj
Posts: 113
Joined: Thursday 20 November 2014 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Norway
Contact:

Re: [MyDomoAtHome] Support thread

Post by thorbj »

Fantastic, that solved it! Thank you! :)
2xRaspberry Pi Model 2 w/RaZberry z-wave chip (master/slave)|Fibaro Wall Plug|Fibaro Universal Dimmer 500W|Aeon Labs Multisensor|RFXtrx433E|Nexa WMR-1000|Nexa Pe-3|Nexa Remote|Nexa LGDR3500|Lightify Gateway|Lightify RGBW bulb
DRuw
Posts: 17
Joined: Tuesday 05 August 2014 16:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by DRuw »

epierre wrote:
DRuw wrote:Hi all,
I have some issues with getting my domoticz correctly in Imperihome..
for some reason, all items go to a folter called weather, also switches etc.
Any Idea how to fix this?
Hello,

can you explain a little bit more your issue ? there is a mapping from Domoticz so that items go to the same forlder as domoticz.
Yeah and that looks like the thing thats not working.
In Domoticz, switches are at switches etc. but in Imperihome, all items from domoticz go to a single tab called weather...
my ip/port/devices output is this:
{"devices":[{"params":[{"unit":"","value":"0.12","graphable":"false","key":"Value"}],"name":"MyDomoAtHome","type":"DevGenericSensor","id":"S0"},{"params":[{"unit":"°C","value":"37.9","graphable":"true","key":"Value"}],"name":"Temp MasterPi","id":"4","type":"DevTemperature","room":"Temp"},{"params":[{"unit":"°C","value":"13.2","graphable":"true","key":"temp"},{"unit":"%","value":"95","graphable":"true","key":"hygro"}],"name":"Voorspelling","id":"12","type":"DevTempHygro","room":"Temp"},{"params":[{"unit":"mbar","value":"1015","key":"Value"}],"name":"Voorspelling","type":"DevPressure","id":"12_1","room":"Temp"},{"params":[{"unit":"km/h","value":"2","graphable":"true","key":"Speed"},{"unit":"°","value":"208","key":"Direction"}],"name":"Huidig weer","type":"DevWind","id":"13","room":"Temp"},{"params":[{"value":"0.0","graphable":"true","key":"Value"}],"name":"UV","type":"DevUV","id":"14","room":"Temp"},{"params":[{"unit":"mm","value":"2.0","graphable":"true","key":"Accumulation"},{"unit":"mm/h","value":"0.0","key":"Value"}],"name":"Regen","type":"DevRain","id":"15","room":"Temp"},{"params":[{"unit":"km","value":"10.0","key":"Value"}],"name":"Zicht","type":"DevGenericSensor","id":"16","room":"Temp"},{"params":[{"unit":"°C","value":"42.2","graphable":"true","key":"Value"}],"name":"SlavePi Temp","id":"26","type":"DevTemperature","room":"Temp"}]}


any idea?

ps: I also don't get the first item with the value 0.12? don't have anything with that value :?
pps: that 0.12 thing goes to a "no room" group and the rest goes to weather :roll:
joshimosh
Posts: 58
Joined: Friday 29 May 2015 7:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [MyDomoAtHome] Support thread

Post by joshimosh »

@epierre:
Sorry for bugging you, but may I ask you to give an ETA for a fix of the missing electricity counters ?

Thank you and all the best
Josh
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: [MyDomoAtHome] Support thread

Post by Bikey »

Bikey wrote:Not all my switches appear in the ImperiHome App for iOS. I have 30 switches in the "Switches" tab, but I do have more then 50 (real switches, remote-buttons, and virtual) switches.

They are received by the App, because I can add them in a Dashboard page, so it seems to be because of the limitation on the number of switches in a single tab-page.
So the question is: why can't I see my rooms as pages in ImperiHome? Because if they are divided in rooms then I would not need to have 1 page "switches" with all my switches.

Also I have to empty tabs: "Utility" and "Volumio" which I would like to disappear.
@epiere Do you know the answer?
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 »

Bikey wrote:
Bikey wrote: Also I have to empty tabs: "Utility" and "Volumio" which I would like to disappear.
@epierre Do you know the answer?
@Bikey the answer is hard work and more hard work...

There is a version for testing, please use start2-2.sh and report any problems encountered.
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
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: [MyDomoAtHome] Support thread

Post by Bikey »

epierre wrote: @Bikey the answer is hard work and more hard work...
There is a version for testing, please use start2-2.sh and report any problems encountered.
Thanks, I have tried, but I get the following error when trying this (what does it do?):

Code: Select all

pi@raspberrypi ~/domoticz/MyDomoAtHome $ sudo ./start2-2.sh
Error while loading bin/app2.pl: Can't locate Dancer2.pm in @INC (@INC contains: /home/pi/domoticz/MyDomoAtHome/bin/../lib /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/pi/domoticz/MyDomoAtHome/bin/../lib/Domo2.pm line 6.
BEGIN failed--compilation aborted at /home/pi/domoticz/MyDomoAtHome/bin/../lib/Domo2.pm line 6.
Compilation failed in require at bin/app2.pl line 7.
BEGIN failed--compilation aborted at bin/app2.pl line 7.
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 »

please launch update-mdah.sh before to complete new dependencies
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
Bikey
Posts: 331
Joined: Sunday 22 February 2015 12:19
Target OS: Linux
Domoticz version: 2020.x
Location: Netherlands
Contact:

Re: [MyDomoAtHome] Support thread

Post by Bikey »

I did, and tried again but get the same results.
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 »

Bikey wrote:I did, and tried again but get the same results.
I added this, try manually (here I tested ok on a PI B:

(correction this one works)
curl -L http://cpanmin.us | perl - --sudo Dancer2
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest