Python – Kodi naar FIS

Tags: , , , , , ,

15 berichten aan het bekijken - 1 tot 15 (van in totaal 33)
  • Auteur
    Berichten
  • #391
    Janssuuh
    Sleutelbeheerder

    EDIT: Ik heb het script momenteel verpakt in een officiële Kodi plugin, die direct te installeren is in Kodi. Het is hierdoor niet langer noodzakelijk om de autoexec.py te gebruiken.

    Nu downloaden: Python naar FIS.zip

     

     

    Bij het starten van Kodi wordt het bestand ‘autoexec.py’ aangeroepen. Mogelijk is deze standaard niet beschikbaar, in dat geval kun je het bestand zelf aanmaken.

    Bijgevoegd voorbeeld script haalt Artiest en Titel van spelende muziek op en zet deze door naar het FIS scherm van Audi.

    Nu downloaden: Python naar FIS autoexec.py

     

    Plak de inhoud van het script in de autoexec.py:
    [nano /root/.kodi/userdata/autoexec.py]

    Het is (helaas) alleen mogelijk om het script te testen door daadwerkelijk Kodi op te starten.
    Wanneer je zou proberen om handmatig het script uit te voeren door [python autoexec.py] uit te voeren, dan krijg je een foutmelding dat de module ‘xbmc’ niet bestaat (deze wordt alleen aangeroepen door kodi / xbmc).

    Eventuele foutmeldingen zijn in te zien in [nano /root/.kodi/temp/kodi.log]

    #3048
    Jürgen
    Deelnemer

    Hallo,
    ich habe folgendes Problem mit dem „Plugin Send Kodi to FIS“. Anscheinend gibt es Probleme mit dem originalen Audi Bluetooth Telefon Interface. Dieses schaltet automatisch auf Stummschaltung sobald ich das Plugin im Kodi aktiviere. Dann wechselt die Anzeige im Kombiinstument immer zwischen Kodi und TV Tuner oder Telefoninterface.
    Könntest du mir hier weiterhelfen?
    Mfg Jürgen

    #3129
    Janssuuh
    Sleutelbeheerder

    Hallo Jürgen,

    Ich hab kein original Bluetooth FSE (nur getested mit ein Kufatec FIS Con) oder TV Tuner, aber vielleicht konnen Sie versuchen das “FSE Emulieren” option ins Kodi aus su schalten.

    (Ich hab ins “Skin Audi-Rns FULL BETA” Diesem option ins “Einstellungen” menu Eingebaut.)

    Weiter wird es hilfreich sein ein Log Daten zu machen, damit wurde Ich vielleicht sehen wie die ursprünglichen Aufteilung zwischen FSE und TV Gemacht werd.

    Mfg Jeroen

    #3138
    Jürgen
    Deelnemer

    Hello Jeroen,

    I will try this option this week and send you the can logs.

    The second Problem i have: Kodi Skin do not display RPM, Speed, wather temp or Headlights. All this parameters will read from Infotainment Can, properly? All other features workin great. When i turn off ignition the rasparry shut down correctly. All RNS-E Buttons will control Kodi. I do not understand what i doing wrong.

    Best regard from Austria,
    Jürgen

    #3158
    Janssuuh
    Sleutelbeheerder

    Hi Jürgen,

    Each model / type Audi has it’s own CanID’s / messages (mostly luckily with minimal differences).
    Rns-e is always same hardware and therefor always uses the same ID’s / is always working with my plugin 🙂

    I’m afraid your A6 C5 (if I remembered right) does not send the Speed / Rpm / Coolant message at all.
    It might use different ID’s, we need to have a look at your log to find out.

    Headlights is an interesting one. Do the Rns-e backlights switch on when you switch on your headlights?
    This ID must be the same if Rns is responding to it.

    Kind regards from Holland,
    Jeroen

    #3160
    Jürgen
    Deelnemer

    Hi Jeroen,

    I´m driving a A4 B6 (BY 2003). So it shold give no Problems?
    Yes, Rns-e backlights switch on when i switch on my headlights.

    Witch logs should i send you?

    BR Jürgen

    #3164
    Janssuuh
    Sleutelbeheerder

    Hi Jürgen,

    I developed / tested the plugin on my A4 B6 2001, so ID’s / messages should be identical then!
    There’s not much you could do wrong when (like you said) your Rns-e buttons allready work with the plugin.
    Maybe I’ve overseen something in the coding (maybe with reading your VIN and selecting the right ID usage).

    The flickering content to your FIS tell me there are no ‘errors’ in the script which tend it to stop.

    Again we’ll need to have a look at the log.
    If all working by default logfiles are written to /home/pi/rnslog (or rnslogs, it’s been a while).
    I limited the log to 7500 messages, so for testing it could be needed to directly after booting the Raspberry to have the interaction we want to measure (for example use your FSE / TV-Tuner, so the log picks up these messages).

    To give you a clue on the existing ID’s and what the messages mean you could have a look at:
    Known CanIDs

    Kind regards,
    Jeroen

    #3227
    Jürgen
    Deelnemer

    Hello Jeroen,

    Good news, one Problem i´ve fixed: “Kodi Skin do not display RPM, Speed, wather temp or Headlights”. I have installed an old version of pyton-can. My fault. 😉

    The flickering content to my FIS:
    I have can logliles created. Can i send you this files via email?

    BR Jürgen

    #3254
    Janssuuh
    Sleutelbeheerder

    Hi Jürgen,
    You can try to upload (only *.txt) file through: User Upload
    (Still adding this function to my site, so also in Beta 🙂 )

    Kind regards,
    Jeroen

    #3271
    Jürgen
    Deelnemer

    Hi Jeroen,

    i´ve uploaded the files.
    Following informations for you,

    I Used a “IMA Box Basic plus” an an original “Audi FSE”
    When i enable “write to FIS” in Kodi RNSE Skin or activate “can to display add on” then i have this flapping Display in FIS and mute RNS-E is on. (no sounds from IMA. Audio imput comes from FSE)

    Both devices will write to fis.

    link to Multimediaadapter:
    http://www.ima-box.de/produkte/versionsvergleich.php
    its the same like Kufatec

    BR Jürgen

    #3272
    Janssuuh
    Sleutelbeheerder

    Got the logs, thanks!
    I’ll try to check on them this weekend.

    Kind regards,
    Jeroen

    #3274
    Jürgen
    Deelnemer

    Thank you, is you need any other logs please write to me.

    BR Jürgen

    #3281
    Janssuuh
    Sleutelbeheerder

    Hi Jorgen,

    I had a look at your log. Specific this part:
    (Of course I’ll be happy to send you your full organized log by mail or so.)

    So, here’s a mindspin:

    After 627#80 39 39 39 39 28 28 28 the KMA ,TV/VIDEO content is sent
    After 627#80 3A 3A 3A 3A 28 28 28 the PHONE , content is sent

    The RX 665# 61 38 00 AA CA AA 2A seems te be coming from the FSE,
    I use (Raspberry TX) 665# 6F 20 00 00 30 00 20, which probably shuts Rns-e sound.
    I know there are several 665 messages, there is a difference somewhere sending these for only be able to write content to FIS (line1 / line2), like using your phonebook settings thru FIS (with steering wheel) or saying “I am having a phone conversation” and also shut Rns-e sound.

    Usually I send messages directly after my 665 message, on ID 265 and 267, which should overwrite 261 and 263 ID.
    Somehow in your setup both Rns-e (Video) and FSE seem to be sending to 261/263.

    I’ve noticed that directly after the 665# 61 38 00 AA CA AA 2A message of your FSE a respond gets sent.
    I assume this comes from the KI (head unit); 5AB#01 12.

    At this point I’m a bit confused on the order of the messages and what is or might be responding to who.
    Audio source is also sent each 100 milisecond, these messages look like:
    – 661#81 01 12 37 00 00 00 00 (Video)
    – 661#81 01 12 3A 00 00 00 00 (Phone)

    While logging this, I saw you pressed the up and down buttons of your steering wheel. Also I saw some Rns-e button activities.
    Can you remember what was drawn in your FIS (upper 2 lines, and maybe the middle part of the display)?

    I think it is not strange (yet) that there are no 265 / 267 logs, because scrolling from Video to Phone within the Rns-e does only make that device send it’s content (on 261 and 267).

    We might want to try logging again with;
    Putting FSE content to the FIS (I assume you can go to phonebook e.a. using your steering wheel, and / or maybe even call a phone number which will be written to the FIS). I still think this makes the FSE use ID 265/267.

    Afterwards I would be interested to see what will happen when Raspberry also is sending Artist/Song data to the FIS (with no FSE interruption).

    Kind regards,
    Jeroen

    #3290
    Jürgen
    Deelnemer

    Hello Jeroen

    thanks for your fast reply.

    #While logging this, I saw you pressed the up and down buttons of your steering wheel. Also I saw some Rns-e button activities.
    #Can you remember what was drawn in your FIS (upper 2 lines, and maybe the middle part of the display)?

    I have no MFSW in my car. Maybe i presst the up and down buttons on for Mid FIS (Wiper). I also push RNS-E buttons to switsch on and off the function “Send to FIS” in configuration Tab in Kodi Skin to generate the logs. Maibe this wasn´t oog Idea.

    I think it´s a good plan to test following:

    – turn off all plugins “send to FIS” and do browsing in Phonbook and do a call. Than i will anwer a incomming call.
    – disconnect FSE and test all plugins “send to FIS”

    i will send you the logs and so we can analys this behavier. For me analyse Can Protocol is new and so i can give only limited help.
    I´can´t test this today. (i have Christmas party in my company) I will try this Steps tomorrow and will give you feedback.

    If you want to test additional things please write me.

    BR Jürgen

    #3296
    Janssuuh
    Sleutelbeheerder

    Hi Jürgen,

    I coded some up/down pressing of the MFSW into the Raspberry, trying to get the volume more equal to the radio.
    This made me think you pressed these buttons 😎
    (The wiper buttons are on Comfort-bus, if only they were on Infotainment :S)

    As we saw the “Phone” content on line1 and the spaces ” ” on line 2 are just send by Rns-e. No overriding there.
    Browsing your Phonebook is only effective if it changes this content (with my Kufatec is doesn’t, because all content is just shown in the Rns-e Phone menu). Making a call (not even needed to answer it) would change the FIS content (name or number will be presented).

    Also at this time I assume the 665 message we saw bein inconsistent to each other yesterday might change its value during this.

    The disconnecting FSE and test the plugin probably results in successfully writing to the FIS. I’m still a bit afraid the FSE is responding to Raspberries messages.

    As you might know, the Bus messages are all Broadcasted. One device sends a message, and all others receive it (it even echoes to the sending device). This makes it impossible to send anything to the Headunit, but not to the FSE.
    Now in our example we need to tell the Headunit there is an FSE active and we might want to write content from it (but actually it’s the Raspberry). The real FSE also “sees” this communication and might respond with “it wasn’t me, restore regular content”, or even “something is wrong, I didn’t send anything”. This results in the flickering content.

    To make it a little more technical;
    Me neither have an MFSW, but I made an option in the Raspberry plugin to emulate it with Rns-e button pressing.
    This makes your FSE think you do have MFSW and then does show the FIS content during phonebook scrolling.
    (If we – I need to do some testing on this to – could catch a log of this, at least the silencing issue must be resolvable.)

    Have a nice Christmas party!

    Kind regards,
    Jeroen

15 berichten aan het bekijken - 1 tot 15 (van in totaal 33)
  • Je moet ingelogd zijn om een antwoord op dit onderwerp te kunnen geven.