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

Field Label SensorID and spaghetti

Scheduled Pinned Locked Moved General Discussion
19 Posts 2 Posters 1.2k 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 JeeLet 30 Mar 2022, 11:42

    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

    J 1 Reply Last reply 30 Mar 2022, 12:09 Reply Quote 0
    • J Offline
      jkandasa @JeeLet
      last edited by 30 Mar 2022, 12:09

      @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 4 Jul 2022, 19:35 7 Apr 2022, 14:00

        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 J 2 Replies Last reply 7 Apr 2022, 16:34 Reply Quote 0
        • J Offline
          JeeLet @JeeLet
          last edited by 7 Apr 2022, 16:34

          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?

          J 1 Reply Last reply 8 Apr 2022, 01:48 Reply Quote 0
          • J Offline
            jkandasa @JeeLet
            last edited by 8 Apr 2022, 01:42

            @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
            • J Offline
              jkandasa @JeeLet
              last edited by jkandasa 4 Aug 2022, 07:18 8 Apr 2022, 01:48

              @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 4 Oct 2022, 20:39 10 Apr 2022, 15:05

                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

                J 1 Reply Last reply 10 Apr 2022, 15:39 Reply Quote 0
                • J Offline
                  jkandasa @JeeLet
                  last edited by 10 Apr 2022, 15:39

                  @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 4 Oct 2022, 21:40 10 Apr 2022, 16:05

                    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

                    J 1 Reply Last reply 11 Apr 2022, 01:53 Reply Quote 0
                    • J Offline
                      jkandasa @JeeLet
                      last edited by 11 Apr 2022, 01:53

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

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

                      0

                      Online

                      628

                      Users

                      532

                      Topics

                      3.4k

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