Update Kodi no longer works
Update Kodi no longer works
Hi,
Not sure what's wrong but since I updated to 4.7 of filebot my amc script don't update the library on my kodi server, the plex server is updated fine (installed on the same server)
use --def kodi=192.1.1.25 and --def plex=192.1.1.25
The remote settings of Kodi is correct since I'm allowed to update it via curl
curl.exe -i -X POST -d "{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.Scan\", \"id\": \"mybash\"}" -H "content-type:application/json" http://[email protected]:9090/jsonrpc > NUL 2>&1
any ideas?
thanks.
Not sure what's wrong but since I updated to 4.7 of filebot my amc script don't update the library on my kodi server, the plex server is updated fine (installed on the same server)
use --def kodi=192.1.1.25 and --def plex=192.1.1.25
The remote settings of Kodi is correct since I'm allowed to update it via curl
curl.exe -i -X POST -d "{\"jsonrpc\": \"2.0\", \"method\": \"VideoLibrary.Scan\", \"id\": \"mybash\"}" -H "content-type:application/json" http://[email protected]:9090/jsonrpc > NUL 2>&1
any ideas?
thanks.
Re: Update Kodi no longer works
Your curl requests just means that the HTTP API is working. FileBot is using (and always has been using) the lower-level TCP (i.e. telnet) to send messages to Kodi.
@see http://kodi.wiki/view/JSON-RPC_API#TCP
@see http://kodi.wiki/view/JSON-RPC_API#TCP
Re: Update Kodi no longer works
i've tried running
telnet 192.1.1.25 9090 works so I don't understad why using Filebot doesn't.
Code: Select all
telnet('192.1.1.25', 9090) { writer, reader ->
writer.println("""{"jsonrpc":"2.0","method":"VideoLibrary.Scan","id":1}""")
}
Re: Update Kodi no longer works
Isn't that literally what FileBot is doing? What else is different?
* https://github.com/filebot/scripts/blob ... .groovy#L8
* https://github.com/filebot/scripts/blob ... roovy#L477

* https://github.com/filebot/scripts/blob ... .groovy#L8
* https://github.com/filebot/scripts/blob ... roovy#L477
Re: Update Kodi no longer works
precisely 
used it to debug but doesn't work for some reason.
Would have been a different story if a regular telnet connection wouldn't work.
saw that there was a new version of Filebot, so tried 4.7.1 as well, no luck.

used it to debug but doesn't work for some reason.
Would have been a different story if a regular telnet connection wouldn't work.
saw that there was a new version of Filebot, so tried 4.7.1 as well, no luck.
Re: Update Kodi no longer works
So you're saying you've tried this and it's NOT working?
Is it "working but nothing happens" or throwing an exception? I'd start by checking if Kodi is sending anything back:
Code: Select all
telnet('192.1.1.25', 9090) { writer, reader ->
writer.println("""{"jsonrpc":"2.0","method":"VideoLibrary.Scan","id":1}""")
}
Code: Select all
telnet('192.1.1.25', 9090) { writer, reader ->
writer.println("""{"jsonrpc":"2.0","method":"VideoLibrary.Scan","id":1}""")
def br = new BufferedReader(reader)
println br.readLine()
}
Re: Update Kodi no longer works
I've updated things to use the HTTP API. Please call with -script dev:amc to test the latest revision.
Re: Update Kodi no longer works
correct telnet not working, tried with your code but nothing is put out to the console.
the dev:amc works though
From logs:
GET: http://192.1.1.25:9090/jsonrpc?request= ... %22%3A1%7D
the dev:amc works though

From logs:
GET: http://192.1.1.25:9090/jsonrpc?request= ... %22%3A1%7D
Re: Update Kodi no longer works
Alright. Let's leave it with simple HTTP GET requests. That'll make things easier to debug if something isn't working.
Re: Update Kodi no longer works
great, will this be included in the next release and until then I need to run dev:amc?
thanks!
thanks!
Re: Update Kodi no longer works
The scripts update themselves. If you call fn:amc sometime next week you it'll probably be running the latest and greatest.
However, if there were people actively using dev:amc then it might be possible to catch some issues before they make it into fn:amc from time to time.
However, if there were people actively using dev:amc then it might be possible to catch some issues before they make it into fn:amc from time to time.

Re: Update Kodi no longer works
Hello 
For me it is not working anymore as well. I can update via curl commands through the 9090 port without issues and can telnet to 9090. I get the following in the logs:
Notify Kodi: 192.168.178.41
GET: http://192.168.178.41:9090/jsonrpc?requ ... %22%3A1%7D
Server returned HTTP response code: 400 for URL: http://192.168.178.41:9090/jsonrpc?requ ... %22%3A1%7D
Done ヾ(@⌒ー⌒@)ノ
------ > Curl works fine and i can telnet to 9090:
C:\Users\Administrator\AppData\Local\Apps\cURL\bin>curl.exe -i -X POST -d "{\"js
onrpc\": \"2.0\", \"method\": \"VideoLibrary.Scan\", \"id\": \"mybash\"}" -H "co
ntent-type:application/json" http://[email protected]:9090/jsonrpc > NUL 2>&1
--- output from telnet connected to kodi ----
{"jsonrpc":"2.0","method":"VideoLibrary.OnScanStarted","params":{"data":null,"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":320,"type":"episode"},"transaction":true},"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":321,"type":"episode"},"transaction":true},"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnScanFinished","params":{"data":null,"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnScanStarted","params":{"data":null,"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":322,"type":"episode"},"transaction":true},"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnScanFinished","params":{"data":null,"sender":"xbmc"}}
Tried the dev:amc switch but I see it polls port 8080, I have my web service running on 80:
Notify Kodi: 192.168.178.41:8080
GET: http://192.168.178.41:8080/jsonrpc?requ ... %22%3A1%7D
Connection refused: connect
Done ヾ(@⌒ー⌒@)ノ
Is there something I am missing?
Any chance we can specify the port where we want to talk to Kodi?

For me it is not working anymore as well. I can update via curl commands through the 9090 port without issues and can telnet to 9090. I get the following in the logs:
Notify Kodi: 192.168.178.41
GET: http://192.168.178.41:9090/jsonrpc?requ ... %22%3A1%7D
Server returned HTTP response code: 400 for URL: http://192.168.178.41:9090/jsonrpc?requ ... %22%3A1%7D
Done ヾ(@⌒ー⌒@)ノ
------ > Curl works fine and i can telnet to 9090:
C:\Users\Administrator\AppData\Local\Apps\cURL\bin>curl.exe -i -X POST -d "{\"js
onrpc\": \"2.0\", \"method\": \"VideoLibrary.Scan\", \"id\": \"mybash\"}" -H "co
ntent-type:application/json" http://[email protected]:9090/jsonrpc > NUL 2>&1
--- output from telnet connected to kodi ----
{"jsonrpc":"2.0","method":"VideoLibrary.OnScanStarted","params":{"data":null,"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":320,"type":"episode"},"transaction":true},"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":321,"type":"episode"},"transaction":true},"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnScanFinished","params":{"data":null,"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnScanStarted","params":{"data":null,"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnUpdate","params":{"data":{"item":{"id":322,"type":"episode"},"transaction":true},"sender":"xbmc"}}{"jsonrpc":"2.0","method":"VideoLibrary.OnScanFinished","params":{"data":null,"sender":"xbmc"}}
Tried the dev:amc switch but I see it polls port 8080, I have my web service running on 80:
Notify Kodi: 192.168.178.41:8080
GET: http://192.168.178.41:8080/jsonrpc?requ ... %22%3A1%7D
Connection refused: connect
Done ヾ(@⌒ー⌒@)ノ
Is there something I am missing?

Any chance we can specify the port where we want to talk to Kodi?
Re: Update Kodi no longer works
The latest revision of the script uses the HTTP API instead of the TCP API. Default port is 8080 but if you have changed it then you can pass it along:
Code: Select all
--def kodi=localhost:8080
Re: Update Kodi no longer works
WOW! That was a fast replyrednoah wrote:The latest revision of the script uses the HTTP API instead of the TCP API. Default port is 8080 but if you have changed it then you can pass it along:Code: Select all
--def kodi=localhost:8080

Btw, I sent a small donation you way, I really like this software, automation at its finest. I wish commercial software had this kind of support!
Re: Update Kodi no longer works
What is the default port number in Kodi? I doubt that port 80 is default for an API. Does it provide a browser-based web interface at the same time as well?
Re: Update Kodi no longer works
I am using osmc (which is Kodi in the end), just in case it makes a difference. Web Server listens in 8080 (I changed it to port 80) by default and the WebSockets interface is 9090 (which i believe is the json/rpc one). I cannot find any other information in regards to this, but I know in the latest osmc they were changing some stuff around. If I understood correctly , before this change, AMC script was using json/rpc calls to port 9090.rednoah wrote:What is the default port number in Kodi? I doubt that port 80 is default for an API. Does it provide a browser-based web interface at the same time as well?
Interestingly enough, and as you mentioned, it provides a web interface at the same time.
Re: Update Kodi no longer works
Alright, so 8080 is the default port for HTTP (makes sense) and 9090 is the default port for TCP connections. FileBot no longer uses TCP though because HTTP is easier to debug and test for users.
Re: Update Kodi no longer works
Thanks for the clarification and for your guidance. Being able to notify kodi directly is really helpful. Let me know if you need any logs from the dev:amc runs. Should I switch back to fn:amc at some point?rednoah wrote:Alright, so 8080 is the default port for HTTP (makes sense) and 9090 is the default port for TCP connections. FileBot no longer uses TCP though because HTTP is easier to debug and test for users.
Re: Update Kodi no longer works
The stable release channel is updated once or twice a month. Using dev:amc is encouraged because it'll help us (i.e. me and you) find and fix issues before they make it into the fn:amc channel.
Re: Update Kodi no longer works
Cool, thanks again rednoah. I will keep using dev:amc.rednoah wrote:The stable release channel is updated once or twice a month. Using dev:amc is encouraged because it'll help us (i.e. me and you) find and fix issues before they make it into the fn:amc channel.
Cheers!