Camect Connector
This flask API uses the camect-py python library and allows your Camect device to interact with Hubitat.
Installation (manual)
- Install camect-py, requests, json
# pip3 install camect-py # pip3 install requests # pip3 install json
- You'll need to then navigate to https://local.home.camect.com and accept the Terms of Service. You'll end up on your local server and the name will be xxxxxx.l.home.camect.com. This beginning part is considered your Camect Code.
- You'll then need to determine your username and password - the username in the default case is admin and the password is the first part of your email address that you used to register your camect device - for instance, bob@gmail.com would give you the password "bob".
- Install Camect Hubitat code, fill in your above information and enable OAUTH. You'll need to copy your OAUTH URL and use it in step 4.
- Replace these variables within camect_connector.py
- Change directory in the .service file to match where your camect-connect.py file is.
- Copy service file to /lib/systemd/system/ then enable it.
# systemctl daemon-reload # systemctl enable camect-connector.service # systemctl start camect-connector.service
Installation (Docker)
- Grab the Dockerfile via wget and put it in a directory on your Docker server. Then run the commands below from that directory subbing in the variables from above.
# docker build -t camect-connector --build-arg USERNAME='admin' --build-arg PASSWORD='your_password' --build-arg CAMECTCODE='a1b2xxxx' --build-arg HUBITATOAUTH='http://192.168.x.x/apps/api/258/camect/?access_token=abc24323-13526236-23626-xxxxxxx' .
Don't forget your dot at the end- Run your newly created image:
# docker run -d --restart unless-stopped --name camect-connector -t camect-connector
- That's it. If you need to troubleshoot your docker image, you can get into
it via:
# docker exec -it camect-connector /bin/bash
or# docker run -it camect-connector /bin/bash
and then poke around and see what the issue is.
Hubitat
- Install Camect Hubitat code and See here.
Bugs/Contact Info
Bug me on Twitter at @brianwilson or email me here.