• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
piScheduler -- A pilight extension for the daily switch plan
#11
oops, did not read the complete code section ....
 
Reply
#12
(07-21-2014, 11:01 PM)wo_rasp Wrote: oops, did not read the complete code section ....
.. any important point I may have missed? Don't understand your posting, please give details.
 
Reply
#13
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 ?
 
Reply
#14
... and I expect that authentication settings (or the handling for '/send') is the problem.
Calling for
Code:
http://192.168.178.16:5001/config
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:
Quote:Unable to connect
Firefox can't establish a connection to the server at 192.168.178.16:5001.
 
Reply
#15
Additional 'curl' tests gives more confusion:

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
 
Reply
#16
Bug should be fixed. Also, it couldn't have worked in pilight 4, because it was a mongoose bug.
 
Reply
#17
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?
 
Reply
#18
You can test the development git version or the nightly of tonight.
 
Reply
#19
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? Wink )
 
Reply
#20
Smile 
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.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Does piSchedule work with pilight 8.1.1-nightly Peter S 0 1,411 06-29-2018, 07:57 PM
Last Post: Peter S
  pilight-console - an LCD / keypad interface for pilight frenchie71 3 1,159 11-21-2017, 11:15 PM
Last Post: curlymo
  Connect pilight to your hue bridge hannemann 3 2,420 01-03-2017, 11:26 PM
Last Post: hannemann
Wink PHP class using pilight socket connection Dan 0 1,364 11-03-2016, 11:41 AM
Last Post: Dan
  Controlling a RGB Led Strip over pilight mightyuhu 2 2,280 08-06-2016, 09:10 PM
Last Post: JohannK
  HomeBridge with pilight on raspbian Jurre 10 10,789 04-06-2016, 07:45 AM
Last Post: tomtom
  pilight voice commands kniazio 11 5,310 01-29-2016, 07:51 PM
Last Post: sral
  Python Ping pilight detect mobilephone Cryptomaster 0 2,028 01-10-2016, 04:17 PM
Last Post: Cryptomaster
  pilight config editor ktams 16 7,453 01-06-2016, 02:42 PM
Last Post: ktams
  command processing between pilight and openhab royhofman1989 3 2,689 07-13-2015, 11:26 AM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)