• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    Field Label SensorID and spaghetti

    scheduled pinned locked moved General Discussion
    19 posts 2 posters 1.7k views 1 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • jkandasaJ offline
      jkandasa @JeeLet
      global:last-edited-by,

      @jeelet said in Field Label SensorID and spaghetti:

      I can't figure out how

      edit the field details and add new label name: My Relay

      Example:
      30afa773-8023-421d-b182-74f081a18af0-image.png

      0dffb5e5-d887-4102-b890-a1f37d1dbdb3-image.png

      one-reply-to-this-post last-reply-time reply quote 0
      • J offline
        JeeLet
        global:last-edited-by,

        Hello

        Sorry but "Update Resource" is not found 😞

        texte du lien

        houlala

        quote 🙂
        Patience and length of time
        Is more than strength or rage."

        jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
        • jkandasaJ offline
          jkandasa @JeeLet
          global:last-edited-by, jkandasa

          @jeelet

          Sorry but "Update Resource" is not found 😞

          I took the screenshot from different widget
          Please update Name Key as labels.name


          If you like to use custom name, you should include a label ignore_name: true
          aff5d907-328b-451a-aab0-90a80e33e5be-image.png

          one-reply-to-this-post last-reply-time reply quote 0
          • J offline
            JeeLet
            global:last-edited-by,

            🙂 YAML View is good

            • Edit Widget Settings
             resource:
                filters:
                  metricType: binary
                  name: relay
                limit: 10
                nameKey: labels.name
                type: field
              tableView: true
              type: switch_button
            
            • Field Details
            ..  
            odeId: '32'
            sourceId: '3'
            fieldId: V_STATUS
            name: relay
            metricType: binary
            ...
            labels:
              ignore_name: 'true'
              ms_node_id: '32'
              ms_sensor_id: '3'
              ms_type: '2'
              ms_type_string: V_STATUS
              name: relay
              ...
            

            beautiful , working cella

            I'll put the explanation in writing

            Thanks a lot jkandasa

            one-reply-to-this-post last-reply-time reply quote 0
            • J offline
              JeeLet
              global:last-edited-by, JeeLet

              the updated tutorial sheet

              • an example for the relay is put in picture,
                but it's the same for the door sensor.
                so in red and pink the elements to add.
                in green it's the MySensors sketch that puts them together by itself

              • the important part so that the name is not changed

              " jkandasa@ you like to use custom name, you should include a label "

              ignore_name: true
              

              well the continuation 😉

              texte du lien

              jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
              • jkandasaJ offline
                jkandasa @JeeLet
                global:last-edited-by,

                @jeelet No need to update both name and labels.name, you can use either.

                • if you use name, you should add labels.ignore_name: 'true'
                • otherwise you can use the labels.name directly
                one-reply-to-this-post last-reply-time reply quote 0
                • J offline
                  JeeLet
                  global:last-edited-by, JeeLet

                  In the Widgets the options arrive at a speed too fast for my little brain, I can follow, but it's superhuman 🙂

                  Here is a picture of the new options: texte du lien

                  two questions:
                  what value to write in the

                  • Timestamp Key (what is it?)
                    and the
                  • Payload

                  in the SendPayload
                  the name "true" can be changed ?

                  • it's how to have a state, a return of state of a button which changes of color.
                    Red : default
                    Orange : On
                    Blue : Off

                  is there someone who can help you with the Documentation ?
                  how to set up MyController !

                  Nice work

                  (for information, next week I will be absent)

                  J jkandasaJ topic:replies-to-this-post, 2 last-reply-time reply quote 0
                  • J offline
                    JeeLet @JeeLet
                    global:last-edited-by,

                    my last words may be confusing

                    the picture idea texte du lien

                    a button that takes several color states
                    (an idea of how difficult it is, it's up to you, and there are surely more important things to do)

                    yes as you are in Widgets it is the right time to do it?

                    jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                    • jkandasaJ offline
                      jkandasa @JeeLet
                      global:last-edited-by,

                      @jeelet

                      Timestamp Key (what is it?)

                      Timestamp Key used to display Last Seen in the panel.

                      Example:
                      3982c926-4b20-419c-addb-6180237ef1c4-image.png

                      • in field, it can be current.timstamp
                      • in node, it can be lastSeen

                      in the SendPayload
                      the name "true" can be changed ?

                      Yes, you can send anything you want and your node should support for that value
                      for buttons use Toggle Switch or Button Switch, gives better intraction

                      it's how to have a state, a return of state of a button which changes of color.
                      Red : default
                      Orange : On
                      Blue : Off

                      You can not change the button color in off state. it is applicable only for on state and for now it is linked with UI framework, so supports only four types
                      09593d08-1d13-4b41-a6e6-70a79ebcea05-image.png

                      is there someone who can help you with the Documentation ?

                      for now I do not see much contribution from the world. I believe we will get it soon.

                      (for information, next week I will be absent)

                      enjoy your time 🙂

                      one-reply-to-this-post last-reply-time reply quote 0
                      • jkandasaJ offline
                        jkandasa @JeeLet
                        global:last-edited-by, jkandasa

                        @jeelet

                        my last words may be confusing

                        the picture idea texte du lien

                        a button that takes several color states
                        (an idea of how difficult it is, it's up to you, and there are surely more important things to do)

                        yes as you are in Widgets it is the right time to do it?

                        In MyController, MySensors plugin supports acknowledgement, hence state can not change if there is no acknowledgement received.
                        f21b7576-7c12-438d-97e5-5068e073fa9d-image.png

                        In MyController, you can set retry count to reattempt to send the payload again.
                        Example:
                        9d70d30e-2f04-44e5-a902-09204020a369-image.png

                        one-reply-to-this-post last-reply-time reply quote 0
                        • J offline
                          JeeLet
                          global:last-edited-by, JeeLet

                          hello jkandasa

                          The Relay Controls with MyC work well.
                          switch ON/OFF button perfect 🙂

                          I have added to my sketch the function to turn off the relays when the arduino is restarted.
                          "digitalWrite(PIN_RELAY_1, RELAY_OFF);"

                          and add also

                          "send(msg.set(CHILD_ID_RELAY_1==HIGH ? 1 : 0), true);"
                          to return the information to MyController

                          But in my widget the status remains ON, while the Relay is OFF

                          it's an error in my sketch and I have misconfigured my widget ?

                          Thanks

                          jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                          • jkandasaJ offline
                            jkandasa @JeeLet
                            global:last-edited-by,

                            @jeelet in your sketch add wait(300); after send(...)
                            and seems some error in your msg.set command,

                            I do not know your sketch, This may not be right solution, hope it should work
                            send(msg.set(digitalRead(PIN_RELAY_1)==HIGH ? 1 : 0));,

                            one-reply-to-this-post last-reply-time reply quote 0
                            • J offline
                              JeeLet
                              global:last-edited-by, JeeLet

                              yes yes I saw my mistake after posting 😞

                              Setup ()
                              send(msg.set(CHILD_ID_RELAY_1?false:true), true);
                              or
                              send(msg.set(digitalRead(PIN_RELAY_1)==HIGH ? 1 : 0));

                              the 2 possibilities work

                              at reboot of the Arduino it is functional .
                              the status of my relay changes well 🙂
                              thanks
                              sorry for the inconvenience

                              jkandasaJ one-reply-to-this-post last-reply-time reply quote 0
                              • jkandasaJ offline
                                jkandasa @JeeLet
                                global:last-edited-by,

                                @jeelet no problem, good to know that it works for you

                                one-reply-to-this-post last-reply-time reply quote 0
                                • first-post
                                  last-post

                                0

                                online

                                644

                                users

                                532

                                topics

                                3.4k

                                posts
                                Copyright © 2015-2025 MyController.org | Contributors | Localization