Skip to Content
avatar image
Former Member

Rise a notification on incoming IoT message.

Hi experts

We are currently evaluating the SAP HANA Cloud (SHC) platform for IoT integration. We are now able to send data from the IoT device to SHC and we see the received messages in a database table. It is clear for us so far.

Now we want to implement a notification (e.g. send an e-mail or an SMS) when a new defined message type or content is written to the database. Here is not clear what we have to implement and which SHC services will be involved.

Can anyone shortly explain the architecture of some application?

Thanks in advance!

QIAiot

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 14, 2016 at 01:10 PM

    Hello Qiagen,

    for example, with the Processing API you may register a HTTP processing service. See more at [1] Then either forward a complete message or just a notification that the message has arrived to the respective/configured HTTP endpoint (backend) which will trigger an E-Mail or SMS send.

    Regards,

    Anton

    [1] SAP HANA Cloud Platform Internet of Things (IoT) Services

    Add comment
    10|10000 characters needed characters exceeded

    • If I understood your requirements right, you may even skip step 2 with the HTTP processing service approach.

      So, what you have is (correct me if I am wrong):

      • A device type (let's call it HOUSE_EQUIPMENT)
      • A device (DOOR)
      • A message type (DOOR_STATUS)
      • Registered [1] two processing mappings (SQL [2] and HTTP [3]) for your device type / message type pair
      • SQL processing service will persist your messages to DB (like usually is done by MMS)
      • HTTP will forward a complete message (that is why I told you can skip step 2) to your "backend". (If you just send "notify" mode then of course you 'd need to get the messages from MMS to see the last status).
      • Once your "backend" receives a forwarded message from MMS, you check for the status (it is right in the message body, no need to query the DB)
      • Depend on a status value you query the respective users (from some other table etc)
      • You send e-mail to them

      [1] SAP HANA Cloud Platform Internet of Things (IoT) Services

      [2] SAP HANA Cloud Platform Internet of Things (IoT) Services

      [3] SAP HANA Cloud Platform Internet of Things (IoT) Services

  • Apr 14, 2016 at 03:31 PM

    Alternatively, if you have HANA XS DB System bound to MMS, you might want to use HANA XS Triggers [1] and call your procedure before or after INSERT "event" to the DB table i.e T_IOT_<YOUR_MESSAGE_TYPE_ID>

    This is not that straightforward as the solution proposed above, of course.

    [1] CREATE TRIGGER - SAP HANA SQL and System Views Reference - SAP Library

    You can find more "XS Trigger" related examples either on SCN or simply with google search.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 27, 2016 at 09:17 AM

    Hello Qiagen,

    Did you manage to achieve this? I am also working on something similar, In my case once i get the data in MMS, I want to send it to SAP Backend. could you please help me how to achieve this.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded