Lifx

Wi-Fi enabled LED smart lights

Go to site

Integrate the Lifx API with the MySQL API

Setup the Lifx API trigger to run a workflow which integrates with the MySQL API. Pipedream's integration platform allows you to integrate Lifx and MySQL remarkably fast. Free for developers.

Connect Lifx

return await require("@pipedreamhq/platform").axios(this, {
  url: `https://api.lifx.com/v1/lights/all`,
  headers: {
    Authorization: `Bearer ${auths.lifx.oauth_access_token}`,
  },
})

Connect MySQL

const mysql = require('mysql2/promise');

const { host, port, username, password, database } = auths.mysql

const connection = await mysql.createConnection({
  host,
  port,
  user: username,
  password,
  database,
});

const [rows, fields] = await connection.execute('SELECT NOW()');
console.log(rows)