GUI-O Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Visual component with id (im2) already exists

    Scheduled Pinned Locked Moved
    Comments & Feedback
    2
    5
    277
    Loading More Posts
    • 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.
    • S
      Sato
      last edited by

      Hi kl3m3n,

      I have 4 small graphs on https://i.imgur.com/XXxxXX.png, that alternate depending on the signal strength in the modem. I want to update it in periods of every 60 seconds.
      The problem is that after 60 seconds, the next time I load the same graphic, the error message appears in the Gui-O,
      Visual component with id (im8) already exists,
      because it has already been loaded once. Is there any way to solve it?

      Best regards

      S K 2 Replies Last reply Reply Quote 0
      • S
        Sato @Sato
        last edited by

        Hi kl3m3n,

        Perhaps one way to solve this would be if it were possible to assign a variable to IM UID:var

        Best regards

        1 Reply Last reply Reply Quote 0
        • K
          kl3m3n @Sato
          last edited by kl3m3n

          @sato you are probably creating another |IM component with UID:im8 (which already exists). Try updating the IP parameter of im8 to change the image:

          @im8 IP:"<image>"\r\n

          BR,
          kl3m3n

          S 1 Reply Last reply Reply Quote 0
          • S
            Sato @kl3m3n
            last edited by

            Hi @kl3m3n

            Thanks for the Tip, but it not update the graphic.
            What make i wrong?

            loop()

               unsigned long currentTime = millis();
              if (currentTime - previousTime >= eventInterval) {   // every 20 seconds
                  previousTime = currentTime;    
                  s_quality = modem.getSignalQuality();
                 
                 if (oneTime == 0) {   // it load the graphic
            

            mqttClient.publish(&In[0], "|IM UID:im8 X:10 Y:45 W:12 H:12 OPA:1 SCI:0 SCM:2 VIS:1 IP:"https://i.imgur.com/GGxxxxx.png"\r\n");
            oneTime = 1; // load the graphic only one time and it works
            }

                if (s_quality >= 24) {
                 mqttClient.publish(&In[0], "@im8 VIS:1 SCI:0 IP:\"https://i.imgur.com/8dxxxxx.png\"\r\n");  // but don't update! The graphic exists
                 Serial.println("Signal Top +");                                                       
                }
                else if ((s_quality >=20) && (s_quality <= 23)) {   
            

            mqttClient.publish(&In[0], "@im8 VIS:1 SCI:0 IP:"https://i.imgur.com/2dxx3xx.png"\r\n"); // but don't update! The graphic exists
            Serial.println("Signal Good");
            }
            else if ((s_quality >=16) && (s_quality <= 19)) {
            mqttClient.publish(&In[0], "@im8 VIS:1 SCI:0 IP:"https://i.imgur.com/TJxxxxx.png"\r\n"); // but don't update! The graphic exists
            Serial.println("poor signal");
            }
            }

            Best regards

            S 1 Reply Last reply Reply Quote 0
            • S
              Sato @Sato
              last edited by Sato

              Hi Kl3m3n,

              This works, only the IP without the SCI and VIS

              mqttClient.publish(&In[0], "@im8 IP:"https://i.imgur.com/vFexxxx.png"\r\n");

              Solved
              Thanks

              1 Reply Last reply Reply Quote 0
              • First post
                Last post