Pre-installed application - preparation for dispatching values to Cumulocity
The values obtained from the sensor and the count can also be sent to a Cumulocity Cloud platform. Three messages for the dispatch of the temperature, humidity and counter values are configured for this. In order to send the values to your Cumulocity Cloud platform, you only need to configure your Cumulocity server before (see here). An event that is regularly triggered by an interval timer will dispatch the messages. Another event sends the temperature value with each change of the temperature.
Configuration of the messages
Menu Messages → Cumulocity → edit c8yMsg1 - Push_Temperature ()
This message transmits the flag flag1, which contains the temperature value (refer to Converting the sensor values), to your Cumulocity server.
Menu Messages → Cumulocity → edit c8yMsg1 - Push_Humidity ()
This message transmits the flag flag2, which contains the humidity value (refer to Converting the sensor values), to your Cumulocity server.
Menu Messages → Cumulocity → edit c8yMsg1 - Push_Counter ()
This message transmits the flag flag3, which contains the count, to your Cumulocity server.
Configuration of the message dispatch
The following events are disabled in the default configuration and must first be activated manually to be able to trigger a message dispatch. To do this, activate in the menu Events the checkbox active in front of the respective event. |
Menu Data points → Timer → edit Send_Interval ()
A timer of the type Interval is added here, which expires (triggers) every five minutes.
Menu Events → edit Push_Temperature_Event_Cumulocity ()
An event is added here, which triggers an action with each expiry of the timer timer1 - Send_Interval, which sends the message c8yMsg1 - Push_Temperature_Cumulocity.
Menu Events → edit Push_Humidity_Event_Cumulocity ()
An event is added here, which triggers an action with each expiry of the timer timer1 - Send_Interval, which sends the message c8yMsg2 - Push_Humidity_Cumulocity.
Menu Events → edit Push_Counter_Event_Cumulocity ()
An event is added here, which triggers an action with each expiry of the timer timer1 - Send_Interval, which sends the message c8yMsg3 - Push_Counter_Cumulocity.
Menu Events → edit Push_Temperature_Change_Event_Cumulocity ()
An event is added here, which triggers an action with each change of the analogue data point flag1 - Temperature, which sends the message c8yMsg1 - Push_Temperature_Cumulocity.