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

Please login or register to see this image.

/monthly_2019_03/image.png.33aad5f83d408c8dae33db87d1bb6f13.png" alt="image.png.33aad5f83d408c8dae33db87d1bb6f13.png" />

Link to comment
Share on other sites

6 minut temu, jgab napisał:

msg.ESceneID=-1

this is what I'm looking for a couple of hours :) omg 

 

THANK YOU for support

Edited by domin12
Link to comment
Share on other sites

@jgab

I try to migrate to new version 2

 

I have following problem:

- error with reading file in ZBS if I use button >>  (execute), In case of button > (Start) it works ...

 

 

Link to comment
Share on other sites

  • Topic Author
  • 3 minutes ago, petrkl12 said:

    @jgab

    I try to migrate to new version 2

     

    I have following problem:

    - error with reading file in ZBS if I use button >>  (execute), In case of button > (Start) it works ...

     

     

    Yes, you always have to run it in debug mode - that's how I can do the "magic" :-) 

    Link to comment
    Share on other sites

  • Topic Author
  • I just pushed a new version of the HC2 emulator that is aware of EventRunner scenes and only log when the scene starts up the first time and not every time it gets a trigger.

    The log output is bit cleaner in that way.

    Also, in the emulator there is a line

    Please login or register to see this code.

    comment out that line as EventRunner scenes do their own logging of fibaro:* calls, or you will see double log messages of fibaro:* calls... It's used for standard H2C scenes.

    Link to comment
    Share on other sites

    I don't see any result from ZBS:

     

    Debugging session started in 'E:\Development\ZeroBraneStudio\myprograms\Fibaro\FibaroDev\'.
    #[HC2]22:22:43, Thu Mar 07: HC2 SceneRunner v0.3 fix8
    #[HC2]22:22:43, Thu Mar 07: Reading configuration from H2C...
    #[HC2]22:22:43, Thu Mar 07: Writing configuration data to 'HC2.data'
    #[HC2]22:22:43, Thu Mar 07: Configuration setup, Globals:135, Scenes:62, Device:744, Rooms:19
    #[HC2]22:22:43, Thu Mar 07: Loaded scene:EventRunnerTools, id:10, file:'EventRunnerTools.lua'
    Debugging session completed (traced 0 instructions).
    #[HC2]00:22:43, Wed Sep 04: 09/04/19 00:22:43, End of time (4320 hours) - exiting
    Program completed in 52.83 seconds (pid: 19192).

     

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, petrkl12 said:

    I don't see any result from ZBS:

     

    Debugging session started in 'E:\Development\ZeroBraneStudio\myprograms\Fibaro\FibaroDev\'.
    #[HC2]22:22:43, Thu Mar 07: HC2 SceneRunner v0.3 fix8
    #[HC2]22:22:43, Thu Mar 07: Reading configuration from H2C...
    #[HC2]22:22:43, Thu Mar 07: Writing configuration data to 'HC2.data'
    #[HC2]22:22:43, Thu Mar 07: Configuration setup, Globals:135, Scenes:62, Device:744, Rooms:19
    #[HC2]22:22:43, Thu Mar 07: Loaded scene:EventRunnerTools, id:10, file:'EventRunnerTools.lua'
    Debugging session completed (traced 0 instructions).
    #[HC2]00:22:43, Wed Sep 04: 09/04/19 00:22:43, End of time (4320 hours) - exiting
    Program completed in 52.83 seconds (pid: 19192).

     

     

    add

    %% autostart 

    to the header?

    Link to comment
    Share on other sites

    No, I don't have %% autostart in any scenes except main one (watch dog)

    Now it runs

     

    but another error:

    [228:1][DEBUG] 22:28:07: Thu Mar 07: Error loading rules:Err:fibaro:getGlobalValue("<ID>"), EventRunnerHue.lua:3194: Err:fibaro:getGlobalValue("<ID>"), Err:fibaro:getGlobal("<ID>"), HC2.lua:1239: Assertion failed: Expectedstring
     

    Link to comment
    Share on other sites

  • Topic Author
  • 6 minutes ago, petrkl12 said:

    No, I don't have %% autostart in any scenes except main one (watch dog)

    Now it runs

     

    but another error:

    [228:1][DEBUG] 22:28:07: Thu Mar 07: Error loading rules:Err:fibaro:getGlobalValue("<ID>"), EventRunnerHue.lua:3194: Err:fibaro:getGlobalValue("<ID>"), Err:fibaro:getGlobal("<ID>"), HC2.lua:1239: Assertion failed: Expectedstring
     

     

    If you want to start it without %% autostart you need to add a start command to the HC2.lua file (inside the main())

    Please login or register to see this code.

    if the ID of your scene is 20.

     

    fibaro:getGlobalValue expects a string as first arg. Set a breakpoint at 3194 and look at ZBS stack window where you came from and if the args are correct... I would expect that you are passing null instead of a variable name due to some other error. 

    Link to comment
    Share on other sites

    OK

     

    that error is in your code - I try to convert 2 my scene with same error ...

     

            local status,res,r2 = pcall(function() return fibaro._orgf[name](obj,id,table.unpack(args)) end)
     

    Link to comment
    Share on other sites

  • Topic Author
  • 4 minutes ago, petrkl12 said:

    OK

     

    that error is in your code - I try to convert 2 my scene with same error ...

     

            local status,res,r2 = pcall(function() return fibaro._orgf[name](obj,id,table.unpack(args)) end)
     

    Well, I just protect the call with a 'pcall'. and return the error. The real error comes from the fibaro call being executed -- which looks like a fibaro:getGlobal/fibaro:getGlobalValue call somewhere in your scene.

    It points at EventRunnerHue.lua:3194

    I would set a breakpoint there, expecting that the variable name is... null?

     

    Link to comment
    Share on other sites

    it's interesting because I didn't have any problems with these scenes before ...

     

    I can try to convert third one :)

     

    aha, you have changed  _deviceTable to _homeTable ..., sorry

    Link to comment
    Share on other sites

  • Topic Author
  • 1 minute ago, petrkl12 said:

    it's interesting because I didn't have any problems with these scenes before ...

     

    I can try to convert third one :)

     

    Well, it can still be my fault :-)

    I think that you may fetch the name of a fibaro global from somewhere and store it in 'x'. It fails (silently) and you do fibaro:getGlobalValue(x), and x is null and you get the error.

    Where do you get the name of the fibaro global from? Another global? is that global read from the HC2 and initialised? 

    Link to comment
    Share on other sites

    no, my mistake

    you have changed  _deviceTable to _homeTable ..., sorry

    Link to comment
    Share on other sites

  • Topic Author
  • Just now, petrkl12 said:

    no, my mistake

    you have changed  _deviceTable to _homeTable ..., sorry

    Yay! not my fault (really :-) )

    Going to bed, the support opens tomorrow morning - keep questions coming.

    /J

    Link to comment
    Share on other sites

    6 hours ago, domin12 said:

    @jompa68

    Do You know how to turn off all lights in the home by telegram?

    like this

    Please login or register to see this code.

    the magic is you use the same name as in your HomeTable

     

    Link to comment
    Share on other sites

    2 godziny temu, jompa68 napisał:

    like this

    Please login or register to see this code.

    the magic is you use the same name as in your HomeTable

     

    I added new cmd and using this function to turn all lights off

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    another cmd function 

     

    Please login or register to see this code.

    Please login or register to see this code.

    text in telegram

    Please login or register to see this code.

     

    Edited by jompa68
    Link to comment
    Share on other sites

    Is it safe , this telegram magic - means talking to your fibaro ? if someone get your bot name, and send some command to my bot, is that situation will work?

    _______________

    ok, I already know everything..... There was no question

    Edited by domin12
    Link to comment
    Share on other sites

    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...