Hi everybody,
I seem to be stuck in my search how to implement a (large) mobile popup, triggered in a LUA scene in HC3. I found this example for HC2: https://manuals.fibaro.com/knowledge-base-browse/how-to-create-mobile-pop-up/
This is actually what I want to create, a large popup with buttons and actions connected to it. But the example (obviously) does not work in HC3.
I am using the following code and the fibaro.homeCenter.notificationService.publish function with type set to MobilePopupNotification as described in https://manuals.fibaro.com/home-center-3-lua-scenes/
local function popupMessage(message)
local request = {
type = "MobilePopupNotification",
priority = "warning",
data = {
title = "Door(s) Open",
text = message,
}
}
local response, code = fibaro.homeCenter.notificationService.publish(request)
fibaro.debug("Scene109", json.encode(response))
fibaro.debug("Scene109", code)
end
The debug responses are:
for response: {"data":{"title":"Door(s) Open","buttons":[],"text":"Alarm in kelder en begane grond armed"},"created":1586512755,"type":"MobilePopupNotification","id":208,"priority":"warning","wasRead":false,"canBeDeleted":true}
for code: 200
My Notification page in the web interface displays the warning as "Notification title" but no mobile notification is received.
I also had this scene running with fibaro.alert() but that did not give me the desired large popup, only a smal one with limited text and not button options.
BTW: I couldn't get the button functionality to work in any way. Tried arrays, objects, array of objects, object of objects etc but always got an error code 400 or simply a load error code ((load):34: unexpected symbol near '[')
So, can anybody point me in the right direction, or tell me if what I want is possible in HC3?
Thanks a lot