Updating Komsi, and my DIY IBIS

Willkommen in der OMSI-WebDisk!
Als Gast kannst du nur Inhalte in deiner ausgewählten Sprache sehen. Registrierte Nutzer können die Sichtbarkeit anderer Sprachen in ihrem Kontrollzentrum aktivieren, weitere Infos hier.
Alle Themen sind in den Foren mit einer Sprachflagge gekennzeichnet: = Englisch [EN], = Deutsch [DE], = Französisch [FR]. Wenn du die angegebene Sprache nicht beherrschst, schreibe auf Englisch!

Hier gibt es keine verbindliche Software-&Hardwareberatung. Alle Beiträge folgen ausschließlich dem bestem Wissen und Gewissen. Eventuelle eigen verschuldete Folgeschäden sind nicht auf die Hilfestellungen hier in der WebDisk zurückzuführen.

  • This is a sort of carry on from a discussion in a thread about an Alternative zu KOMSI

    Where Thomas U. told me about the stringvariable 'IBIS' that can be used to get the text as it is shown on the in game IBIS screen and display it on a real LCD.


    I love Komsi, but it has a few issues i wish could be fixed to make it 'perfect' for us Fahrerarbeitsplatz builders, which i will list below, then there would be no need for some people to search for an alternative.


    Here is something i have been working on:


    It is a quickly made mock IBIS for a proof of concept, only the display works here, but i am thinking of designing a PCB that will have switches on it behind the button labels, that PCB will connect to the LCD and have an Arduino plug onto the back of it, and then i'd try and design a 3D printed ibis case, and people can make a working (with omsi only) IBIS unit.

    The photo above is just a (resized to match the LCD dimensions) print out of the texture file of the IBIS used in the MAN SD 202, D92 version, the screen area i cut out then laminated, and a 24 x 2 character LCD is stuck behind the window.


    I am still working on the Arduino code for it, but it is working (with a clunky modification every time i start komsi) and it updates with omsi nicely,

    You can see how i did the delay display to mimic the real IBIS in the bus... with the + or - symbol on the upper line above the actual delay time.


    However my Arduino code uses Strings, which are very bad and the reason for Arduino's locking up and needing resetting, the reason is that Strings cause heap memory fragmentation, and on an Arduino uno with only 2Kb of memory, that is a very bad thing, but i have ideas how to make the code much more efficient and never fragment the memory, so it should run forever once started, and i will of course share my Arduino code when i have it working properly, as well as all other info on my bus cab build, including the new PCB file i will make for an Arduino mega to run the dashboard lights and gauges.


    Anyway, back to the IBIS display....

    To get this to work i had to make a change to one of the 'stringvarlists' in the Komsi .OPL file, simply by changing 'IBIS_busstop_name' to 'IBIS' it changes the data Komsi reads from omsi, from the bus stop name to the full IBIS screen data, with an '@' symbol to indicate where the upper and lower lines are.

    This does screw up the ticket printers data if you are using it as an IBIS with Lars's Arduino code, and also the 'interior display' output (which doesn't work anyway)


    Unfortunately a big problem i have:

    The IBIS output in komsi has no terminating or null character to indicate the end of a packet of data (that i can detect), the ticket printers output uses ';' but that output is only updated once a second (despite there being an option to change it in komsi, it always updates at 1000 milliseconds :( and that's too slow for things like 'falsche route' to flash on the IBIS LCD in time with the omsi one.


    So every time i start the Komsi client with omsi, i have to do a clunky work around involving the Task manager to 'full screen' the komsi client, that shows a text box for the non working bus temperature, it has the text 'noch nicht mit leben gefüllt' in it, so i change that to ';' and minimise the Komsi client, then it will work... untill the next time i start omsi and Komsi ||



    I'd really love to be able to get an update to komsi,


    First to have a terminating character implemented on the IBIS output.


    Then to have an option to select either the traditional ibis output type that is used for the mas1 type ibis with 16 x 2 character lcd's (where it changes the text to fit the smaller screen), or the full IBIS screen text using the stringvatlist 'IBIS' plus the delay time (as that isnt sent with the 'IBIS' string, but that would be great for those of us who use a mas3 type IBIS

    Hmm. maybe even to have a whole new data output, and com port just for the mas3 type ibis data?


    The 'noch nicht mit leben gefüllt' text replaced with the actual bus interior temperature, stringvarlist 'cockpit_temperatur'

    I am going to modify an LCD thermometer to change temperature on command from an arduino so would love to be able to read the interior temperature with Komsi.


    And the Interior display output to be made active, with an option to use stringvarlist 'IBIS_cabindisplay' which is the text output of what is shown on the bus interior displays.


    I'd then really love one more output from komsi, the lights for the Dreiha style heating controller found in the MAN NG 272.


    Unfortunately i seem unable to contact Lars to ask if these changes could be made, and i think he is very busy, but having Komsi updated a little would make a lot of difference to people who want to replicate a bus cab with all the features working.

  • I've seen videos of people using interior displays with omsi, do they have a newer version of Komsi? maybe 2.4 version of the komsi client?

    or are they using something totally different to operate their dashboard, ibis, ticket printer and interior display,


    I am hopefully buying an interior display, so i wish to be able to use it with komsi if i can.

  • I've seen videos of people using interior displays with omsi, do they have a newer version of Komsi? maybe 2.4 version of the komsi client?

    or are they using something totally different to operate their dashboard, ibis, ticket printer and interior display (...)


    Hello,


    I don't know if it would be useful, but for the interior display I've seen this plugin here on the Webdisk.

    Maybe this is what were you searching for...


    Have a nice day.

    .........................................................

    .........................................................

  • Good evening gazz292 ,


    I am currently working on some kind of IBIS that would be enough for me to show (as you did) the current stop, advance / delay etc ... In practice, what is contained in the IBIS string you wrote about.

    My question is: how is it possible to always show that string variable on the display without having to enter codes or anything else using the buttons? Basically, how did you manage to write the Arduino code to get the result you shared on January 1st?


    Thank you and good evening again! :hi:

    .........................................................

    .........................................................

  • I'm still working on my ibis project:



    I want to get it all completed then release everything at once, so people can make a complete replica of the ibis unit.


    i'm working on the 3D print files now to make the replica... mostly working on a way to hold the buttons without needing a large PCB,

    The buttons will still need soldering... but just point to point to make up the matrix (i.e. a wire from one buttons legs to the next button leg, to the next in a pattern to make up a matrix)



    All that's happening in the photo above ad my previous ones is komsi is sending the string variables out, the arduino is reading them and splitting them up and sending them to the LCD's.


    However, my way of getting the stringvariables i need out of komsi involves a few bodges, the need to edit the .opl file a bit... and re-edit it every time you alter things with the opl creator (this is where i really wish i could get Lars's help with a little re-write of komsi, but i know that isnt going to happen, hence the need for bodging the opl file)


    but then you get what ever is shown on the ingame ibis display on the real/replica one,

    stuff like 'falsche route' dosent display on the arduino sketch Lars released with his komsi program,

    And of course i wanted the delay time display part to match as close as possible the real IBIS display,

    that's just a bit of token manipulating to split the + or - symbols and display them on the top line, and the minutes and seconds below that at the end of the lcd.


    But i also had to work around the komsi ibis output not having a terminator character, the ticket printer one does and that's the one Lars concentrated on with his ibis'ticket printer arduino sketch that's included with komsi.

    But the ticket printer output in komsi only refreshes every 1 second no matter what you set it to.


    so i had to use a time based terminating method, then i had to fight non German computers not sending umlauts via komsi, so yet more code was needed, and... well it's all pretty complicated atm,


    i need to finish off writing all the adruino code for the display part, then there's the input part for the buttons, that will use a STM32F board running FreeJoy, if i was better at programming i could run both the display and freejoy on the one STM board.



    But it will need a good set of instructions for other people to be able to use even the LCD part, and i haven't written them yet.

  • Finally got it working properly!



    In my case with a 20 col. x 4 rows lcd display.

    I leave the code, maybe can be helpful for someone.



    Here how the stringvarlist of k-omsi should be:


    Code: KOMSI (.opl)
    [stringvarlist]
    6
    avm_1-2 (--> your stringvariable for first two rows of display)
    act_route  (any variable, not used)
    act_route  (IDEM)
    act_route  (IDEM)
    act_route  (IDEM)
    avm_3-4 (--> your stringvariable for last two rows of display)

    .........................................................

    .........................................................

  • That's probably quite difficult because those are basically unobtainium at this point. Since this project involves Arduino programming - why not use that? TinyUSB should support Serial and HID over USB at the same time. But that limits the selection of boards a bit, since only boards that are HID-capable can be used, e.g. RP2040-based boards, Teensy 3.0 and up, Arduino Leonardo...