• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    Field Label SensorID and spaghetti

    Scheduled Pinned Locked Moved General Discussion
    19 Posts 2 Posters 932 Views 1 Watching
    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.
    • J Offline
      JeeLet
      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 1 Reply Last reply Reply Quote 0
      • jkandasaJ Offline
        jkandasa @JeeLet
        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

        1 Reply Last reply Reply Quote 0
        • J Offline
          JeeLet
          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

          1 Reply Last reply Reply Quote 0
          • J Offline
            JeeLet
            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 1 Reply Last reply Reply Quote 0
            • jkandasaJ Offline
              jkandasa @JeeLet
              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
              1 Reply Last reply Reply Quote 0
              • J Offline
                JeeLet
                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 2 Replies Last reply Reply Quote 0
                • J Offline
                  JeeLet @JeeLet
                  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 1 Reply Last reply Reply Quote 0
                  • jkandasaJ Offline
                    jkandasa @JeeLet
                    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 🙂

                    1 Reply Last reply Reply Quote 0
                    • jkandasaJ Offline
                      jkandasa @JeeLet
                      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

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        JeeLet
                        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 1 Reply Last reply Reply Quote 0
                        • jkandasaJ Offline
                          jkandasa @JeeLet
                          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));,

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            JeeLet
                            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 1 Reply Last reply Reply Quote 0
                            • jkandasaJ Offline
                              jkandasa @JeeLet
                              last edited by

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

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

                              0

                              Online

                              598

                              Users

                              530

                              Topics

                              3.4k

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