Irule remote not working with v18
#1
I use Irule for a remote control. After switching to Leia, my remote no longer worked. Saw this post and changed method from GET to POST. Still doesn't work. Is there something else I need to do?
Reply
#2
Split into own thread, as the changes thread says
Quote:Please keep this thread clean. It should be an easy overview for  JSON-RPC API consumers.
For discussions / feature requests / bugreports, please find (or create) the appropriate thread in the JSON_RPC forum.

No idea about the Irule remote or how to make in work with v9 of API
Reply
#3
Irule is just sending JSON requests.

For example, on Kodi pre-Leia, to switch profiles in the Audio Profiles addon, Irule sends to the IP of my Kodi box, port 8080, correct username/password, via GET method:
Code:
jsonrpc?request={"jsonrpc": "2.0", "id": 1, "method": "Addons.ExecuteAddon", "params": { "addonid": "script.audio.profiles", "params": ["1"] } }

This no longer works in Leia. Per your thread about the JSON changes, I kept everything the same but changed the method to POST, and it still does not work. 

Just in case something has changed with scripts, the same is true with simple actions like Cursor Left.
Reply
#4
You can't POST using url parameters, only GET. I don't know how Irule works but you need to POST to http://yourKodi:8080/jsonrpc with the JSON as the body, and the content-type of "application/json". See here for an example with curl and python.
Reply
#5
Were you able to get this working? If not, can you post some example code?
Reply
#6
I haven't really tried yet. I don't really know anything about JSON or what a complete command should look like. Plus it would be a huge pain to manually create every command in irule, which is no longer being updated on their end. So I'll probably just stick with Krypton for the forseeable future or just throw in the towel and use Yatse (which I don't want to do because it takes me out of my remote which lets me control receiver/tv volume, power for everything, etc).
Reply
#7
The JSON is the same, you'd just be changing the request from GET to POST. Can you post a snippet of code? Just a single action. That'll give me an idea of how much effort it would take.

I tried the Irule app, but I guess I need a device for it to work.I got as far as configuring the gateway for POST instead of GET. That's probably where you should start.
Reply
#8
Sorry for the late response. My second post in this thread includes a complete code I use in Irule with Krypton to launch a script. I tried keeping it the same and just changing the method from GET to POST but it still didn't work in Leia.
Reply
#9
I don't have an Irule so I can't really use the app to figure it out. Screenshots of the config would help.
Reply
#10
Here is a show osd example from mine. It isn't working for me with the gateway change to post instead of get either.

jsonrpc?request=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22Input.ShowOSD%22%2C%22id%22%3A1%7D
Reply
#11
(2019-03-19, 20:44)mguebert Wrote: Here is a show osd example from mine. It isn't working for me with the gateway change to post instead of get either.

jsonrpc?request=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22Input.ShowOSD%22%2C%22id%22%3A1%7D

I have iRule working with Kodi v18.1. 

I'm debating moving all my external commands on iRule over to my Vera IoT hub as a form of middleware. I'm so tired of trying to wrangle iRule into performing simple tasks. Sheesh.

Instructions for both iRule and Vera integration are posted here, The key for iRule is you need to ignore logic and use a Web Socket connection instead of HTTP, AND make sure you set it up as a NETWORK gateway and not HTTP. That was the step that finally cracked it for me. I was just about to give-up on iRule over this. What a cluster that product is.
Headless Linux Kodi box [Ubuntu 16.04.6 LTS Server] | Dedicated Media Server [Ubuntu 16.04.6 LTS Server]
Reply

Logout Mark Read Team Forum Stats Members Help
Irule remote not working with v180