2016-10-21, 14:15
In your proxy configuration, what does proxy_pass look like? It should be:
Code:
proxy_pass http://local_kodiaddress:local_kodiport/;
proxy_pass http://local_kodiaddress:local_kodiport/;
location /kodi/ {
proxy_pass http://192.168.1.68:8745/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
(2016-10-21, 14:54)jingai Wrote: Do you see the requests in kodi.log? You may have to enable debug mode, I forget.I will check. Heroku looks like its down at the moment, due to a DNS issue. Might be some time before I can test again.... :-(
(2016-10-21, 15:03)jingai Wrote: One more thing. What does the "url = " line look like in your kodi.py? Near the top.
url = "https://mydynamicdns:port/kodi/jsonrpc"
21:43:35 T:123145315860480 DEBUG: CWebServer[8080]: request received for /jsonrpc
(2016-10-21, 15:07)jingai Wrote: Pretty sure that's right. I'm assuming "mydynamicdns:port" is your actual host and port and you just masked it out to post it here.. but.. figured I'd verifyLol yes!!
(2016-10-21, 15:07)jingai Wrote: edit: nvm, you showed it's getting there in your nginx logs already.
Well, I'm not sure. I'd say check the kodi.log once Heroku is back online to see if it's complaining about the requests, or if it's even seeing them at all.
You should see something like this if it's working:
Code:21:43:35 T:123145315860480 DEBUG: CWebServer[8080]: request received for /jsonrpc
proxy_read_timeout 90;
(2016-10-21, 16:05)jingai Wrote: Only thing I can think of is the proxy is in some way munging the response.. I have no idea
Maybe it's cut short? Maybe try setting the read timeout to something high for now?
Code:proxy_read_timeout 90;
If that doesn't do anything (and it probably won't), you'd have to look at the actual response.
print r.text
r = requests.post(url, data=command, auth=(USER, PASS))
(2016-10-21, 16:14)jingai Wrote: Can try adding
Code:print r.text
after
Code:r = requests.post(url, data=command, auth=(USER, PASS))
curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "params":{"filter":{"field":"playcount", "operator":"lessthan", "value":"1"}}, "id":1}' -H 'content-type: application/json;' -u user:pass http://local_kodiaddr:local_kodiport/jsonrpc
(2016-10-21, 21:53)jingai Wrote: Ok.. let's just verify the JSON RPC interface is working at all.
If you have access to curl (or something like it), you can do:
Code:curl --data-binary '{"jsonrpc":"2.0", "method":"VideoLibrary.GetMovies", "params":{"filter":{"field":"playcount", "operator":"lessthan", "value":"1"}}, "id":1}' -H 'content-type: application/json;' -u user:pass http://local_kodiaddr:local_kodiport/jsonrpc
You should get an object back with all your movies.