1

In IoT Central we have a command as toggle_bulb where it accepts json object of mac and on_off value as follows:

{'mac': <mac address>', 'on_off': '0'}

when we run the command manually from dashboard we are receiving the request.payload value in the backend application.

But we have created a rule to execute the command using logic app action

enter image description here

payload parameter is defined as shown below for raw input

enter image description here

when the rule gets fired, we are receiving the method request but not receiving the payload in the backend application.

logs are as follows

iotcentral: Received call for bulb_state
iotcentral.py: toggle_bulb_command: iotcentral: request payload: {}

Please help me how to send json object to back end application when using iot central connector in logic app for executing a command

1 Answers1

2

When the request format isn't correct, it isn't received correctly by the device. Right now you are using this as the payload in your Logic App

{
    "mac": "00:17:88:01:06:3a:ec:bf",
    "on_off": "0"
}

Try using:

{
    "request": {
            "mac": "00:17:88:01:06:3a:ec:bf",
            "on_off": "0"
    }
}
Matthijs van der Veer
  • 3,865
  • 2
  • 12
  • 22