Skip to content

Instantly share code, notes, and snippets.

/**
* @return array validation rules for model attributes.
*/
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('name, value', 'safe'),
pi@adafruit ~ $ cat /etc/zabbix/zabbix_agentd.conf.d/1-wire
UserParameter=1-wire.temp,/etc/zabbix/scripts/w1-temp
pi@adafruit ~ $
pi@adafruit ~ $ sudo apt-get install zabbix-agent
pi@adafruit ~ $ cd /sys/bus/w1/devices
pi@adafruit /sys/bus/w1/devices $ ls
28-0000047a8785 w1 bus master
pi@adafruit /sys/bus/w1/devices $ cd 28-0000047a8785
pi@adafruit /sys/bus/w1/devices/28-0000047a8785 $ ls
driver id name power subsystem uevent w1_slave
pi@adafruit /sys/bus/w1/devices/28-0000047a8785 $ cat w1_slave
5e 01 4b 46 7f ff 02 10 8d : crc=8d YES
5e 01 4b 46 7f ff 02 10 8d t=21875
pi@adafruit /sys/bus/w1/devices/28-0000047a8785 $
pi@adafruit ~ $ sudo modprobe w1-gpio
pi@adafruit ~ $ sudo modprobe w1-therm
@grassroot
grassroot / interfaces
Last active December 10, 2015 09:19
My Raspberry Pi temperature logger project snippets.
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
#iface wlan0 inet dhcp
iface wlan0 inet static
address 192.168.0.5
netmask 255.255.255.0