I’ve changed both my Vera and Kodi machine in between.
So it was a complete new install on both sides personally.
I appreciate you sharing your experience though…
I turned on debugging and from Libreelc I see:
2022-03-24 00:38:32.893 T:1565 DEBUG : http://xxx:3480/data_request?id=variableset&DeviceNum=xxx&serviceId=urn:upnp-org:serviceId:XBMCState1&Variable=PlayerStatus&Value=Video_pause
I thought it was weird, because the older version I had installed was using KODIState1 not XBMC1. So in default.py I replaced all of the references of XBMCState to KODI.
My KODIRemote on Vera has a device type of “urn:schemas-upnp-org:device:KODIRemote:1”
I wonder what yours looks like…
I thought it was weird that it was referencing XBMCState1 and not KODIRemote1 as the plugin in Vera was expecting. I did a sed replace on those values in default.py and it is all working now. Not sure if @dbldown768 wants to add that to his code or not.
Also, the reason why the buttons on the Kodi plugin on Vera don’t work is because “As for many things Wiki is out of date. For security reasons there is a significant change in v18 that prevents GET working for most of the API commands. Use POST instead.”
So the get commands in the plugin like:
luup.inet.wget(“http://” … ipAddress … “:8080/jsonrpc?request=%7b%22jsonrpc%22%3a+%222.0%22%2c+%22method%22%3a+%22Player.GetActivePlayers%22%2c+%22id%22%3a+1%7d”, 5)
local jsondecoded = endecoder.decode(result1);
need to be called with a POST instead:
curl -X POST -H ‘Content-Type: application/json’ -i http://x:8080/jsonrpc --data ‘{“jsonrpc”: “2.0”, “method”: “Player.GetActivePlayers”, “id”: 1}’
And the port 8080 is hard coded in.
Hello, I’m reaching out again because I’ve just switched to Kodi Matrix and Vera Edge with UI7, and my xbmcstate is no longer working. I’ve been trying to tinker with it, but nothing seems to work, neither with Kodiremote nor xbmcstate. I’m a bit lost after reading all the posts that often refer to UI5 and Kodi 18. If a kind soul could guide me through the process to make it work with Kodi 20 and UI7, I would greatly appreciate it. It would be worth updating this plugin, as it’s quite useful. I believe I’m not the only one in this situation. Thank you very much.
If you have Philips Hue lights? There is a Kodi addon for that which works similar to what KodiRemote did.
Thats what I used instead, havent used XbmcState or KodiRemote for a long time.
Also the newer versions of Kodi use Pyrhon 3 for the addons. So any older addons that were not rebuilt for Python 3 just dont work.
You need to try this modified version of the addon.
Thank you for your help . I’ve seen the addon, but is it possible to make xbmcstate or kodiremote work for UI7? Do I also need to place akb-json in the lua lib, and where can I find it since the old forum doesn’t exist anymore?
I had it working with UI7 before the Kodi updates that broke the addon. So it should be possible.
And its so long since I used it I cant remember now.
akb-json file rings a bell, yes I think we had to upload that to the Vera controller.
I might have a copy of the file on my file server still? I will have a look.
Alright, thank you for the Lua file, as I can’t seem to find it anywhere.
I don’t think I have a copy of the file, I even looked in the folder on my Vera controllers where it was meant to be placed but I don’t see it there either. Must of deleted it.
This was an older user setup guide I wrote on how to setup KodiRemote.
EDIT: Looks like I wrote that for UI5.
@Sorin were all the old uploaded files on the old forum lost ?
Thank you, I’ve already read it. Thanks for your effort. I haven’t found it myself, but maybe someone here might have it.
That file is not on this forum and I can’t find it via a Google Search either.
If you had XMBCState working before did you not need the akb-json.lua file before also ?
Lucky I just found the file in a folder on my file server.
akb-json.zip (3.2 KB)
Regarding the setup for UI7 I cant remember now what we did or if we had to do anything differently, so you will have to read the forum posts for what we did in the past. Fairly sure it was working also on UI7 before Kodi v19 Matrix broke it.
Not used the modified addon for Kodi v19 Matrix and above, that the other user posted above, so can’t comment about that.
I expect the transport control buttons in UI7 wont work as the Kodi Json API also changed and blocked GET http commands as mentioned a few posts above. So unless the user that modified it also modified the Vera plugin also? Then that wont work. But assume the main feature you want to use is the play states of Kodi and controlling your Vera lights in play / pause / stop etc.
Good luck let me know if you get it working.
If I had xbmcstate before, but can’t find the file anymore, and I also switched from Vera Lite to Vera Edge, thank you, I’ll give it a try tomorrow.
Mike sounds like you had to modify the Kodi addon further to what dbldown768 did to get it working?
Care to share your version ?
Reading what Mike said above he had to edit the default.py file and change the referenced Vera Service from XMBCState1 to KODIRemote1.
I have just edited that file and zipped it up again, so you might be better trying to install this ZIP file as an addon in Kodi.
micasaverde.addon.zip (63.6 KB)
Looks like the HTTP commands for the playback transport control buttons that appear in the Vera web UI are located in the Vera plugin file called “I_KODIRemote.xml”
These would need changing from GET to POST HTTP commands.
However I think a username and password now also needs to be specified to access the Kodi JSON API, so not sure how you would handle that in this Vera plugin code ?
I wrote about sending HTTP commands from Vera scenes / LUA code etc here.