Skip to content

Monitor door state (open/closed) and push it to the website

License

Notifications You must be signed in to change notification settings

nordlab/doorstate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Doorstate

Complete rewrite of CCRX/doorstate in Rust.

Requirements

Client

Raspbian

apt-get install build-essential libssl-dev wiringpi
wget https://static.rust-lang.org/dist/rust-1.20.0-arm-unknown-linux-gnueabihf.tar.gz
tar xvf rust-1.20.0-arm-unknown-linux-gnueabihf.tar.gz
cd rust-1.11.0-arm-unknown-linux-gnueabihf
./install.sh

Mac OS X (Homebrew)

brew install rust

Gentoo

emerge dev-lang/rust dev-util/cargo

Server

Installation

Client

cd client
cargo build --release --features pi
cp target/release/doorstate .

Notes

To simulate a non-functional network connection, port 80 was blocked via IPTables:

iptables -I OUTPUT --proto tcp --dport 80 -j REJECT
ip6tables -I OUTPUT --proto tcp --dport 80 -j REJECT

Don't forget to flush the rules after testing! (iptables -F OUTPUT && ip6tables -F OUTPUT)

About

Monitor door state (open/closed) and push it to the website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published