Adding my Centurion Pro garage door to home Assistant (i have api access)

Hi, So I’m a newbie to home assistant and moved into a new place but want to add my new centurion pro door to home assistant. They have an api json control at the moment so i can enter commands to trigger the door/light etc but how would i add this into home assistant?

I have redacted the IP and api key but the code is below

Usage:
http://[IP]/api?key=[API Key]&param=value
*Replace `param=value` with actual API.

Door
Status
Get Door status in json format: status=json
http://[IP]/api?key=[API Key]&status=json
Control
Open,Stop,Close: door=[open|stop|close]
http://[IP]/api?key=[API Key]&door=open
http://[IP]/api?key=[API Key]&door=stop
http://[IP]/api?key=[API Key]&door=close
Lamp
Control
ON/OFF: lamp=[on|off]
http://[IP]/api?key=[API Key]&lamp=on
http://[IP]/api?key=[API Key]&lamp=off
Holiday mode
Control
ON/OFF: vacation=[on|off]
http://[IP]/api?key=[API Key]&vacation=on
http://[IP]/api?key=[API Key]&vacation=off
Camera stream
Stream feed:
http://[IP]:88/
Camera test

Any and all help would be appreciated, [Have also tried a GitHub custom integration someone created but no luck on that side]

Create commands using this integration:

To get the status use this:

Then use those commands and status sensor in a template cover:

You can create a similar template light entity.

And finally you can use the generic camera entity.

So im reading through and still a little confused, So i should do something this below in the yaml?

rest_command:
  garage_door_open:
    url: "http://[IP]/api?key=[API Key]&door=open"
    method: post

then using the template the example was executing the script or do i need to add a payload to the above command and reference that somewhere.

Then adding the template will add it as an entity?

Sorry, I’m trying to get my head around this

That’s a good start. Now make the other commands for close and stop.

rest_command:
  garage_door_open:
    url: "http://[IP]/api?key=[API Key]&door=open"
    method: post
  garage_door_close:
    url: "http://[IP]/api?key=[API Key]&door=close"
    method: post
  garage_door_stop:
    url: "http://[IP]/api?key=[API Key]&door=stop"
    method: post

You will also need a restful sensor for the state. I would need to see the response from http://[IP]/api?key=[API Key]&status=json to help you with that. Preferably when the door is open, closed, opening and closing.

Then there is no need for scripts, you can use the rest commands directly. e.g.

template:
  - cover:
      - name: Garage Door
        state: "{{ is_state('sensor.garage_door','open') }}"
        device_class: garage
        open_cover:
          action: rest_command.garage_door_open
        close_cover:
          action: rest_command.garage_door_close
        stop_cover:
          action: rest_command.garage_door_stop

That’s all you need for the cover entity.

Once you have that working do the same thing for the light but with a template light instead of cover. And a template switch for vacation mode.

Did you get the generic camera working?

Hi

Thanks again for the help, So the response is
{“api”:“ok”}

SO now i got the garage door to go up and stop but the down button is greyed, I do have an aircon with cover zones which may have the same cover entity, how would i go about this.

also How would i add a template for the light and vacation button

and lastly the camera i can get the stream to load in a browser but as soon as i try to add a generic camera through home assistant and click add the preview doesn’t load at all (Error starting stream, see logs for details (Stream never started) though its not appearing in the logs under settings/system/logs

Again thanks for your help, makes it alot easier