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

Send notification/email to all mobile device and users (lua)


Question

Posted

Hi,

Currently I am sending notifications / email using the following methods:

fibaro:call(2, "sendDefinedEmailNotification", "14")

fibaro:call(6, "sendDefinedPushNotification", "14")

fibaro:call(6, "sendPush", "Message...")

However, I need to specify the mobile device ID and user ID in order to call the above functions.

Kindly advise whether or not I am able to send notification to ALL associated mobile devices, and email to ALL users without specifying the mobile device ID or user ID?

Thanks.

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

4 answers to this question

Recommended Posts

  • 0
Posted

+1 for this.

It is just annoying to program every scene if you want to add a user or you get a new phone.

  • 0
Posted

sendGlobalPushNotifications

sendGlobalEmailNotifications

to get all the call api values look at actions from devices api

"actions":{"sendDefinedEmailNotification":1,"sendDefinedSMSNotification":2,"sendEmail":2,"sendGlobalEmailNotifications":1,"sendGlobalPushNotifications":1,"sendGlobalSMSNotifications":1,"sendSipUserID":1,"setSipDisplayName":1,"setSipUserPassword":1}

"actions":{"sendEmail":2,"sendPush":1,"setSipDisplayName":1,"setSipUserID":1,"setSipUserPassword":1

  • 0
Posted

Is it possible to do something like this?

Please login or register to see this code.

  • 0
Posted

Hi,

I'm generally using a global variable to store my current phone ID:

fibaro:call(fibaro:getGlobalValue("myphone"), 'sendPush', "my message")

To send to multiple users I will probably put a list of all users IDs in a global variable and build a cycle to use them all.

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