@ -384,6 +384,8 @@ For now, you won't be updating your server code. Instead you can use the Azure C
The time values in the annotations are in [UNIX time](https://wikipedia.org/wiki/Unix_time), representing the number of seconds since midnight on 1<sup>st</sup> January 1970.
Exit the event monitor when you are done.
### Task - control your IoT device
You can also use the Azure CLI to call direct methods on your IoT device.
@ -311,7 +311,7 @@ This will create a folder inside the `soil-moisture-trigger` folder called `iot-
* `"type": "eventHubTrigger"` - this tells the function it needs to listen to events from an Event Hub
* `"name": "events"` - this is the parameter name to use for the Event Hub events. This matches the parameter name in the `main` function in the Python code.
* `"direction": "in",` - this is an input binding, the data from the event hub comes into the function
* `"direction": "in"` - this is an input binding, the data from the event hub comes into the function
* `"connection": ""` - this defines the name of the setting to read the connection string from. When running locally, this will read this setting from the `local.settings.json` file.
> 💁 The connection string cannot be stored in the `function.json` file, it has to be read from the settings. This is to stop you accidentally exposing your connection string.
@ -326,6 +326,10 @@ This will create a folder inside the `soil-moisture-trigger` folder called `iot-
### Task - run the event trigger
1. Make sure you are not running the IoT Hub event monitor. If this is running at the same time as the functions app, the functions app will not be able to connect and consume events.
> 💁 Multiple apps can connect to the IoT Hub endpoints using different *consumer groups*. These are covered in a later lesson.
1. To run the Functions app, run the following command from the VS Code terminal
@ -324,6 +324,8 @@ When you create an IoT Hub, you get the `$Default` consumer group created by def
geofence gps-sensor
```
> 💁 When you ran the IoT Hub event monitor in an earlier lesson, it connected to the `$Default` consumer group. This was why you can't run the event monitor and an event trigger. If you want to run both, then you can use other consumer groups for all your function apps, and keep `$Default` for the event monitor.
### Task - create a new IoT Hub trigger
1. Add a new IoT Hub event trigger to your `gps-trigger` function app that you created in an earlier lesson. Call this function `geofence-trigger`.