🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    ACSSR and Atom Matrix in UIFlow over I2C

    PRODUCTS
    2
    18
    6.0k
    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.
    • ajb2k3A
      ajb2k3
      last edited by ajb2k3

      @m5stack @IAMLIUBO I'm trying to set the ACSSR up to work via MQTT via an ATOM Matrix in UIFlow over I2C (AtomS3 not yet supported???)
      I cant get the matrix to read the ACSSR, just returns an error because it cant find the ACSSR?

      UIFlow, so easy an adult can learn it!
      If I don't know it, be patient!
      I've ether not learned it or am too drunk to remember it!
      Author of the WIP UIFlow Handbook!
      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @ajb2k3

        • UIFlow or Arduino?
        • Modbus or I2C?

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        ajb2k3A 1 Reply Last reply Reply Quote 0
        • ajb2k3A
          ajb2k3 @felmue
          last edited by

          @felmue Bah ha ha, after say that to others I should have noticed!

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          1 Reply Last reply Reply Quote 0
          • felmueF
            felmue
            last edited by felmue

            Hello @ajb2k3

            I understand your issue is with controlling the ACSSR via I2C (and not so much the MQTT part), correct?

            Make sure the ACSSR is in I2C mode (LED blinks RED when powered). If the LED blinks in a different color you need to switch the ACSSR mode first. See Usage/Communication protocol here.

            Below UIFlow blocks work for me to toggle the ACSSR state and RGB LED when the M5Atom button is pressed. (I used UIFlow v1.12.8)

            0_1701771437582_UI_ACSSR_ButToggle_20231205.png

            Thanks
            Felix

            GPIO translation table M5Stack / M5Core2
            Information about various M5Stack products.
            Code examples

            ajb2k3A 1 Reply Last reply Reply Quote 0
            • felmueF
              felmue
              last edited by

              Hello @ajb2k3

              and here are the blocks to control the ACSSR via MQTT by sending on or off to topic myACSSR.

              0_1701772097774_UIFlow_ACSSR_MQTT_20231205.png

              Thanks
              Felix

              GPIO translation table M5Stack / M5Core2
              Information about various M5Stack products.
              Code examples

              1 Reply Last reply Reply Quote 0
              • ajb2k3A
                ajb2k3 @felmue
                last edited by

                @felmue these are the ones we used before but we have dedicated blocks now but they are not working. I have reached out to M5Stack to look into it

                UIFlow, so easy an adult can learn it!
                If I don't know it, be patient!
                I've ether not learned it or am too drunk to remember it!
                Author of the WIP UIFlow Handbook!
                M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                1 Reply Last reply Reply Quote 0
                • felmueF
                  felmue
                  last edited by

                  Hello @ajb2k3

                  as far as I can tell in UIFlow1 the blocks I used for ACSSR and MQTT are dedicated blocks. What am I missing?

                  Care to elaborate? Which dedicated blocks do you mean?

                  Just curious.

                  Thanks
                  Felix

                  GPIO translation table M5Stack / M5Core2
                  Information about various M5Stack products.
                  Code examples

                  ajb2k3A 1 Reply Last reply Reply Quote 0
                  • ajb2k3A
                    ajb2k3 @felmue
                    last edited by

                    @felmue sorry miss read the blocks. Il try again later thanks.

                    UIFlow, so easy an adult can learn it!
                    If I don't know it, be patient!
                    I've ether not learned it or am too drunk to remember it!
                    Author of the WIP UIFlow Handbook!
                    M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                    1 Reply Last reply Reply Quote 0
                    • felmueF
                      felmue
                      last edited by

                      Hello @ajb2k3

                      ok, thank you for explaining.

                      Just thought about this: make sure your ACSSR still uses the default I2C address, e.g. 0x50. (just in case you've changed it in the past.)

                      Thanks
                      Felix

                      GPIO translation table M5Stack / M5Core2
                      Information about various M5Stack products.
                      Code examples

                      1 Reply Last reply Reply Quote 0
                      • felmueF
                        felmue
                        last edited by

                        Hello @ajb2k3

                        just for fun. Below the UIFlow2 alpha-28 blocks (non dedicated) to switch the ACSSR via MQTT using an M5AtomS3.

                        Note: in Loop the Execute code block containing mqtt_client.check_msg() is required to get subscribed MQTT messages in a non blocking way. Please see this thread.

                        0_1701782279283_UI2_ATOMS3_ACSSR_20231205.png

                        Thanks
                        Felix

                        GPIO translation table M5Stack / M5Core2
                        Information about various M5Stack products.
                        Code examples

                        ajb2k3A 1 Reply Last reply Reply Quote 0
                        • ajb2k3A
                          ajb2k3 @felmue
                          last edited by

                          @felmue oh cool thanks may have to try that with my M5Dial project

                          UIFlow, so easy an adult can learn it!
                          If I don't know it, be patient!
                          I've ether not learned it or am too drunk to remember it!
                          Author of the WIP UIFlow Handbook!
                          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                          1 Reply Last reply Reply Quote 0
                          • ajb2k3A
                            ajb2k3
                            last edited by

                            @felmue Can you record a video and upload to YouTube?
                            I tried but still cant get it to connect as the red LED flashes for a few seconds then goes out.

                            UIFlow, so easy an adult can learn it!
                            If I don't know it, be patient!
                            I've ether not learned it or am too drunk to remember it!
                            Author of the WIP UIFlow Handbook!
                            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                            1 Reply Last reply Reply Quote 0
                            • felmueF
                              felmue
                              last edited by

                              Hello @ajb2k3

                              sorry, I do not have the equipment for a video nor a YouTube account.

                              The RGB LED is supposed to flash (I think about 6 times) then goes out. (Sorry if I wasn't clear about that.) BTW: The ACSSR does have a separate RED LED as well which will indicate its state.

                              Please try my first UIFlow1 example (which does not include MQTT). This should help to figure out the I2C part.

                              If the ACSSR still doesn't react I suggest you try to scan the I2C bus to make sure the ACSSR is seen and to figure out what I2C address the ACSSR currently is using. The default I2C address is 0x50, but maybe you've changed it in the past?

                              Thanks
                              Felix

                              GPIO translation table M5Stack / M5Core2
                              Information about various M5Stack products.
                              Code examples

                              1 Reply Last reply Reply Quote 0
                              • felmueF
                                felmue
                                last edited by

                                Hello @ajb2k3

                                you can use these blocks in UIFlow2 with M5AtomS3 to scan the I2C bus. If the ACSSR is recognized the result of the scan should be [80] which is decimal for 0x50.

                                0_1701813788363_UI2_M5AtomS3_I2CExtScan_20231205.png

                                Thanks
                                Felix

                                GPIO translation table M5Stack / M5Core2
                                Information about various M5Stack products.
                                Code examples

                                1 Reply Last reply Reply Quote 0
                                • ajb2k3A
                                  ajb2k3
                                  last edited by ajb2k3

                                  Ok got it to scan and respond now

                                  UIFlow, so easy an adult can learn it!
                                  If I don't know it, be patient!
                                  I've ether not learned it or am too drunk to remember it!
                                  Author of the WIP UIFlow Handbook!
                                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                                  1 Reply Last reply Reply Quote 0
                                  • ajb2k3A
                                    ajb2k3
                                    last edited by

                                    OK my brain is failed but how are you adding the 0x01 as I cant find a block to type it in?

                                    UIFlow, so easy an adult can learn it!
                                    If I don't know it, be patient!
                                    I've ether not learned it or am too drunk to remember it!
                                    Author of the WIP UIFlow Handbook!
                                    M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                                    1 Reply Last reply Reply Quote 0
                                    • felmueF
                                      felmue
                                      last edited by felmue

                                      Hello @ajb2k3

                                      yes, that is a tricky one - see post #10.

                                      You'll need to first create an empty bytearray variable with length 1 (I named it myByteArr), then set the first element to 0x01 (or 0x00), then you can use it with the i2c0 write buf... block.

                                      Thanks
                                      Felix

                                      GPIO translation table M5Stack / M5Core2
                                      Information about various M5Stack products.
                                      Code examples

                                      1 Reply Last reply Reply Quote 0
                                      • ajb2k3A
                                        ajb2k3
                                        last edited by

                                        Hi, I have the Dial (in UIFLOW2) now talking to the home IOT server now thanks to your help, Just need to sort out some server side issues.
                                        I can get the ACSSR to work with the UIFLOW 1 blocks with the core and core2 but the atom just doesn't want to work.

                                        UIFlow, so easy an adult can learn it!
                                        If I don't know it, be patient!
                                        I've ether not learned it or am too drunk to remember it!
                                        Author of the WIP UIFlow Handbook!
                                        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

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