oops, did not read the complete code section ....
Thread Rating:
piScheduler -- A pilight extension for the daily switch plan
|
07-22-2014, 06:54 AM
No, i did not scroll down on the settings.json file you posted and thought that you did not update the settings file with the new authentication settings ......
Some questions that come to my mind:
- What user/group does admin belong to ?
- Any other access rights that are inconsistent with the new settings ?
Some questions that come to my mind:
- What user/group does admin belong to ?
- Any other access rights that are inconsistent with the new settings ?
... and I expect that authentication settings (or the handling for '/send') is the problem.
Calling for
isn't a problem. I get an answer/dialog with asking for the authentication .. entering the correct uname/pw and getting the config.
Not the case with '/send'. It's trying to connect and finally FX gives:
Calling for
Code:
http://192.168.178.16:5001/config
Not the case with '/send'. It's trying to connect and finally FX gives:
Quote:Unable to connect
Firefox can't establish a connection to the server at 192.168.178.16:5001.
07-22-2014, 11:26 AM
Additional 'curl' tests gives more confusion:
Note: entering the same call on FX asks for the authentication and gives the 'config' result.
curl -v http://admin:admin@192.168.178.16:5001/send?{..} gives
Any help?
From the 'config' output I have:
"version":[ "5.0", "5.0", "v5.0" ]
Is the /send? only supported with the "dev" version of pilight?
If yes, please give the correct download address.
Guenter
Code:
~$ curl -v http://admin:admin@192.168.178.16:5001/config
* About to connect() to 192.168.178.16 port 5001 (#0)
* Trying 192.168.178.16... connected
* Server auth using Basic with user 'admin'
> GET /config HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 192.168.178.16:5001
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Digest qop="auth", realm="pilight", nonce="1406023776"
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection #0
Note: entering the same call on FX asks for the authentication and gives the 'config' result.
curl -v http://admin:admin@192.168.178.16:5001/send?{..} gives
Code:
~$ curl -v http://admin:admin@192.168.178.16:5001/send?{"message":"send","code":{"location":"Aussen","device":"Haustuer","state":"on"}}
* About to connect() to 192.168.178.16 port 5001 (#0)
* Trying 192.168.178.16... connected
* Server auth using Basic with user 'admin'
> GET /send?message:send HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 192.168.178.16:5001
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Digest qop="auth", realm="pilight", nonce="1406024442"
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection #0
* About to connect() to 192.168.178.16 port 5001 (#0)
* Trying 192.168.178.16... connected
> GET /send?code:location:Aussen HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 192.168.178.16:5001
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
* Authentication problem. Ignoring this.
< WWW-Authenticate: Digest qop="auth", realm="pilight", nonce="1406024442"
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection #0
* About to connect() to 192.168.178.16 port 5001 (#0)
* Trying 192.168.178.16... connected
> GET /send?code:device:Haustuer HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 192.168.178.16:5001
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
* Ignoring duplicate digest auth header.
< WWW-Authenticate: Digest qop="auth", realm="pilight", nonce="1406024442"
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection #0
* About to connect() to 192.168.178.16 port 5001 (#0)
* Trying 192.168.178.16... connected
> GET /send?code:state:on HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 192.168.178.16:5001
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
* Authentication problem. Ignoring this.
< WWW-Authenticate: Digest qop="auth", realm="pilight", nonce="1406024442"
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection #0
Any help?
From the 'config' output I have:
"version":[ "5.0", "5.0", "v5.0" ]
Is the /send? only supported with the "dev" version of pilight?
If yes, please give the correct download address.
Guenter
09-10-2014, 05:33 PM
Bug should be fixed. Also, it couldn't have worked in pilight 4, because it was a mongoose bug.
09-10-2014, 06:41 PM
Ok, thanks. Because I never installed vers.4 it came up to me only with 5.0.
You say "Bug should be fixed." .. is it it will be fixed with an updated pilight version?
You say "Bug should be fixed." .. is it it will be fixed with an updated pilight version?
09-10-2014, 06:46 PM
You can test the development git version or the nightly of tonight.
09-10-2014, 08:00 PM
Just checked on dev branch, but needs to be complied I guess.
Unfortunately until today I stood back from compiling software on LX/RPI.
(Maybe some can give a kick for it?
)
Unfortunately until today I stood back from compiling software on LX/RPI.
(Maybe some can give a kick for it?

piSchedule updated!
Thanks to some correction Curlmo made on the dev version of pilight and a brand new RPI installation here is a new version of 'piSchedule' (vers:0.1g)
'piSchedule' is used to switch devices following a daily plan with individual on/off time settings for the devices. Switch time values can be absolute, random or following sunrise/sunset. Random time-off-sets can be used for every time value.
The daily plan is renewed with every day change with recalculated values for sunrise/sunset and the random values. That way the lighting of a house/flat would not follow fixed time points, useful during absence to simulate activities in the house/flat.
'piSchedule' running on top of 'pilight' is a Python function.
See https://github.com/neandr/piScheduler with details, descriptions and installation notices.
Thanks to some correction Curlmo made on the dev version of pilight and a brand new RPI installation here is a new version of 'piSchedule' (vers:0.1g)
'piSchedule' is used to switch devices following a daily plan with individual on/off time settings for the devices. Switch time values can be absolute, random or following sunrise/sunset. Random time-off-sets can be used for every time value.
The daily plan is renewed with every day change with recalculated values for sunrise/sunset and the random values. That way the lighting of a house/flat would not follow fixed time points, useful during absence to simulate activities in the house/flat.
'piSchedule' running on top of 'pilight' is a Python function.
See https://github.com/neandr/piScheduler with details, descriptions and installation notices.
Browsing: 1 Guest(s)