Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. utaani
    3. Posts
    U
    • Continue chat with utaani
    • Start new chat with utaani
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by utaani

    • RE: Read own API Key in UIFlow/micropython?

      @iamliubo, Thanks for reply!

      By using this code, I was able to get the API Key:

      import deviceCfg
      akey=deviceCfg.get_apikey()
      

      BTW, the MAC address can be obtained with the following code:

      macaddr=wifiCfg.wlan_sta.config('mac')
      macaddr='{:02x}:{:02x}:{:02x}:{:02x}:{:02x}:{:02x}'.format(*macaddr)
      

      Thank you!

      posted in UIFlow
      U
      utaani
    • RE: Read own API Key in UIFlow/micropython?

      @robalstona Thanks for reply.

      I tried the following code, but I get an error.

      from m5stack import *
      from m5ui import *
      from uiflow import *
      
      setScreenColor(0x111111)
      
      print(APIKEY)
      

      0_1630884807759_3f5e857e-8620-4937-b1db-9fd5be124cec-image.png

      "_APIKEY" also resulted in an error.

      Do I need to install any additional modules?

      posted in UIFlow
      U
      utaani
    • Read own API Key in UIFlow/micropython?

      We have set up a number of M5 Stick Cs for remote IT education purposes. We have developed a cloud service for device management, and it is now possible to send a mac address (as a unique ID) from UIFlow to our cloud service using http. If we can upload the UIFlow API Key for each device at the same time as the macaddress, we think that we can distribute the m5f file to the managed M5 Stick C without having the students make notes.

      Is there a way to access the device's API Key from Block or micropython?

      posted in UIFlow
      U
      utaani