Linux Format

Garden in Motion

-

First off, let’s dive into the setup and details of plant monitoring. To do so, we simply install Motion using this command: sudo apt install motion

After Motion is installed, we need to edit the file /etc/motion/motion.conf. After it’s opened in our usual favourite editor, we just need to change the odd word, such as swapping ‘on’ to ‘off’.

Although the ordering of the lines is spread throughout the file, the listing below shows what these lines should be. If we use the Vim editor, we can use the forward slash and word followed by pressing Enter to find the appropriat­e line that contains the desired words(s). ( orwithanyo­ther sensible editorCtrl+ f–Ed) daemon on width 640 height 480 framerate 5 ffm peg_ output_ movies on snapshot_ interval 60 stream_ localhost off web control_ local host off vi /etc/default/motion start_ motion_ daemon= yes Asides from that, let’s make sure it starts automatica­lly on reboot: update-rc.d motion enable

The next step is to add an Apache web server and PHP; if none exist on our Pi. PHP will be used if we send files to a remote server and for the simple script used to monitor the watering.

During installati­on, make sure to type Y and press Enter to ensure the installati­ons occur. sudo apt-get update sudo apt-get install apache2 sudo apt-get install php7.0 php-pear libapache2­mod-php7.0 php7.0-mysql sudo apt-get install php7.0-curl php7.0-json php7.0-cgi

Now, if we reboot the Pi and open the Pi network address like 192.168.1.777:8000, we should see the live stream.

Newspapers in English

Newspapers from Australia