ali123abc / ali123abc.github.io

Front End Dashboard to manage & Control Home Automation
0 stars 0 forks source link

Setup Logitech Smart Devices API & Configure Page #1

Open ali123abc opened 1 year ago

ali123abc commented 1 year ago
  1. Install Logitech G HUB software
  2. Enable the API in the settings of the Logitech G HUB software
  3. Create an application and obtain a Client ID and client secret for your web application from the Logitech Developer Portal at https://developer.logitech.com
  4. Use a library like axios to authenticate your web application with the Logitech G HUB API and obtain an authorization token
  5. Create API calls

EXAMPLE:

To get the battery level of a wireless device use the following command: axios.get("https://api.g-hub.io/graphql?authorization-<your_access_token>" { params: { query: { wirelessDevices { batterLevel } } } }).then(res => { console.log(res); });

ali123abc commented 1 year ago

Might have to park this one, It looks a little more complicated than I first thought.