Skip to content

Integrating ShellyPlug smart plug using customapi. How are query params listed in the services(dot)yaml file? #4758

Closed Answered by IrishMarty10
IrishMarty10 asked this question in Support
Discussion options

You must be logged in to vote

Solved. I needed to pass through the Content-Type headers. So my services.yaml now looks like this:

 - ShellyPlug:
      icon:
      href: https://control.shelly.cloud
      description: Dell Optiplex
      siteMonitor: https://control.shelly.cloud
      statusStyle: dot
      widget:
        type: customapi
        url: https://shelly-160-eu.shelly.cloud/device/status
        refreshInterval: 5000
        method: POST
        headers:
          Content-Type: application/x-www-form-urlencoded
        requestBody: "id=REDACTED&auth_key=REDACTED"
        display:
        mappings:
          - field:
              data: 
                device_status:
                  "switch:0": apower
   …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by IrishMarty10
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant