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


  • 0

FIBARO developers - pls Push notification syntax changed ????


Neo Andersson

Question

Hi

Did the syntax of sending notifications change?

I noticed some weird syntax when converted Block scene to Lua.

What is the right syntax then?

Please login or register to see this attachment.

If you convert a block scene to LUA you see this command: hub.alert('simplePush', {[1] = 803, }, 'Haho', false)

when you try to use the same syntax in other LUA script it throws errors. He doesnt understand the hub function and when i use the old fibaro.alert('simplePush', {[1] = 803, }, 'Haho', false) formula is says only push or email parameter is allowed.

So i tried fibaro.alert('push', {[1] = 803, }, 'Haho', false) version, that works, so why is the syntax different ?

Dear Fibaro, can you make it clear please?

 

 

Edited by Neo Andersson
  • Like 1
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

The change should be backwards compatible, so both should work. I think Nice wants a more neutral function name? 

  • Like 1
Link to comment
Share on other sites

  • 0

Yeah, it is in the "change log" but in a rather cryptic way, imho

 

 

I quote a part, the bold text is what you saw after conversion, the usage of "hub." in addition to "fibaro." in lua...

 

Quick Apps
Changed function calling format (backwards compatible).
Changed auto-complete function for new function format in Lua.


Scenes
Changed functions calling format (backwards compatible).
Changed auto-complete function for new functions format in Lua.

Added icons for group actions.
Changed font color in dark-mode of Lua editor.

 

TBH many users didn't understand what those lines meant until they "discovered" that new feature (discussed in PM, not on the forum. Including me. :D

 

Recommendation: for new FQA and scenes, use "hub."

 

 

 

 

 

  • Like 1
Link to comment
Share on other sites

  • 0

Basically it ends up like this: Universal OS accross YUBII, Home Center series and what comes next. Who knows, maybe next generation of gateways will not be named Fibaro Home Center but something else, like DINAC1 (DIN Atomation Controller 1). This would allow them to use the same lua commands accross every NICE gateway.

Edited by jakub.jezek
Link to comment
Share on other sites

  • 0

Or HCPZBIWAJ … (Homecenter Promised Zigbee but it was a joke) ?

  • Like 1
Link to comment
Share on other sites

  • 0

OT: A bit of hijacking.

 

 @Sjekke, I think there is something cooking for end of Q1/2022, but?

  • Thanks 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Can you please share some info about the new LUA IDE colors? It is just unusable now. Everything is red.

    This is not completely for this topic, but i did not get any explantion from other topic. 

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0
    On 3/23/2022 at 1:10 PM, jakub.jezek said:

    OT: A bit of hijacking.

     

     @Sjekke, I think there is something cooking for end of Q1/2022, but?

    Q1 ends today … what was cooked? Pls tell us.

    Link to comment
    Share on other sites

    • 0
    9 minutes ago, Sjekke said:

    Q1 ends today … what was cooked? Pls tell us.

    Yes, Q1 ends today. Today is probably serving time.

    Link to comment
    Share on other sites

    • 0
    40 minutes ago, jakub.jezek said:

    Yes, Q1 ends today. Today is probably serving time.

    I hope … tomorrow is April Fools' Day … 

    Link to comment
    Share on other sites

    • 0
    On 3/24/2022 at 12:29 PM, Neo Andersson said:

    Can you please share some info about the new LUA IDE colors? It is just unusable now. Everything is red.

    This is not completely for this topic, but i did not get any explantion from other topic. 

    Please login or register to see this link.


    It is fixed :)

    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
    Answer this question...

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