Letop: Wanneer je de volledige AudiRns Full Beta plugin gebruikt, is onderstaande functionaliteit reeds verwerkt.
Installeer dan onderstaande plugin dus niet, of deinstalleer deze.
Wanneer je Rns-e op TV / VIDEO staat (of de nieuwere versies op MEDIA) dan genereren een aantal knoppen bij gebruik Can berichten.
Deze Can berichten zijn met behulp van bijvoorbeeld een Python script om te zetten in Kodi commando's. Ik heb ervoor gekozen om JSONRPC commando's te gebruiken. Dit zijn korte commando's die middels HTTP headers verstuurd worden en waarop Kodi vervolgens reageert. Na op de 'Select' knop (de grote draaiknop) te duwen gebruik ik bijvoorbeeld de volgende code: [xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Input.Select","id":1}')]
Doordat je met deze functionaliteit feitelijk een webserver de mogelijkheid geeft om Kodi te besturen, dien je deze functie in Kodi toe te staan. "Allow control of Kodi via HTTP" in het "Webserver" menu.
Het Python script dat ik gemaakt heb voor besturing middels de Rns-e knoppen:
Rnse_Bediening (170 downloads )
Of download de direct installeerbare Kodi plugin:
Nu downloaden: Plugin Kodi bedienen met Rns-e
[whohit]Kodi bedienen met Rns-e[/whohit]
Sorry, maar waar dit precies worden opgeslagen? Ik betwijfel dat ik heb /root/.xbmc/userdata/ directory
Maar in mijn rasbian lite er /home/kodi/.kodi/userdata/ waar ik heb autoexec.py
Ik kan hem gewoon in hier en opslaan als 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)
Verwijderde oude plugin, vervolgens geïnstalleerd nieuwe. Nano /home/pi/python_can.py en verplaatst # naar de tweede lijn, Nog geen go. Opnieuw opstarten, opnieuw getest via bovenstaande commando, werken. Zal controleren later hoe het gaat in de auto.
Reacties zijn vanaf nu ook te plaatsen op het Forum!
U kunt schrijven hoe precies moet ik dit doen? Hoe dit script installeren. Ik begrijp nog steeds niet.
Hallo!
Ik ben net op deze site aan het kijken en vind dit zeer interessant!
Ik heb een a4 b7 cabrio met Rns systeem (welk type weet ik niet)
Heel graag zou ik een systeem als hier besproken erachter bouwen. Nu ben ik geen programmeur ? wel best handig.
Kan iemand mij precies vertellen wat allemaal en welk type raspberry aan te schaffen? Dan koop ik hier de software.
Nogmaals zeer zeer interessant!
Met vriendelijke groet Marcel
Audio_nl@hotmail.com