Skip to content
/ pyzgan Public

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

Notifications You must be signed in to change notification settings

iamjon/pyzgan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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:

Releases

No releases published

Packages

No packages published