Page 8 of 55

Re: [MyDomoAtHome] Support thread

Posted: Wednesday 09 September 2015 18:11
by Bikey
epierre wrote: if there is a parameter presented by domoticz I can show that difference, what is your device so I can see ?
I already send a DevDoor for a DooLock device in DZ.
In Domoticz it is "SwitchType" : "Contact", see below:
Spoiler: show
{
"ActTime" : 1441812953,
"ServerTime" : "2015-09-09 17:35:53",
"Sunrise" : "07:07",
"Sunset" : "20:10",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Closed",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 2,
"HardwareName" : "RFXCOM",
"HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
"HardwareTypeVal" : 1,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "0A38F3E",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2015-09-09 13:59:54",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 15,
"Name" : "Garagedeur",
"Notifications" : "true",
"PlanID" : "0",
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 5,
"Status" : "Closed",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "AC",
"SwitchType" : "Contact",
"SwitchTypeVal" : 2,
"Timers" : "false",
"Type" : "Lighting 2",
"TypeImg" : "contact",
"Unit" : 10,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "46"
}
],
"status" : "OK",
"title" : "Devices"
}
But in the Gateway it is a switch:

{"params":[{"value":"0","key":"Status"}],"name":"Garagedeur","type":"DevSwitch","id":"46","room":"Switches"}
Same here, I already send a DevSmoke for a Smoke Detector device in DZ.
have you some device that are not mapped these way ? if so, please tell me your names on your DZ,
In Domoticz, my smoke detector is "SwitchType" : "Smoke Detector"
Spoiler: show
{
"ActTime" : 1441813136,
"ServerTime" : "2015-09-09 17:38:56",
"Sunrise" : "07:07",
"Sunset" : "20:10",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Normal",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 2,
"HardwareName" : "RFXCOM",
"HardwareType" : "RFXCOM - RFXtrx433 USB 433.92MHz Transceiver",
"HardwareTypeVal" : 1,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "CCFF00",
"LastUpdate" : "2015-08-28 11:46:49",
"MaxDimLevel" : 0,
"Name" : "Rookalarm beneden",
"Notifications" : "false",
"PlanID" : "0",
"Protected" : true,
"ShowNotifications" : true,
"SignalLevel" : 1,
"Status" : "Normal",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "KD101 smoke detector",
"SwitchType" : "Smoke Detector",
"SwitchTypeVal" : 5,
"Timers" : "false",
"Type" : "Security",
"TypeImg" : "smoke",
"Unit" : 0,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "54"
}
],
"status" : "OK",
"title" : "Devices"
}
I see that you have mapped this to:

Code: Select all

{"params":[{"value":"0","key":"Armable"},{"value":"1","key":"Ackable"},{"value":"1","key":"Armed"},{"value":0,"key":"Tripped"}],"name":"Rookalarm beneden","type":"DevSmoke","id":"54","room":"Switches"}
So Armable = 0, which is good. Perhaps because "Ackable" = 1 this triggers it to be presented in the interface with a "Armed" button?

If you leave both parameters out, just is done in the example API on Imperhome, both the smoke sensor and the motion detector appear without "Arm" button in the App. This is how it is done in the example API:

Code: Select all

{
      "id": "dev11",
      "name": "Smoke sensor",
      "type": "DevSmoke",
      "room": "roomID2",
      "params": [
        {
          "key": "Armed",
          "value": "1"
        },
        {
          "key": "Tripped",
          "value": "0"
        }
      ]
    },
]

Re: [MyDomoAtHome] Support thread

Posted: Saturday 12 September 2015 1:21
by chgil
Hello I install IMPERIHOME MyDomoAtHome but no function because after 5 second OFF, I execute the WIKI but "Also edit MyDomoAtHome.sh and change the path line 20 to your home installation" i don't what let change in line 20 of MyDomoAtHome.sh

OPTIONS="-E production -s Starman --workers=4 -p 5001 -a /home/pi/domoticz/MyDomoAtHome/bin/appl.pl --pid /tmp/mydomoathome.pid" # CHANGE TO YOUR PATH HERE
????????

WHERE IS MY PATH????

and ip in config.yml is 127.0.0.1:8080

thanks
chgil

Re: [MyDomoAtHome] Support thread

Posted: Saturday 12 September 2015 16:39
by epierre
chgil wrote:Hello I install IMPERIHOME MyDomoAtHome but no function because after 5 second OFF, I execute the WIKI but "Also edit MyDomoAtHome.sh and change the path line 20 to your home installation" i don't what let change in line 20 of MyDomoAtHome.sh

OPTIONS="-E production -s Starman --workers=4 -p 5001 -a /home/pi/domoticz/MyDomoAtHome/bin/appl.pl --pid /tmp/mydomoathome.pid" # CHANGE TO YOUR PATH HERE
if you're running a pi as pi user, nothing to change.

your full path is required if not here: /home/pi/domoticz/MyDomoAtHome

Re: [MyDomoAtHome] Support thread

Posted: Sunday 13 September 2015 15:49
by Bikey
Hi, I'm trying to set up secure remote access to the gateway.
For this I added the following lines to my nginx configuration in sites-available:

Code: Select all

#  access_log off;
add_header Cache-Control public;
   ssl_certificate             /etc/ssl/ca/server.crt;
   ssl_certificate_key         /etc/ssl/ca/server.key;
   include    /etc/nginx/proxy_params;
server  {
   listen 445 ssl;                         
   keepalive_timeout 70;
   server_name localhost 192.168.0.120; 
   ssl on;
   add_header X-Frame-Options SAMEORIGIN;
    server_tokens off;
     location / {
       proxy_pass http://192.168.0.120:5001/;
#      auth_basic            "Access Restricted enter credentials";
#      auth_basic_user_file  "/etc/nginx/.htpasswd";
      }
 }
If I try with a web browser I can now access the Gateway with https://192.168.0.120:445 as configured.

However, If I try to run the setup wizard of the Imerihome App with that URL it immedeately gives this message: " Error :( Invalid response from API.

If I disable SSL in the NGinx configuration file I it works again (of course with http://192.168.0.120:445), so it looks like the App is not handling SSL well?

Has anybody got this working? And how does your NGinx configuration looks like?

(p.s. I can not get this working with the instructions from the WiKi. E.g. the "location /iss/" in the configuration does not work and the proxy_pass instruction is missing).

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 10:06
by epierre
Bikey wrote:Hi, I'm trying to set up secure remote access to the gateway.

If I try with a web browser I can now access the Gateway with https://192.168.0.120:445 as configured.

However, If I try to run the setup wizard of the Imerihome App with that URL it immedeately gives this message: " Error :( Invalid response from API.
Hello,

https://192.168.0.120:445/ should work.

The app doesn't handle SSL for this is the NGINX that is the SSL endpoint with the android app. Afterward this is plain HTTP (as your redirect shows).

have a look here for we made it work : viewtopic.php?f=31&t=7819&p=53383&hilit=nginx#p53383

normally you should put domoticz on / and the mydomoathome on the /iss url, maybe there is a conflict ?

what is the output of : https://192.168.0.120:445 ?

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 11:48
by Bikey
The app doesn't handle SSL for this is the NGINX that is the SSL endpoint with the android app. Afterward this is plain HTTP (as your redirect shows).
What do you mean, should I use http://gatewayIP:gatewayPort in the Imperihome APP and not https://gatewayIP:gatewayPort ?

Then I have an unsecured connection over the internet to the gateway, with my username/password, that is not a good idea. I'm using the iOS Imperihome APP by the way.

So what I want is: Imperihome-Appp ---> SSL via Internet with authentication --> mydomoathome gateway --> http on internal network no authentication -> Domoticz-server.

(The ISS gateway and Domoticz are on the same server, so a perhaps a redirect to another file-location is even better then a http-redirect. Is that possible?)
normally you should put domoticz on / and the mydomoathome on the /iss url, maybe there is a conflict ?
As you can see in NGinx configuration it is listening to port 445 for mydomoathome. I'm using domoticz on port 443 so I would say they can both use "/"?
what is the output of : https://192.168.0.120:445 ?
This shows my the mydomoathme landing page (although without css formatting wich is strange).

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 11:52
by epierre
Bikey wrote:
The app doesn't handle SSL for this is the NGINX that is the SSL endpoint with the android app. Afterward this is plain HTTP (as your redirect shows).
So what I want is: Imperihome-Appp ---> SSL via Internet with authentication --> mydomoathome gateway --> http on internal network no authentication -> Domoticz-server.
this is what I propose, ssl endpoint in on nginx.
Bikey wrote: As you can see in NGinx configuration it is listening to port 445 for mydomoathome. I'm using domoticz on port 443 so I would say they can both use "/"?
yes
Bikey wrote:
what is the output of : https://192.168.0.120:445 ?
This shows my the mydomoathme landing page (although without css formatting wich is strange).
and https://192.168.0.120:445/devices ?

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 12:29
by Bikey
It shows the JSON output with devices (the same as http://192.168.0.120:5001), so this works.

Do you have the iOS App working with https? Perhaps it is a bug in the iOS App (iOS App is fairly new).

The ISS gateway and Domoticz are on the same server (Raspberry 2B), so perhaps a redirect to another file-location on the Domoticz-server is even better then a http-redirect. Is that possible and how to configure that with NGinx?

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 17:12
by epierre
Bikey wrote:
It shows the JSON output with devices (the same as http://192.168.0.120:5001), so this works.

Do you have the iOS App working with https? Perhaps it is a bug in the iOS App (iOS App is fairly new).

The ISS gateway and Domoticz are on the same server (Raspberry 2B), so perhaps a redirect to another file-location on the Domoticz-server is even better then a http-redirect. Is that possible and how to configure that with NGinx?
can you check you have made the right url https://192.168.0.120:445/ (try the / at the end if it solves something).

you can also submit a help request here : https://imperihome.zendesk.com/hc/en-us/requests/new quoting your configuration and see if there is something around.

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 21:08
by epierre
Bikey wrote: Do you have the iOS App working with https? Perhaps it is a bug in the iOS App (iOS App is fairly new).
Hello, bug confirmed, I opened bug 3574 to Imperihome team

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 22:25
by epierre
epierre wrote:
Bikey wrote: Do you have the iOS App working with https? Perhaps it is a bug in the iOS App (iOS App is fairly new).
Hello, bug confirmed, I opened bug 3574 to Imperihome team
they confirmed me that the custom certificate was causing the trouble on iOS, and that they are investigating a way to circumvent it.

Emmanuel

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 23:13
by Bikey
they confirmed me that the custom certificate was causing the trouble on iOS, and that they are investigating a way to circumvent it.
Great, thanks for your help finding and reporting this bug!

Re: [MyDomoAtHome] Support thread

Posted: Monday 14 September 2015 23:29
by Bikey
Only thing I still have (probably not important), is that if I open http://192.168.0.120:445 in my browser (which NGinx redirects to: http://192.168.0.120:5001) it displays the landing page without CSS formatting.

If I look at the the page-source it shows:

Code: Select all

<link rel="stylesheet" href="http://192.168.0.120/css/style.css" />
As you can see it is missing the port-number so it can't find the file. So the port seems to be stripped by the NGinx redirect?

In the NGinx error log I can also see this error:

Code: Select all

2015/09/14 23:06:07 [error] 5061#0: *106 open() "/usr/local/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.0.161, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.0.120:445", referrer: "http://192.168.0.120:445/issapi/"
If I call http://192.168.0.120:445/issapi/devices there is no CSS or favicon, so I don't get errors.

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 15 September 2015 7:53
by chgil
Ok i not change path but of 5 seconds imperihome take off why???

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 15 September 2015 8:57
by epierre
Bikey wrote:

Code: Select all

<link rel="stylesheet" href="http://192.168.0.120/css/style.css" />
As you can see it is missing the port-number so it can't find the file. So the port seems to be stripped by the NGinx redirect?
Bikey wrote:
a redirection issue, minor but I'll note it.
Bikey wrote: In the NGinx error log I can also see this error:

Code: Select all

2015/09/14 23:06:07 [error] 5061#0: *106 open() "/usr/local/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.0.161, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.0.120:445", referrer: "http://192.168.0.120:445/issapi/"
If I call http://192.168.0.120:445/issapi/devices there is no CSS or favicon, so I don't get errors.
this is more browser related, they search for icons, on a website we can have more than 10, I'll add one someday ;-) but this is minor-minor

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 15 September 2015 8:58
by epierre
chgil wrote:Ok i not change path but of 5 seconds imperihome take off why???
sorry I didn't get your point, if you're speaking french please contact me by pm for help

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 15 September 2015 14:04
by epierre
Bikey wrote:
they confirmed me that the custom certificate was causing the trouble on iOS, and that they are investigating a way to circumvent it.
Great, thanks for your help finding and reporting this bug!
a solution maybe: your own real ssl certificate: https://www.startssl.com/

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 15 September 2015 15:15
by Bikey
epierre wrote:
Bikey wrote:
they confirmed me that the custom certificate was causing the trouble on iOS, and that they are investigating a way to circumvent it.
Great, thanks for your help finding and reporting this bug!
a solution maybe: your own real ssl certificate: https://www.startssl.com/
Yeah that would help, but I'm using DomoAtHome/Domoticz at home :roll: So I have the IP-address of my cable provider and I don't think I can get a certificate for an ip-address that's not from my own domain(?) even If I'm using a dynamic DNS service.

Re: [MyDomoAtHome] Support thread

Posted: Tuesday 15 September 2015 22:07
by Thomasdc
HI!

i have problem with a dimmer in domoticz..
i can't send a value with a slider.. its only on or off (if i put the slider on 40% it goes all the way on)

Re: [MyDomoAtHome] Support thread

Posted: Wednesday 16 September 2015 15:33
by korniza
Ip cameras are getting realy painfull.
I try to get the image on Imperihome interface using MyDomoAtHome. The problems are:
1. Cameras are recognised as switches.
2. image is blank when i select "Watch".

I have setup my cameras correctly on the Domoticz (I can see stream). I can see also the stream from cameras using the same url as new device on Imperihome.
I can see the cameras on the http://DOMOTICZ_IP:3001/devices as you can see below
{"devices":[{"params":[{"key":"localjpegurl","value":"http://user:[email protected]:80/ ... otejpegurl"}],"room":"Switches","name":"bedroom>living_room","type":"DevCamera","id":"1_cam"},{"params":[{"key":"localjpegurl","value":"http://user:[email protected]:80/ ... &usr=&pwd="}],"type":"DevCamera","id":"2_cam","room":"Switches","name":"living_room>bedroom"},{"params":[{"value":"http://user:[email protected]:80/ ... &usr=&pwd="}],"type":"DevCamera","id":"3_cam","room":"Switches","name":"living_room"},{"params":[{"key":"localjpegurl","value":"http://user:[email protected]:80/ ... &usr=&pwd="}],"name":"Door","room":"Switches","type":"DevCamera","id":"4_cam"},{"room":"Switches","name":"Outdoor","type":"DevCamera","id":"5_cam","params":[{"value":"http://user:[email protected]:80/ ... &usr=&pwd="}]}]}
Also cameras are included on the json.htm?type=cameras

Can you give any solution?
Cameras are D-Link, some of the support rstp protocol (which domoticz is not supported). I have the feeling that is a bug of imperihome but I saw some people here that they had the same issue.
{
"result" : [
{
"Address" : "192.168.10.228",
"Enabled" : "true",
"ImageURL" : "/image/jpeg.cgi",
"Name" : "bedroom>living room",
"Password" : "password",
"Port" : 80,
"Username" : "user",
"idx" : "1"
},
{
"Address" : "192.168.10.229",
"Enabled" : "true",
"ImageURL" : "/image/jpeg.cgi",
"Name" : "living room>bedroom",
"Password" : "password",
"Port" : 80,
"Username" : "user",
"idx" : "2"
},
{
"Address" : "192.168.10.227",
"Enabled" : "true",
"ImageURL" : "/image/jpeg.cgi",
"Name" : "living room",
"Password" : "password",
"Port" : 80,
"Username" : "user",
"idx" : "3"
},
{
"Address" : "192.168.10.230",
"Enabled" : "true",
"ImageURL" : "video/mjpg.cgi?profileid=1",
"Name" : "Door",
"Password" : "password",
"Port" : 80,
"Username" : "user",
"idx" : "4"
},
{
"Address" : "192.168.10.226",
"Enabled" : "true",
"ImageURL" : "video/mjpg.cgi?profileid=1",
"Name" : "Outdoor",
"Password" : "password",
"Port" : 80,
"Username" : "user",
"idx" : "5"
}
],
"status" : "OK",
"title" : "Cameras"
}