• 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
config device #1 "living", missing protocol
#6
Thanks a lot for your help, I finally got it work and I can see my device values in the GUI
Now I'm trying to send curl request to pilight-daemon 
Here is my settings config :

Code:
"settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "webserver-enable": 1,
                "webserver-root": "/usr/local/share/pilight/",
                "webserver-http-port": 5001,
                "webserver-cache": 1,
                "port": 5000
        }


But when I execute :


Code:
curl -s -H "Content-Type: application/json" -X POST -d '{"action": "identify"}'  http://127.0.0.1:5000

I got an HTML response saying that "The pilight webgui is located at 127.0.0.1:5001"
Sure I'm doing something wrong but again I don't know where.
The pilight logs says :

Code:
[Nov 08 23:01:57:498819] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 58620
Seems that port is changing.

Doing that :

Code:
curl --local-port 5000  -H "Content-Type: application/json" -X POST -d '{"action": "identify"}' http://127.0.0.1

It says
Code:
Address already in use

My final goal is to be able to use domoticz to make periodical request to pilight-daemon to get the temperature.

EDIT: Ok I saw a similar thread (https://forum.pilight.org/Thread-pilight...-html-pagethat explains why it doesn't work.

I used 

Code:
echo {\"action\": \"identify\"} | nc 127.0.0.1 5000

and it finally worked
 
Reply
  


Messages In This Thread
RE: config device #1 "living", missing protocol - by jjlf - 11-08-2016, 11:55 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Compile with Optimization fails / timedate missing fourty2 6 373 04-29-2019, 12:27 PM
Last Post: fourty2
  Protocol Program PID AdHoc-Client Bigmama 12 800 01-26-2019, 07:36 PM
Last Post: Bigmama
  Config migration from pilight 7 .0 to 8.1.3 "Rules" Nonaamee 4 784 11-17-2018, 08:35 PM
Last Post: Nonaamee
Exclamation pilight detect wrong protocol quigg_gt9000 is not quigg_gt1000 PCT 1 793 08-12-2018, 11:13 AM
Last Post: Niek
  need some help with program protocol charlesjacob4695 1 425 05-15-2018, 05:58 PM
Last Post: curlymo
  problem with alecto_wx500 protocol (pilight V7) TheWheel 18 5,201 04-12-2018, 06:38 PM
Last Post: NevelS
  deleyCON remote plug socket (arctec_screen_old protocol) itsMe 6 1,127 04-01-2018, 08:35 PM
Last Post: itsMe
  Problem with Protocol gpio_switch engel035 15 2,921 03-19-2018, 06:46 PM
Last Post: curlymo
  arctech_contact protocol missing open/close signals Niek 2 604 12-23-2017, 07:16 PM
Last Post: Niek
  Extend generic protocol mickey.lm 6 1,077 11-20-2017, 10:51 PM
Last Post: mickey.lm

Forum Jump:


Browsing: 1 Guest(s)