Note: If you have the full AudiRns Full Beta plugin, the following functionality is already processed.
Please install the following plugin so not, of deinstalleer deze.
If your Rns-e is on TV / VIDEO mode (or newer versions on MEDIA) using the buttons generate Can messages.
For example, this Can message are using a Python script to convert in Kodi commands. I have chosen to JSONRPC commands. These are short commands that are sent through HTTP headers and then responds that Kodi. After on the ' Select ' button (the large rotary button) for example, I use the following code to respond: [xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Input.Select","id":1}')]
Because this functionality actually allows a Web server to control Kodi, you need to allow this feature in Kodi. "Allow control of Kodi via HTTP" in the "Web server" menu.
The Python script I develloped for control with Rns-e buttons:
Rnse_Control (167 downloads)
Or download the directly installable Kodi plugin:
Download now: Plugin Kodi operate with Rns-e
[whohit]Control Kodi with Rns-e[/whohit]
Sorry, but where exactly this should be put? I doubt that I have /root/.xbmc/userdata/ directory
But in my rasbian lite there is /home/kodi/.kodi/userdata/ where I have put autoexec.py
Can I put it just in here and save as Rnse_Bediening.py ?
Hi,
Sorry, I’ve seen different userdata directories on varying Linux distros indeed. Kodi does boot what’s in autoexec.py in the userdata directory. Therefore I’d say the answer to your question should be; Yes, put your autoexec there.
If you save the Rnse_bediening.py to this same directory, the autoexec.py should look like;
____________________________________
import xbmc
xbmc.executescript(”/home/kodi/.kodi/userdata/Rnse_Bediening.py”)
___________________________________
I guess your Kodi log will be saved to; /home/kodi/.kodi/temp/kodi.log
If autoexec is being called, but can’t find the Rnse file, that will be reported to the log.
Please reply any new findings.
Jeroen
Maybe you could archive your. kodi folder? I believe I have all set up correctly, CANbus command line works, but kodi does not use it at all.
Have you setup the ' Python can’ aswell?
The Rns script is using the ' Python can’ for receiving can-messages. (Install chapter 4 at this website)
You could try whether autoexec is being called by changing it's content to:
______________________________
import xbmc
xbmc.executebuiltin(“Notification(‘autoexec.py’,’was called’)”)
_______________________________
It should give you a notification bar directly after Kodi.
Both Pican and Python can are modules which need to be installed. Therefor copy my .kodi folder would not help.
Yes, I did. Had to adjust text a bit as ‘ ’ were not copied correctly.
Have’nt been able to test this yet, but this zip should be installable by Kodi (install Addon from zip at system menu):
http://www.janssuuh.nl/download/328/
Will try to play around more next week. Do I need to change username/pass for webserver login? I use default rasbian image (not lite). All kodi configs go to /home/pi/.kodi
Should it be set as in image or as “pi” which is user which automatically logins.
I only checked the “allow http” button and left the other port / username / password settings to its default.
If you like to test whether these web commands work, I can help you providing some Json adress bar requests. This is independend to the Canbus script.
Good luck next week!
Added new plugin:
http://www.janssuuh.nl/download/328/
Did test this one (previous one dit not automaticly start indeed)
If you’re in ‘loopback’ mode (python_can.py setting) you could test your setup localy by SSH-ing into your Pi and command:
cansend can0 461#373001004001
and
cansend can0 461#373001002001
(Left and Right commands normally sent from Rns)
Uninstalled old plugin, then installed new one. nano /home/pi/python_can.py and moved # to the second line, Still no go. Rebooted, tested again via command above, working. Will check later how it goes in the car.
Comments are now also on the Forum!
Can you write how exactly i should this do? How install this script. I still dont understand.
Hello!
I just look at this site and find it very interesting!
I have a convertible with a4 b7 system Rns (I do not know what type)
Very much I would like discussed a system behind building. Now I'm not a programmer ? quite handy.
Can someone tell me exactly what all and what type of raspberry to buy? Then I buy here software.
Again very very interesting!
Best regards Marcel
Audio_nl@hotmail.com