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

    UiFlow 2.0 discuss(how-to, bug, feature request or sometings)

    Scheduled Pinned Locked Moved UiFlow 2.0
    193 Posts 78 Posters 530.8k Views 13 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.
    • S Offline
      sgu
      last edited by

      When Will LVGL be integrated in UIFlow 2 ? I don't see a progress there for many months. The new devices such as Tab5 are useless without LVGL. Programming with UiFlow 2.0 and printing simple lines and squares look very old school.

      1 Reply Last reply Reply Quote 0
      • H Offline
        hacxx
        last edited by

        Thanks for sharing the UiFlow 2.0 resources! I appreciate having a dedicated space for bugs, how-tos, and feature requests. Does anyone have tips on avoiding common firmware burning errors, especially with account binding? Also curious if there’s a timeline for the full API docs release. Looking forward to seeing how this evolves!

        1 Reply Last reply Reply Quote 0
        • T Offline
          thecuri
          last edited by

          I recently los all my private cloud projects....is there a way to get them back from your servers?

          1 Reply Last reply Reply Quote 0
          • Z Offline
            zhumingqi
            last edited by

            I used UIFlow2 to devleop a simple UI demo, and I monitor the free memory with gc.mem_free(). I found the free memory reduced continiously though I called gc.collect() every loop. Finally, the UI can not update again, but the loop still was running.

            Z 1 Reply Last reply Reply Quote 0
            • Z Offline
              zhumingqi @zhumingqi
              last edited by

              I tested more UI design. And I found that the memory leak only happens when I use image component and switch images frequently. Is that a UIFlow2.3.3 bug or my design is incorrect?

              1 Reply Last reply Reply Quote 0
              • Z Offline
                zhumingqi
                last edited by

                Today, I updated the UIFlow to V2.3.4, and burned V2.3.4 firmware as well. Then I tested that image component again with M5GFX in UIFlow 2.3.4. But the issue still exists. After I switch two JPG pics with one image component for sometime, the memory will reduced continiously. Finally, the system will break out. And I try to use gc.collect() after every drawImage(), but it's not useful.
                Here is my design and python code:
                import os, sys, io, gc
                import M5
                from M5 import *

                ImageSwitchFlag = None

                def GcCollectAndPrint():
                global ImageSwitchFlag
                gc.collect()
                print(gc.mem_free())
                pass

                def btnA_wasClicked_event(state):
                global ImageSwitchFlag
                if ImageSwitchFlag == 0:
                M5.Lcd.drawImage("/flash/res/img/RotaryBGBacklight.jpg", 0, 0)
                GcCollectAndPrint()
                ImageSwitchFlag = 1
                elif ImageSwitchFlag == 1:
                M5.Lcd.drawImage("/flash/res/img/RotaryBGBT.jpg", 0, 0)
                GcCollectAndPrint()
                ImageSwitchFlag = 0

                def setup():
                global ImageSwitchFlag

                M5.begin()
                Widgets.fillScreen(0x000000)

                BtnA.setCallback(type=BtnA.CB_TYPE.WAS_CLICKED, cb=btnA_wasClicked_event)

                ImageSwitchFlag = 0

                def loop():
                global ImageSwitchFlag
                M5.update()

                if name == 'main':
                try:
                setup()
                while True:
                loop()
                except (Exception, KeyboardInterrupt) as e:
                try:
                from utility import print_error_msg
                print_error_msg(e)
                except ImportError:
                print("please update to latest firmware")******

                b442ffec-d9ce-4445-898c-4b8ffc3caa82-image.png

                1 Reply Last reply Reply Quote 0
                • S Offline
                  Schwibach
                  last edited by

                  I wrote in another thread about my Sync... 0% problem.

                  I am pretty sure now that it is a bug. I does not matter which program I use. I can run them from UIFlow 2.0. But as soon as I download a program, I will get the Sync... 0%

                  Also, if I burn firmware without selecting startup, it will not even connect to UIFlow 2.0.

                  I would really appreciate any guidance you could give.

                  1 Reply Last reply Reply Quote 0
                  • O Offline
                    otosan-maker
                    last edited by

                    I have found a bug in MQTT software. When I subscrive to a topic, the python code creates the subscription at the beggining of the setup code, before it connects to wifi and mqtt.

                    Here is the sample:
                    def setup():
                    global page0, label0, LTemp, label1, temperatura, slider0, button0, off, mqtt_client, wlan, rotary
                    mqtt_client.subscribe('termostato/temperatura', mqtt_termostato_temperatura_event, qos=0)

                    M5.begin()
                    m5ui.init()
                    page0 = m5ui.M5Page(bg_c=0xffffff)
                    label0 = m5ui.M5Label("Umbral", x=30, y=81, text_c=0x85231b, bg_c=0x302c2c, bg_opa=0, font=lv.font_montserrat_24, parent=page0)
                    LTemp = m5ui.M5Label("Temperatura:", x=41, y=39, text_c=0x000000, bg_c=0xffffff, bg_opa=0, font=lv.font_montserrat_14, parent=page0)
                    label1 = m5ui.M5Label("19,0", x=152, y=81, text_c=0x85231b, bg_c=0xffffff, bg_opa=0, font=lv.font_montserrat_24, parent=page0)
                    temperatura = m5ui.M5Label("00.00", x=141, y=39, text_c=0x000000, bg_c=0xffffff, bg_opa=0, font=lv.font_montserrat_14, parent=page0)
                    slider0 = m5ui.M5Slider(x=38, y=119, w=160, h=22, mode=lv.slider.MODE.NORMAL, min_value=190, max_value=290, value=210, bg_c=0x115e9f, color=0x2c90e4, parent=page0)
                    button0 = m5ui.M5Button(text="Set", x=54, y=172, bg_c=0x2196f3, text_c=0xffffff, font=lv.font_montserrat_14, parent=page0)
                    off = m5ui.M5Button(text="OFF", x=124, y=171, bg_c=0xf36021, text_c=0xffffff, font=lv.font_montserrat_14, parent=page0)

                    off.add_event_cb(off_event_handler, lv.EVENT.ALL, None)
                    BtnA.setCallback(type=BtnA.CB_TYPE.WAS_CLICKED, cb=btnA_wasClicked_event)
                    slider0.add_event_cb(slider0_event_handler, lv.EVENT.ALL, None)
                    button0.add_event_cb(button0_event_handler, lv.EVENT.ALL, None)

                    page0.screen_load()
                    wlan = network.WLAN(network.STA_IF)
                    rotary = Rotary()
                    wlan.connect('bencab', 'arrabal6')
                    rotary.set_rotary_value(19)
                    mqtt_client = MQTTClient('m5termostato', '192.168.1.34', port=1883, user='user', password='pass', keepalive=33149)
                    label1.set_text(str((slider0.get_value()) / 10))

                    1 Reply Last reply Reply Quote 0
                    • O Offline
                      otosan-maker
                      last edited by

                      c8fa1994-6b95-44a3-bd12-2a546e067051-image.png

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        Amani4791
                        last edited by

                        Hi there,

                        I updated firmware on my Tab5 and installed UiFlow 2.0 V 2.4.0.
                        I hoped for fixed UI libs, LVGL (M5UI) is not working for me:
                        If I use pictures for button graphics (<30kB) hiding/ showing them to get 2 state feedback is very, very slow!
                        The same graphics work fine/ fluent with old M5GFX, so I assume there must be a bug?

                        Also: it seems that Wifi is not working anymore with V2.4.0: cannot get http calls.
                        (also normally on booting Tab5 shows UIFlow settings page, with V2.4.0 not anymore and if I download project it's not booting...

                        Hopefully you can fix it soon, I hoped to get something running over Christmas holidays ;-)

                        Thanks a lot,
                        Kind regards from Switzerland!
                        Stephan

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          GuerillaPlanter
                          last edited by

                          Thank you for the M5Stack devices and coding tools. This community forum has been a great help too. I have been successfully using UiFlow2 to create code for a Cardputer. But I think there is a bug in the UiFlow2 web UI and/or m5f2 file format.

                          THIS WORKS: I can save to the cloud, save the project to a local file, and reimport that file, when the script is like:

                          sTestString = None
                          
                          def setup():
                            global sTestString
                          
                            M5.begin()
                            Widgets.fillScreen(0x000000)
                          
                            sTestString = 'hello'
                          
                          def loop():
                            global sTestString
                            M5.update()
                          

                          THIS DOESN'T WORK: If I edit it and assign a particular more complex value to the string, I cannot save to the cloud, nor reimport a file saved locally:

                          sTestString = 'OL,1,RW7###jp0 55  j"#k#!7##ih###4up j`%##7#'
                          

                          This string happens to be a line from a teletext page .tti file, which includes some display control codes. Here is a screenshot of the code which can't be saved to the cloud or reimported, in the UiFlow2 UI:

                          4afd05da-a1ee-4057-a251-fcb98e423e69-image.png

                          Decoding this string's value is:

                          \u004f\u004c\u002c\u0031\u002c\u001b\u0052\u007f\u001b\u0057\u0037\u0023\u0023\u0023\u006a\u0070\u0030\u0020\u0035\u0035\u0020\u0020\u006a\u0022\u0023\u006b\u0023\u0021\u0037\u0023\u0023\u0069\u0068\u0023\u0023\u0023\u0034\u0075\u0070\u0020\u006a\u0060\u0025\u0023\u0023\u0037\u0023

                          While the script cannot be saved to the cloud (there is no response), the project can be saved to a local file. In the .m5f2 project file, the relevant saved value is:

                          <field name=\"VAR\" id=\"usN/c#7FD;q`ieH|V~5K\">sTestString</field><value name=\"VALUE\"><block type=\"text\" id=\"ap8ErHQgaUZ`^d-W-%_I\"><field name=\"TEXT\">OL,1,\u001bR\u001bW7###jp0 55  j\"#k#!7##ih###4up j`%##7#</field></block></value>
                          

                          This local file cannot then by imported again into UiFlow2, giving an "error opening file" message:

                          2dca212f-b98c-4d77-ba73-8801f4396409-image.png

                          I believe the problem is related to some unicode characters rather than the " character.

                          1 Reply Last reply Reply Quote 0
                          • W Offline
                            wmoorefi @ajb2k3
                            last edited by

                            I am unable to get BaseX module to work with UI Flow 2.x firmware. I can get it to work with UI Flow 1.x.

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              RBOUMAN58
                              last edited by

                              I noticed today uiflow2 is 2.4.4 instead of the 2.4.3 as yesterday.Working with a PaperS3 e-paper, my programs crash on missing fonts

                              AttributeError: type object 'Fonts' has no attribute 'Montserrat24'

                              Also Montserrat18 is mentioned many times.
                              These fonts are the fonts used in the prompts/labels on the screeneditor in uiflow2?
                              Anybody has seen same symptoms, so something wrong with 2.4.4?

                              R 1 Reply Last reply Reply Quote 0
                              • R Offline
                                RBOUMAN58 @RBOUMAN58
                                last edited by

                                @RBOUMAN58
                                Got the problem solved, burned the 2.4.4 firmware using M5Burner, problems gone... programs are working again

                                1 Reply Last reply Reply Quote 0

                                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                With your input, this post could be even better 💗

                                Register Login
                                • First post
                                  Last post