Send the current temperature of a city to a Cisco Spark room every morning

  1. Set up ‘Clock’ trigger

    Configure the 'Start' icon. Drag and drop 'Clock' in the given box. Enter value in the fields as per the instructions given below.

    Trigger name: Enter a suitable name for the trigger.

    Trigger type: Select 'Repeat from' option from the drop-down list. This instructs the trigger to repeat at regular intervals, starting from the specified date and time.

    Date: Enter the date from which you wish to start the repeat trigger.

    Time: Enter the time from which you wish to start the repeat trigger.

    Timezone: Select the timezone for the trigger start time.

    Runs on every: Select the trigger interval. The trigger will be fired off every time after the interval specified here. Since we need to get the temperature every day, select '1 Day' from the drop-down list.

    trigger

    Once you have entered all the details, save the trigger and click 'Done'. This will take you back to canvas.

  2. Add and configure Weather Underground ‘Get Weather Condition’ activity

    Add Weather Underground ‘Get Weather Condition’ activity to the canvas. Connect this activity with the ‘Start’ icon (which now displays ‘Clock’ icon), and configure it.

    On the configuration page, you will notice a few fields. Enter values in the fields as per the instructions given below.

    Weather underground connection: In order to use this activity, you will have to first create a connection. Select 'Add new' , and fill in the required details. If you have already created a connection, select it from the drop-down list.

    State: Enter the name of the state.

    City: Enter the name of the city of which you wish to get the temperature.

    weather

    Once you have entered these details, click on 'Done'. This will take you back to canvas.

  3. Add and configure Cisco Spark ‘Post New Message’ activity

    Add Cisco Spark ‘Post New Message’ activity to your canvas, and connect it with the previous activity. Configure this activity and enter value in the fields as per the instructions given below.

    Authorize Cisco Spark: In order to use this activity, you will have to first create an access token. Select 'Add new', and fill in the required details. If you have already created a token, select it from the drop-down list.

    Room ID: Select/specify the ID or name of the room to which you wish to post the message. Clicking the ‘Refresh’ icon will fetch the list of all rooms of your Cisco Spark account—based on the access token selected—and display it in the drop-down list. You can then select the ID or name of the room. Alternatively, you can enter the room ID or room name manually.

    Message: Add the {{$a3.current_observation.temperature_string}} key listed under 'Current Observation' output on the right hand side of the configuration window as an input for this field.

    spark

    Once you have entered all the details, click on 'Done' to return to canvas. Connect this activity to ‘Stop’ and 'Save' the flow. Now, everyday at the defined time, this flow will be triggered. As a result, it will fetch the current temperature of the city, and send it to the specified Cisco Spark room.

    output