Examples of Python Client for ONVIF Camera
pi@gc16:~ $ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from onvif import ONVIFCamera
# refer to http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=2565 | |
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="1000", RUN+="/usr/sbin/usb_modeswitch -W -v 05c6 -p 1000 -K" |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Welcome to nginx on Debian!</title> | |
<style> | |
body { | |
width: 35em; | |
margin: 0 auto; | |
font-family: Tahoma, Verdana, Arial, sans-serif; | |
} |
# NTFS | |
sudo apt-get install fuse ntfs-3g | |
# usb automount | |
# | |
# http://raspberrypi.stackexchange.com/questions/41959/automount-various-usb-stick-file-systems-on-jessie-lite | |
sudo apt-get install usbmount | |
sudo sed -i 's|FILESYSTEMS="vfat ext2|FILESYSTEMS="vfat ntfs fuseblk ext2|g' /etc/usbmount/usbmount.conf | |
sudo sed -i 's|FS_MOUNTOPTIONS=""|FS_MOUNTOPTIONS="-fstype=ntfs-3g,nls=utf8,umask=007,gid=46 -fstype=fuseblk,nls=utf8,umask=007,gid=46 -fstype=vfat,gid=1000,uid=1000,umask=007"|g' /etc/usbmount/usbmount.conf |
# http://eleparts.co.kr/data/design/product_file/SENSOR/gas/MH-Z19_CO2%20Manual%20V2.pdf | |
# http://qiita.com/UedaTakeyuki/items/c5226960a7328155635f | |
import serial | |
import time | |
def mh_z19(): | |
ser = serial.Serial('/dev/ttyAMA0', | |
baudrate=9600, | |
bytesize=serial.EIGHTBITS, | |
parity=serial.PARITY_NONE, |
# coding: utf8 | |
import RPi.GPIO as GPIO | |
import time | |
class GPIO_Edge_Timeout(Exception): | |
pass | |
CYCLE_START_HIGHT_TIME = 2 | |
GPIO.setmode(GPIO.BCM) |
# -*- coding: utf-8 -*- | |
""" | |
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic | |
Made available under GNU GENERAL PUBLIC LICENSE | |
# Modified Python I2C library for Raspberry Pi | |
# as found on http://www.recantha.co.uk/blog/?p=4849 | |
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library | |
# added bits and pieces from various sources | |
# By DenisFromHR (Denis Pleic) |
# reference: http://www.limemo.net/blog/2013/12/ラズベリーパイを使ってみる-windows-vista以降で使えるフ.html | |
sudo apt-get install exfat-fuse exfat-utils | |
# format | |
#mkfs.exfat /dev/(デバイス名) | |
# mount | |
# sudo mount -t exfat /dev/(デバイス名) /mnt/hoge |
# reference: http://stackoverflow.com/questions/31230133/how-to-make-a-raspberry-pi-2-laravel-5-1-server | |
apt-get install mysql-server mysql-client apache2 php5 php5-cli libapache2-mod-php5 php5-mysql php5-curl php5-gd php-pear php5-imagick php5-mcrypt php5-memcache php5-mhash php5-sqlite php5-xmlrpc php5-xsl php5-json php5-dev libpcre3-dev | |
sudo curl -sS https://getcomposer.org/installer | sudo php5 | |
# create project | |
#composer.phar create-project laravel/laravel --prefer-dist projectName | |
#sudo chown -R www-data:www-data /var/www/ | |
#sudo chmod -R 775 projectName |
https://stackoverflow.com/questions/37495375/python-pip-install-throws-typeerror-unsupported-operand-types-for-retry | |
apt-get remove python-pip python3-pip | |
wget https://bootstrap.pypa.io/get-pip.py | |
sudo python get-pip.py | |
sudo python3 get-pip.py |
pi@gc16:~ $ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from onvif import ONVIFCamera