Stiahni DOMOTICZ https://domoticz.com/downloads/ vyber 32bit STABLE (RPI3 =64bit )
Stiahni SD Formater https://www.sdcard.org/downloads/formatter_4/eula_windows/index.html
Stiahni WIN32Disk Imager https://sourceforge.net/projects/win32diskimager/
Stiahni Raspbian Jessie LITE https://www.raspberrypi.org/downloads/raspbian/
Sformátuj kartu pomocou SD Formater, nahraj systém Raspbian pomocou WIN32disk Imager.
Stiahni PUTTY https://www.putty.org/
NASTAVENIE IP ADRESY
First time startup
The default username and password are pi and raspberry
Get IP address with local access
ifconfig
sudo raspi-config
- 7 - Advanced option - A1 expand file system
- 5 Interfacing options enable - P2 SSH, P3 VNC a P7 onewire
Log in localy or by ssh. Open the network configuration file:
sudo nano /etc/network/interfaces
And change the code to your liking
i# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.58
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 66.212.63.228 66.212.48.10
Version 4834 and later (Debian Jessie)
Log in localy or by ssh. Open the network configuration file:
sudo nano /etc/dhcpcd.conf
interface eth0
static ip_address=192.168.1.4/24 # << change to an ip address in your network
static routers=192.168.1.1 # << change to your gateway
static domain_name_servers=192.168.1.1 # << change to your DNS
After closing and saving the file, issue the following commands:
sudo reboot
Maintaining and updating your system
Keep your OS up to date!
It is always good to keep your system in good shape.
This can be done by logging in local, or by ssh and issuing the following commands:
sudo apt-get update
sudo apt-get upgrade
Shutdown properly
I would like to stress out, that you do NOT turn off a system by unplugging the power cable!
This is especially NOT good for Unix systems, and will in the end result in a broken/damaged file system.
To turn off the system, login via SSH (or localy via Keyboard/Mouse/HDMI) and issue:
sudo poweroff
Zadaj príkaz stahovania domoticz na stránke domoticz.com - download sudo. atď.
* https, bez http, 443,
sudo apt-get install wiringPi
gpio readall
cd wiringPi
cd wiringPi
make static
sudo make install-static
WiringPi is maintained under GIT for ease of change tracking, however there is a Plan B if you're unable to use GIT for whatever reasons (usually your firewall will be blocking you, so do check that first!)
Note: wiringPi is NOT hosted on Github. There are many forks that you may find there, but they are not the original version maintained by myself.
To view the wiringPi sources, then go to:
https://git.drogon.net/
and select the wiringPi link.
To install...
First check that wiringPi is not already installed. In a terminal, run:
$ gpio -v
If you get something, then you have it already installed. The next step is to work out if it's installed via a standard package or from source. If you installed it from source, then you know what you're doing - carry on - but if it's installed as a package, you will need to remove the package first. To do this:
$ sudo apt-get purge wiringpi $ hash -r
Then carry on.
If you do not have GIT installed, then under any of the Debian releases (e.g. Raspbian), you can install it with:
$ sudo apt-get install git-core
If you get any errors here, make sure your Pi is up to date with the latest versions of Raspbian: (this is a good idea to do regularly, anyway)
$ sudo apt-get update $ sudo apt-get upgrade
To obtain WiringPi using GIT:
$ cd $ git clone git://git.drogon.net/wiringPi
If you have already used the clone operation for the first time, then
$ cd ~/wiringPi $ git pull origin
Will fetch an updated version then you can re-run the build script below.
To build/install there is a new simplified script:
$ cd ~/wiringPi $ ./build
The new build script will compile and install it all for you - it does use the sudo command at one point, so you may wish to inspect the script before running it.
Plan B
Click on this URL: (it should open in a new page)
https://git.drogon.net/?p=wiringPi;a=summary
Then look for the link marked snapshot at the right-hand side. You want to click on the top one.
This will download a tar.gz file with a name like wiringPi-98bcb20.tar.gz. Note that the numbers and letters after wiringPi (98bcb20 in this case) will probably be different - they're a unique identifier for each release.
You then need to do this to install:
$ cd $ tar xfz wiringPi-98bcb20.tar.gz $ cd wiringPi-98bcb20 $ ./build
Note that the actual filename will be different - you will have to check the name and adjust accordingly.
Test wiringPi's installation
run the gpio command to check the installation:
$ gpio -v $ gpio readall
That should give you some confidence that it's working OK.
WiringPi is released under the GNU Lesser Public License version 3.
sudo nano /etc/init.d/domoticz.sh
na začiatok
/usr/local/bin/gpio export 4 in
/usr/local/bin/gpio edge 4 both
/usr/local/bin/gpio export 17 in
/usr/local/bin/gpio edge 17 both
/usr/local/bin/gpio export 27 in
/usr/local/bin/gpio edge 27 both
/usr/local/bin/gpio export 22 in
/usr/local/bin/gpio edge 22 both
/usr/local/bin/gpio export 5 in
/usr/local/bin/gpio edge 5 both
/usr/local/bin/gpio export 6 in
/usr/local/bin/gpio edge 6 both
/usr/local/bin/gpio export 13 in
/usr/local/bin/gpio edge 13 both
/usr/local/bin/gpio export 19 in
/usr/local/bin/gpio edge 19 both
/usr/local/bin/gpio export 26 in
/usr/local/bin/gpio edge 26 both
/usr/local/bin/gpio export 18 in
/usr/local/bin/gpio edge 18 both
/usr/local/bin/gpio export 23 in
/usr/local/bin/gpio edge 23 both
/usr/local/bin/gpio export 24 in
/usr/local/bin/gpio edge 24 both
/usr/local/bin/gpio export 25 in
/usr/local/bin/gpio edge 25 both
/usr/local/bin/gpio export 12 in
/usr/local/bin/gpio edge 12 both
/usr/local/bin/gpio export 16 in
/usr/local/bin/gpio edge 16 both
/usr/local/bin/gpio export 20 in
/usr/local/bin/gpio edge 20 both
/usr/local/bin/gpio export 21 in
/usr/local/bin/gpio edge 21 both
Relé na spínanie
https://www.youtube.com/watch?v=HnelAz7epF8