Skip to content

Momijinn/SmartPlug_WebApp

Repository files navigation

SmartPlug_WebApp

Control the Smart Plug(HS105) with Web Application.

Description

Demo

Click below image. thumbnail

Usage

※ Before start a Web App, Connect a Smart Plug(HS105) to Network and Set the IFTTT.
(c.f.) https://www.autumn-color.com/?p=2420

  1. Rewrite WebHooks API in the config.js to your WebHooks API.
const config = {
  API: "YOUR_WEBHOOKS_API" // Please rewrite.
}

module.exports = config;
  1. Rewrite two post url(on/off) in webpack.config.js.
proxy: {
  "/plug_on": {
    target: 'https://maker.ifttt.com/trigger/smartPlug_ON/with/key/' + config.API, // Please rewrite {smartPlug_ON}
    pathRewrite: { '^/plug_on': '' },
    secure: false,
    changeOrigin: true
  },
  "/plug_off": {
    target: 'https://maker.ifttt.com/trigger/smartPlug_OFF/with/key/' + config.API, // Please rewrite {smartPlug_OFF}
    pathRewrite: { '^/plug_off': '' },
    secure: false,
    changeOrigin: true
  },
  1. yarn install
  2. yarn start

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published