GithubHelp home page GithubHelp logo

iamjon / pyzgan Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 442 KB

Make my electra mazgan (air conditioner) work with my pi

HTML 1.25% CSS 9.19% JavaScript 89.56%
electra-mazgan air-conditioner react reactjs nodejs express raspberry-pi

pyzgan's Introduction

pyzgan

Make my electra mazgan (air conditioner) work with my pi

Yup, another electra air conditioner repository.

ac-small

sched-small

Prerequisites:

  • Clone and set up Electra-AC-Remote and follow the instructions there
  • Set up your raspberry pi to auto connect to your network, and reserve the ip-address in your router
  • Install node on your pi. I found this guide to be very helpful.

Installation on your pi:

  • ssh into your pi
  • Clone pyzgan
  • cd pyzgan
  • nano server/.env :
PORT=server_port
NODE_ENV=not_development
DEBUG=false
PATH_TO_ELECTRA=path_to_Electra-AC-Remote_binary
  • nano client/.env :
REACT_APP_API_URL=http://your_pi_ip:server_port
PORT=client_port
  • cd client/ && npm install
  • cd .. && cd server
    • npm install
    • nano remoteSchedule.json
      • {"oneTime":[],"scheduled":[]}
    • nano remoteState.json
      • {"temp":21,"fan":1,"mode":"heat","power":true}
  • set up start scripts for the client and server
    • sudo systemctl enable pyzganclient.service
    • sudo systemctl enable pyzganserver.service

Example service files:

See here for more details

[Unit]
Description=Pyzgan Client Service
After=network.target

[Service]
ExecStart=/usr/local/bin/npm start
WorkingDirectory=your_instalation_directory/pyzgan/client
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi

[Install]
WantedBy=multi-user.target

[Unit]
Description=Pyzgan Server Service
After=network.target

[Service]
ExecStart=/usr/local/bin/npm run dev
WorkingDirectory=your_instalation_directory/pyzgan/server
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi

[Install]
WantedBy=multi-user.target    

Related Electra projects:

Related projects and guides:

pyzgan's People

Contributors

iamjon avatar

Stargazers

 avatar

pyzgan's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.