Buttons with changing functionality?

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • J V
    LoxBus Spammer
    • 28.08.2015
    • 367

    #1

    Buttons with changing functionality?

    Hello,

    For one room, I would like to control both music playback and movie playback. My idea was the following:
    - radio button that selects what is playing (music: switches on SB, amplifier and set input / movie: lowers projection screen, switches on pc, amplifier and set input)
    The radio button also sets variables in Loxone Config to store which mode is active (currently, 1 boolean variable per mode).
    Then, I would add a virtual input with a button (e.g. left/right) which has a functionality that changes based on the variable: either send things to the SB, or send things to the pc.

    In the interface, the radio button will show what is currently the mode. Is there a short way to achieve this?

    I'm currently thinking that I need quite a big construction, connecting the virtual input and the variables to an AND port just to make it give the correct output. It seems quite lengthy, for one button I would have as much AND ports as I have modes. So it made me wonder if there is a better way...(perhaps using something else than 1 variable per mode)?

    Jörg
  • Gast

    #2
    That certainly sounds doable even if, as you say, lengthy. I have no other suggestion with the exception of maybe doing some of that logic in a TinyC script instead of using blocks.

    Maybe someone else will chime in a better solution though.

    Kommentar

    • Gast

      #3
      I meant PicoC there, not TinyC. Whatever C Lox config supports...

      Kommentar

      • Christian Fenzl
        Lebende Foren Legende
        • 31.08.2015
        • 11234

        #4
        Wouldn't help the media control block in that situation?
        Even if you do not visualise it, you may switch modes by input, and can assign different virtual outputs to each mode.
        Hilfe für die Menschen der Ukraine: https://www.loxforum.com/forum/proje...Cr-die-ukraine

        Kommentar

        • J V
          LoxBus Spammer
          • 28.08.2015
          • 367

          #5
          @pmatos: thanks! I try to avoid PicoC still... I believe the number of running script is limited, so I do not want to use it for things that can be done using standard blocks...

          @Christian:
          Nice idea!
          And I even have a media control block for the devices (I just wanted a few basic controls in the interface). However, the possible inputs to the media control block are program +/-, volume +/-. So if it would be for those it would work... But if is just for 4 different buttons.... Then again... like you said, I could make a hidden media control block specifically for this purpose, and use those 4 inputs... :-) A bit of a hack, but possibly more elegant than the huge number of and ports...The analog output of the radiobutton can actually be used as input AIm to set the mode for the media control block...

          I still need to decide what I do if a mode changes: do I switch off the current one or not... but that is a design decision for me to make... Easiest would be to switch it off... :-)

          Thanks!

          Kommentar

          • duncan
            LoxBus Spammer
            • 28.08.2015
            • 313

            #6
            another possibility is to replace the room button with a smart knx switch such as the mdt glass button II smart, and use the loxone knx bus - this button fits a single uk or euro socket, and has 6 buttons with multiple levels of actions plus text, icons and led indicators - so you can configure a single wall switch to be lights, heating, music and movie control all using knx inputs, which behave like multiple virtual inputs using a single pair of conductors.
            The MDT Glass Push-button II Smart releases KNX telegrams after touching the sensor areas on top, 1 or 2 Button operation can be adjusted.

            Kommentar

            • J V
              LoxBus Spammer
              • 28.08.2015
              • 367

              #7
              @duncan: thanks... I have Gira Pushbuttons, and at this stage they are programmed using ETS and just operate the lights and thermostat. I bought the Loxone to send a clock signal to the KNX bus, as it was cheaper than a KNX clock component that just does this, and in addition I am using it as a user interface on tablet and phone. I'm slowly expanding it, in the following way:
              1. loxone for control of lights (done)
              2. loxone for control of temperature (done for manually choosing the mode, still think of adding some automation to it)
              3. loxone for audio control - Squeezebox (done in theory, just have to make it look nice in the Loxone interface)
              4. loxone for media control - Kodi/Eventghost (done in theory, just have to make it look nice in the Loxone interface).
              The question regarding the buttons was regarding virtual input buttons in the Loxone interface, to finalize steps 3 and 4. I will have the media controller block for more detailed control of devices, but will also have some "shortcuts" that are accessible without having to open the media controller block. No wall switches involved at this time, but my next steps would bring some changes to the wall switches
              5. use wall switches for basic media control (I know how to do it, but have not started work on it yet)
              6. display more info on the Gira display (not sure how to do it yet, not even sure if there is a point as the displays are not that readable when the backlight is off :-))
              I'm currently finalizing steps 3 and 4, and will be very glad when that works. For steps 5 and 6, I will need help of a friend who teaches KNX, so that will take me a bit longer. The fact that I may be moving abroad for some time soon also makes this more of a long term planning. But I want to finish steps 3 and 4 in the next few days/weeks.

              Jörg
              Zuletzt geändert von J V; 29.07.2016, 11:15.

              Kommentar

              • J V
                LoxBus Spammer
                • 28.08.2015
                • 367

                #8
                Zitat von Christian Fenzl
                Wouldn't help the media control block in that situation?
                Even if you do not visualise it, you may switch modes by input, and can assign different virtual outputs to each mode.
                Just to comment: this works. There are in total 6 inputs (on/off, program +/-, volume +/-) that can be "re-purposed". However, I tried it and it does not seem so user friendly; for the left/right buttons it is ok, but more starts feeling crowded (even on a 10" ipad) and the layout is not so convenient. I thought it would be nice to have, but it is actually easier to just have a link to a mediacontroller block.

                Not sure how other people put all the controls in one page, but just to share how I currently will do it :
                Audio
                - now playing field
                - radio button for selector (audio/video)
                - Media controller block 1
                Lights
                - ...
                Temperature
                - ...
                Technology
                - some detailed statuses of devices (e.g. amplifier input signal info, power status of some devices, ...)
                - some radio buttons to set things (e.g. amplifier input selector; squeezebox repeat mode, squeezebox shuffle mode, ...)
                - media controller block 2

                MediaController block 1 is optimized for normal use, meaning that one mode combines controls for multiple devices (e.g. squeezebox + amplifier volume)
                MediaController block 2 has one mode per device, which gives access to full detailed controls and really replaces the original remotes.

                Kommentar

                Lädt...