Platform

Rules

29 views 0

Define Rules

Notification is based on rules that you can define under the Push notification module.

Defining a new rule:

  • Name – add a desired name for you Notification / Event.
  • Active – if it is not active it will not run on the server side.
  • Worker – is an important part, this will create a new Queue under the Rabbit MQ and there you can find your messages.
  • Time Out(s) – in seconds.
  • Static Channel – use on of the push notification channels – see definition
  • Define Channel – for this Event you can define a dedicated channel where data need to be announced.
  • Data Stream – on what data stream from RoboFuse to be active this rule.
  • Attach Payload – if to attach the original payload to message.
  • Max Frq. – what is the maximum frequency that messages will be pushed to MQ – not used in this version.
  • Payload Max. Vol – if payload is larger than specified volume is not attached – not used in this version.

Define channel (If checked it will overwrite the Static Channel field)

If for a specific rule you need to superscript the Channel that must be used, here you can do this, by defining:

  • Channel Name – designated name
  • Channel URL – URL of the 3rd party system
  • Channel User – user
  • Channel Password – password

When this specific rule is executed the particular channel is used, and notification is sent using this channel.

Rule Payload

System will send to the Application Message Queue a message once the rule is fired.

The message is sent under the Worked Queue.

Message structure:

{
  "app_id": "155_1zgkcipy3ry8wsg0oss0ocwcsws8gssgwkgo4wcocgwss",
  "access_token": "N2JiYWZkZDZjY2UzOWRlNDc4NWYxZjVhNGJjZGViZDhjNTRhNTFjZjhhMjQyODA2NzI3NmNlOGQzNDRjOQ",
  "user_uid": "5455b4f9-f0ee-4f23-bcc8-134ec1a5ca27",
  "channel": {
    "url": "https://nodered.ropardo.net/events",
    "user": "",
    "pwd": ""
  },
  "stream_payload": "W3sidmFsdWUiOiAiMjYuMiIsICJ0aW1lc3RhbXAiOiAiMjAyMS0wNy0yN1QxNTo0NzoxMiswMzowMCIsICJ1bml0IjogIkMiLCAiZGV2aWNlSUQiOiAiNGMxMWFlZDhjZDQzLWQ2MDMwZTk3OTQ0M2I1MjgifV0="
}

 

Stream Payload is base64 encoded, for example the payload decoded is:

[
  {
    "value": "26.2",
    "timestamp": "2021-07-27T15:47:12+03:00",
    "unit": "C",
    "deviceID": "4c18cd43-d6030e979443b528"
  }
]

Was this helpful?

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close