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

Popup notification


Guest David86vm

Question

Guest David86vm
Posted

While trying to use the Popup message box i first made an easy script which won't work :->

 

I set up a scene to turn on a light in de Bedroom, this works fine when pressing run light goes on.

Now I tried to make an Popup notification when selecting yes I should turn on the light trough scene 126 which does not happen.

Also I got 3 notification in the message box of the Fibaro App, who can not be removed and stay's the first 3 tries.

 

running on 4.049 and Iphone 5S ios 8.3 APP VERSION 2.5

 

below my code what's going wrong.

 

Code of popup scene:

 

--[[
%% properties
126
%% globals
--]]
-- variable containing path of Motion Sensor’s icon
local imgUrl =
'

Please login or register to see this link.

-- pop-up call
HomeCenter.PopupService.publish({
        -- title (required)
    title = 'test',
        -- subtitle(optional), e.g. time and date of the pop-up call
    subtitle = os.date("%I:%M:%S %p | %B %d, %Y"),
        -- content header (optional)
    contentTitle = 'Light on?',
        -- content (required)
    contentBody = 'Turn on bedroom light"?',
        -- notification image (assigned from the variable)
    img = imgUrl,
        -- type of the pop-up
    type = 'Succes',
        -- buttons definition
    buttons = {
    { caption = 'Yes', sceneId = 126 },
    { caption = 'No', sceneId = 0 }
    }
})

 

code light scene (ID 126):

 

--[[
%% properties
66
%% globals
--]]
local a = 1

local startSource = fibaro:getSourceTrigger();

  fibaro:call(66, "turnOn");
fibaro:debug("light on")

 

Who got those popup's working?

 

 

9 answers to this question

Recommended Posts

  • 0
Posted

Please login or register to see this code.

This couldn't work... Have a look at developer.fibaro.com...

Please login or register to see this image.

/emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

  • 0
Guest David86vm
  • Inquirer
  • Posted

    Please login or register to see this code.

    This couldn't work... Have a look at developer.fibaro.com...

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

     

    Removed the 126 from head block still won't work.

     

    I now just removed full scene and started over by copying the example of developer.fibaro.com only changed senceId to trigger my scene light in that scene  stay's off.

     

    Also got 15 message's in notification box which can't be removed.

     

    Does someone already have those popup's working and can provide an working example?

    • 0
    Posted

    Can you post your scene plz? I will have a look

    • 0
    Posted

    indeed post your code:)

    i have 15 of them running just fine.

    So there must be a syntax error

     

    one of my examples

    This scene is triggered by another scene so theres no trigger in this one

    Please login or register to see this code.

    • 0
    Guest David86vm
  • Inquirer
  • Posted

    Just used code from the developer example and changed the sceneId to the one which should run after pressing "turn off"button.

     

    --[[
    %% properties
    %% globals
    --]]

    -- variable containing path of Motion Sensor’s icon
    local imgUrl =
    '

    Please login or register to see this link.

    -- pop-up call
    HomeCenter.PopupService.publish({
        title = 'Brightness level',
        subtitle = 'is too high',
        contentTitle = 'Dimmer',
        contentBody = 'Would you like to turn it off?',
        img = '

    Please login or register to see this link.

    ,
        type = 'Critical',
        buttons = {
            { caption = 'Turn off', sceneId = 126 },
            { caption = 'No', sceneId = 0 },
            { caption = 'Set to 100%', sceneId = 0 }
        }
    })

    • 0
    Guest David86vm
  • Inquirer
  • Posted

    After some time stop with the popup messages I'm still trying to get this working but without working result

    code I used

     

    when running scene 126 manual light goes on

    Please login or register to see this code.

    Also every time I press run the popup a get another popup in the app but can't remove them result 15 outstanding notifications

    • 0
    Posted

    @Fibaro,

     

    Is there a way to remove the Popup Notifications in the bin?

     

    I have a test popup LUA scene and it works, generated two popup notifications but nothing happens when I click the 'Ok' button. And there is also no way to delete the notifications.

    • 0
    Guest David86vm
  • Inquirer
  • Posted

    @Fibaro,

     

    Is there a way to remove the Popup Notifications in the bin?

     

    I have a test popup LUA scene and it works, generated two popup notifications but nothing happens when I click the 'Ok' button. And there is also no way to delete the notifications.

    So you actually have the same problem as me as far as I know there's still no solutions for this.

     

    @Fibaro please explain how to get the pop ups working right

    • 0
    Posted
    On 4/30/2016 at 7:54 AM, David86vm said:

    So you actually have the same problem as me as far as I know there's still no solutions for this.

     

    @Fibaro please explain how to get the pop ups working right

    Hi guys.

     

    Sorry to open an old thread but did you ever find a solution to delete these notifications?

    I have 999+ notifications shown at the top and there's too many to delete!

    They are not sent to an individual so must be stored somewhere in the HC2.

     

    Thanks, Elton.

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