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

Appending a value in push notification ?


Question

Posted

Hi,

 

I'm relativly new HC2 user with a almost no knowledge in LUA programming.....

I'm building my home automation slowly and get more and more working...

 

I have some block scenes (triggered from external http call) set up to send push notifications on low temperatures and I get the notification on the iPhone correct.  But how can I include, in the notification message,  a temperature value from either of  a HC2 Device / VD / Global Variable ?? 

 

Learning every day.....

 

Torbjorn

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

The functionality is not implemented in current version unfortunately. For now you need to create one notification for every temperature you need to send, I believe.

It is a feature that is frequently requested and would drastically increase the perceived intelligence and usability of the system and reduce the need for lots of notifications. I currently have 90 different notifications and as the notification list isn't possible to sort at all it is not easy to handle.

 

It really should not be that hard to implement. Fibaro, is this on the todo list for future versions?

Edited by Dannyboy
  • 0
  • Inquirer
  • Posted

    Thanks a lot for your informative but, contentwise,  disappointing reply  !

    • 0
    Posted

    But it is possible in LUA scenes.

     

     

    • 0
  • Inquirer
  • Posted
    5 minutes ago, Sankotronic said:

    But it is possible in LUA scenes.

     

     

     

    Can you be so kind to show a newbie the LUA code to do that ....???:-))

     

    Thanks in advance ...!

    • 0
    Posted (edited)

    Ok, first you need to find out your mobile devices ID number. To do that you need to go with browser to this link:

     

    http://YOUR_HC_IP/docs/#!/iosDevices/getIosDevices

     

    where you must replace YOUR_HC_IP with IP address of your HC2, usually looks like 192.168.1.200 or something. This IP you can check if you go to Configuration and then LAN Settings.

     

    When you get to DOCS page of your HC then you click on iosDevices to open and click on button TRY IT! to get all mobile devices ID.

     

    Here are now some code examples:

     

    Please login or register to see this code.

    Here it is how it looks like on my iPhone:

     

    Hope this will help.

    Edited by Sankotronic
    Attachment quota filled up / deleting older stuff sorry :-(
    • Like 1
    • 0
  • Inquirer
  • Posted
    13 minutes ago, Sankotronic said:

    Ok, first you need to find out your mobile devices ID number. To do that you need to go with browser to this link:

     

    http://YOUR_HC_IP/docs/#!/iosDevices/getIosDevices

     

    where you must replace YOUR_HC_IP with IP address of your HC2, usually looks like 192.168.1.200 or something. This IP you can check if you go to Configuration and then LAN Settings.

     

    When you get to DOCS page of your HC then you click on iosDevices to open and click on button TRY IT! to get all mobile devices ID.

     

    Here are now some code examples:

     

    Please login or register to see this code.

    Here it is how it looks like on my iPhone:

    Please login or register to see this link.

    Hope this will help.

     

    Thanks a lot for your help, will try tomorrow...:-)

    • 0
  • Inquirer
  • Posted

    Code woked very OK, I getting to know the LUA secrets slowly. Thank you.

    Now, if my device is a VD and if I put this device ID into the code, there is a debug error message "attempt to concatenate a nil value"

     

    I guess I need to replace the "

    Please login or register to see this code.

    with something else...???

     

    My VD is:

    Please login or register to see this code.

    Response Code

    • 0
    Posted (edited)

    Torbjorn

     

    In case that you want to get value from virtual device where it is displayed as label then you need to use this command:

    Please login or register to see this code.

    So, any label value that is displayed on VD can be retrieved and for eg. sent with push or e-mail notification. In your VD there is only one label showing temperature. If you are writing scenes on HC2 then you can always check what you can get from devices which are listed on the left of the scene window:

     

    Enjoy coding! :-)

    Edited by Sankotronic
    Attachment quota filled up / deleting older stuff sorry :-(
    • 0
  • Inquirer
  • Posted

    Dear Sankotronic,

     

    Works great, 

    Thanks a lot for your help, much appreciated !

     

    best regards

    Torbjorn

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