Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. English
  3. Visualization
  4. How to create a variable Object Id in Vis 2?

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.1k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.2k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.4k

How to create a variable Object Id in Vis 2?

Scheduled Pinned Locked Moved Visualization
11 Posts 3 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Jack 3J Jack 3

    Hello,

    I am trying to link an object ID to the value of another object. I have many objects which are named the same except for one number, which I would like to be able to change from the Vis_2 platfrom so I can change which one I am monitoring from the runtime window. I have included the object ID below.

    modbus.0.holdingRegisters.1.40001_Output_voltage

    The 0 between "modbus" and "holding" I would like to be able to change like a variable with the value of another object which is named as follows.

    0_userdata.0.variable

    I am trying to do this in a widget from the basic library called "Number". I have also attached a picture of the widget and attributes. Please let me know if you need any more information. Thanks in advance.

    6b53c4e7-bff7-4592-8e3f-7381700028da-image.png

    HomoranH Offline
    HomoranH Offline
    Homoran
    Global Moderator Administrators
    wrote on last edited by
    #2

    @jack-3 I don't know whether I did understand exactly what you are intended to do.

    I don't see what you want to achieve by linking two oid's.
    So I cannot tell whether this is possible at all.

    The field you filled to append is usually used for the unit

    kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

    Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

    der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

    Jack 3J 1 Reply Last reply
    0
    • HomoranH Homoran

      @jack-3 I don't know whether I did understand exactly what you are intended to do.

      I don't see what you want to achieve by linking two oid's.
      So I cannot tell whether this is possible at all.

      The field you filled to append is usually used for the unit

      Jack 3J Offline
      Jack 3J Offline
      Jack 3
      wrote on last edited by
      #3

      @homoran The appending thing i didnt mean to be in there, that is a mistake on my part. What I would like is that the object ID for the number widget changes with a value that I enter into an input widget. So when I input 0, the obejct Id for this number widget will be modbus.0.holdingRegisters.1.40001_Output_voltage, when I input 1 it will be modbus.1.holdingRegisters.1.40001_Output_voltage etc.

      HomoranH 1 Reply Last reply
      0
      • Jack 3J Jack 3

        @homoran The appending thing i didnt mean to be in there, that is a mistake on my part. What I would like is that the object ID for the number widget changes with a value that I enter into an input widget. So when I input 0, the obejct Id for this number widget will be modbus.0.holdingRegisters.1.40001_Output_voltage, when I input 1 it will be modbus.1.holdingRegisters.1.40001_Output_voltage etc.

        HomoranH Offline
        HomoranH Offline
        Homoran
        Global Moderator Administrators
        wrote on last edited by
        #4

        @jack-3 sagte in How to create a variable Object Id in Vis 2?:

        What I would like

        ok! Now I understand!
        But again: I really dont 'know whether this is possible. (at least this way)

        Let's try to see it from another angle
        Your primary aim is to get different numbers in the same widget, right?

        kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

        Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

        der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

        Jack 3J 1 Reply Last reply
        0
        • HomoranH Homoran

          @jack-3 sagte in How to create a variable Object Id in Vis 2?:

          What I would like

          ok! Now I understand!
          But again: I really dont 'know whether this is possible. (at least this way)

          Let's try to see it from another angle
          Your primary aim is to get different numbers in the same widget, right?

          Jack 3J Offline
          Jack 3J Offline
          Jack 3
          wrote on last edited by
          #5

          @homoran Im not sure what is meant by that, my primary aim is to be able to display values from different objects with the same widget, and also to be able to change which object it is myelf from the runtime window. I understand this is a very odd request and it very well may not be possible.

          OliverIOO HomoranH 2 Replies Last reply
          0
          • Jack 3J Jack 3

            @homoran Im not sure what is meant by that, my primary aim is to be able to display values from different objects with the same widget, and also to be able to change which object it is myelf from the runtime window. I understand this is a very odd request and it very well may not be possible.

            OliverIOO Offline
            OliverIOO Offline
            OliverIO
            wrote on last edited by
            #6

            @jack-3

            in vis1 this was not possible (i called this dynamic id)
            I'm pretty sure that this was not implemented in vis-2 either

            1. you can create an issue on github for a feature request

            To achieve your goal, you can place several widgets on top of each other and switch the visibility on and off depending on the condition
            (at least with only a few object IDs)

            For more complex rules and more IDs, I would create with blockly/javascript/node-red to display the corresponding value using exactly one data point in a widget

            Meine Adapter und Widgets
            TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
            Links im Profil

            Jack 3J 1 Reply Last reply
            1
            • Jack 3J Jack 3

              @homoran Im not sure what is meant by that, my primary aim is to be able to display values from different objects with the same widget, and also to be able to change which object it is myelf from the runtime window. I understand this is a very odd request and it very well may not be possible.

              HomoranH Offline
              HomoranH Offline
              Homoran
              Global Moderator Administrators
              wrote on last edited by Homoran
              #7

              @jack-3 sagte in How to create a variable Object Id in Vis 2?:

              my primary aim is to be able to display values from different objects with the same widget,

              That is what I tried to say :grin:
              ok!

              @jack-3 sagte in How to create a variable Object Id in Vis 2?:

              also to be able to change which object it is myelf from the runtime

              yes, that would have been my next question to clarify.

              @jack-3 sagte in How to create a variable Object Id in Vis 2?:

              I understand this is a very odd request

              no it isn't!

              @jack-3 sagte in How to create a variable Object Id in Vis 2?:

              it very well may not be possible.

              I think it will be possible, but not by this way

              EDIT
              @OLIVERIO figured out some possible ways to do

              kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

              Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

              der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

              Jack 3J 1 Reply Last reply
              0
              • OliverIOO OliverIO

                @jack-3

                in vis1 this was not possible (i called this dynamic id)
                I'm pretty sure that this was not implemented in vis-2 either

                1. you can create an issue on github for a feature request

                To achieve your goal, you can place several widgets on top of each other and switch the visibility on and off depending on the condition
                (at least with only a few object IDs)

                For more complex rules and more IDs, I would create with blockly/javascript/node-red to display the corresponding value using exactly one data point in a widget

                Jack 3J Offline
                Jack 3J Offline
                Jack 3
                wrote on last edited by
                #8

                @oliverio Ok, thank you for the help. About making an issue on GitHub, I'm fairly new to GitHub overall. Where would I go to do this and how would I phrase this request?Thanks.

                OliverIOO 1 Reply Last reply
                0
                • HomoranH Homoran

                  @jack-3 sagte in How to create a variable Object Id in Vis 2?:

                  my primary aim is to be able to display values from different objects with the same widget,

                  That is what I tried to say :grin:
                  ok!

                  @jack-3 sagte in How to create a variable Object Id in Vis 2?:

                  also to be able to change which object it is myelf from the runtime

                  yes, that would have been my next question to clarify.

                  @jack-3 sagte in How to create a variable Object Id in Vis 2?:

                  I understand this is a very odd request

                  no it isn't!

                  @jack-3 sagte in How to create a variable Object Id in Vis 2?:

                  it very well may not be possible.

                  I think it will be possible, but not by this way

                  EDIT
                  @OLIVERIO figured out some possible ways to do

                  Jack 3J Offline
                  Jack 3J Offline
                  Jack 3
                  wrote on last edited by
                  #9

                  @homoran How would you do it in the other way that you mention? Thank you for helping me with this.

                  HomoranH 1 Reply Last reply
                  0
                  • Jack 3J Jack 3

                    @oliverio Ok, thank you for the help. About making an issue on GitHub, I'm fairly new to GitHub overall. Where would I go to do this and how would I phrase this request?Thanks.

                    OliverIOO Offline
                    OliverIOO Offline
                    OliverIO
                    wrote on last edited by OliverIO
                    #10

                    @jack-3 sagte in How to create a variable Object Id in Vis 2?:

                    Where would I go to do this and how would I phrase this request?Thanks

                    this is the place there all the source code live
                    https://github.com/ioBroker/ioBroker.vis-2

                    on this page you can see all open (and closed) issues
                    you can create a new issue via the green button on top right

                    the form "Feature request" will guide you.

                    Describe it as if you were explaining it to a 12-year-old. (no the developer is not only 12 ;) )
                    but as clearly and precisely as possible.
                    perhaps with an example, your specific use case
                    and what you expect to see at the end.

                    Meine Adapter und Widgets
                    TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                    Links im Profil

                    1 Reply Last reply
                    0
                    • Jack 3J Jack 3

                      @homoran How would you do it in the other way that you mention? Thank you for helping me with this.

                      HomoranH Offline
                      HomoranH Offline
                      Homoran
                      Global Moderator Administrators
                      wrote on last edited by
                      #11

                      @jack-3 sagte in How to create a variable Object Id in Vis 2?:

                      How would you do it in the other way that you mention?

                      I also would use a kind of logic.
                      Using the input widget, connected to an state where your input is stored.
                      Triggering on that state on change, read this value and write the value of the according state to another state, that is displayed in the number widget.

                      Sorry for such a long phrase. I hope it won't confuse too much.

                      kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

                      Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

                      der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      435

                      Online

                      32.5k

                      Users

                      81.7k

                      Topics

                      1.3m

                      Posts
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Home
                      • Recent
                      • Tags
                      • Unread 0
                      • Categories
                      • Unreplied
                      • Popular
                      • GitHub
                      • Docu
                      • Hilfe