Broadlink S3 Hub REST API

Broadlink S3 Hub REST API

Feb 07, 2022

REST interface for the Broadlink S3 hub - support for device ID 0xa64d:("S3", "Broadlink")

Initialise hub with the first request

http://127.0.0.1:5000/?hub=192.168.1.99

Get the state of a sub device where: @app.route("/<did>",methods = ['GET'])

http://127.0.0.1:5000/00000000000000000000a043b0d0783a

Toggle sub devices /gangs using the dynamic URL. Where: @app.route("/<did>/<gang>",methods = ['POST', 'GET']). (currently only switches supported, smart buttons might work)

http://127.0.0.1:5000/00000000000000000000a043b0d0783a/1

Can be used to set up restful switches in home assistant:

switch:
    - platform: rest
      resource: http://192.168.1.162:8124/00000000000000000000a043b0d0783a/1
      body_on: '{"active": "true"}'
      body_off: '{"active": "false"}'
      is_on_template: "{{ value_json.is_active }}"

image

https://github.com/stevendodd/python-broadlink/tree/Add_S3_REST_API

https://community.home-assistant.io/t/broadlink-s3-hub-support/319832/14?u=stevendodd

https://hub.docker.com/r/stevendodd/s3-rest-api

Vous aimez cette publication ?

Achetez un café à Steven Dodd