I've successfully implemented esp8266 mqtt example found here. My device is connecting and sending data to Azure IOT and then processed using a function. In the example it defines multiple actions using WITH_ACTION
. Is there any documentation or examples on how to call these actions? I'm currently working off a mac and would prefer to call these actions from a java application if possible.
Asked
Active
Viewed 222 times
-1
1 Answers
0
These actions are implement as direct methods on device. You can call these Direct Method to the device from service back end like this tutorial does:
Set method name and optional parameter. For your esp8266 sample you can set like this:
// Name of direct method and payload.
public static final String methodName = "SetAirResistance";
public static final int payload = 10; // Number of seconds for telemetry interval.

Rita Han
- 9,574
- 1
- 11
- 24
-
Would I need the payload to be a ContosoAnemometer in this case? – Jim Jun 01 '18 at 11:37
-
@Jim No need a ContosoAnemometer. Just parameters for the function(if it has) like what I set in my answer. – Rita Han Jun 04 '18 at 05:42
-
@Jim Do you have any problem about this issue? – Rita Han Jun 20 '18 at 05:48