Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

  • Topic Author
  • Posted (edited)

    Yes, 

    specifically, the Lua vm is embedded via a Python library (Lupa), and because it brings in the standard Lua vm (there are many choices) as a binary, it links with it's standard C libraries like normal (ex. C string functions). 
    However, a standard Lua interpreter seems to pick up the LC_CTYPE when running and setting that for the C library. The Lupa embedding didn't, and it wasn't documented what I could see

    Edited by jgab
    Posted (edited)

    This really is impressive work. What stands out to me is not only the amount of code, but - maybe mainly - the fact that project appears as structured, intentional.

    Edited by Łukasz997
  • Topic Author
  • Posted
    6 minutes ago, Łukasz997 said:

    This really is impressive work. What stands out to me is not only the amount of code, but - maybe mainly - the fact that project appears as structured, intentional.

    Well, it's my 4th attempt to create a HC3 emulator / developer tool... :-)

  • Topic Author
  • Posted

    v1.3.2 released - lots of potential bugs squashed...

    New library, speed.lua that can be used in the emulator to run code faster than realtime.

    Please login or register to see this code.


    It intercepts setTimeout and setInterval and the various debug functions so it runs everything as fast as possible ,just bumps the virtual time logged.
    We need to call fibaro.speedTime(hours, fun) on the main function that drives our timers.
    The --%%time directive allow us to start the emulator at a given date (works without the speedTime function)

    Really handy when debugging schedulers over weeks or months...

    • Like 1
    • Thanks 1
    • 1 month later...
    Posted
    On 4/24/2026 at 1:12 PM, jgab said:

    v1.3.2 released - lots of potential bugs squashed.

    When I do >pip install plua -u, I am getting v1.3.11, not 3.1.2, Normal?

  • Topic Author
  • Posted
    1 hour ago, Christb said:

    When I do >pip install plua -u, I am getting v1.3.11, not 3.1.2, Normal?

    Yes, made a couple of releases since 1.3.2…

    Posted

    With the last version, I have now the following errors during the QA process in vscode:


    [06.06.2026][07:02:07][INFO   ][PLUA]: Starting helper server on 192.168.1.32 8082
    Fibaro SDK, online, (0.7281s)
    [06.06.2026][07:02:07][DEBUG  ][HOMETABLE5555]: ---- onInit() starts ----
    [06.06.2026][07:02:07][DEBUG  ][HOMETABLE5555]: QA HomeTable id:5555 starts
    [06.06.2026][07:02:07][DEBUG  ][HOMETABLE5555]: --------- onInit( ends --------)
    [06.06.2026][07:02:08][DEBUG  ][HOMETABLE5555]: ======================== update of HomeTable starts ========================
    [06.06.2026][07:02:08][DEBUG  ][HOMETABLE5555]: -------- Getting Device list --------
    [06.06.2026][07:02:11][DEBUG  ][HOMETABLE5555]: #devListAll 409
    [06.06.2026][07:02:11][DEBUG  ][HOMETABLE5555]: #devListVisible 409
    [06.06.2026][07:02:11][DEBUG  ][HOMETABLE5555]: #aQ less VoipUsers= 404
    [06.06.2026][07:02:49][DEBUG  ][HOMETABLE5555]: 156 Escalier_Grenier . Lum_Escalier_Grenier_ = 195
    [06.06.2026][07:02:49][DEBUG  ][HOMETABLE5555]: HomeTable[ Escalier_Grenier ][ Lum_Escalier_Grenier_ ] id= 195
    WARNING:plua.fastapi_process:\U0001f527 QuickApp 5555 not found
    [06.06.2026][07:03:09][DEBUG  ][HOMETABLE5555]: 248 Communs . Lum_Communs = 324
    [06.06.2026][07:03:09][DEBUG  ][HOMETABLE5555]: HomeTable[ Communs ][ Lum_Communs ] id= 324
    [06.06.2026][07:03:11][DEBUG  ][HOMETABLE5555]: 253 Grenier_Pignon . Lum_Pignon_Grenier = 329
    [06.06.2026][07:03:11][DEBUG  ][HOMETABLE5555]: HomeTable[ Grenier_Pignon ][ Lum_Pignon_Grenier ] id= 329
    WARNING:plua.fastapi_process:\U0001f527 QuickApp 5555 not found

     

    But at the end of the QA process, the HomeTable is correctly created and also displayed in the webUI as a table.

     

     

    What can create such Warning message?

  • Topic Author
  • Posted

    Well, your QA seems to do some heavy processing (home table with 409 devices?) initially which keeps it busy.
    The web frontend meanwhile tries to call the Lua engine (your QA) to get the UI to display. It doesn't get it and logs the warning. It will retry and eventually it succeeds and everything should work. So it's harmless. Maybe the warning message could be more informative.
    (This has always been an issue if the lua engine is too busy to answer the frontend...)

    • Like 1

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...