Close

mqtt - because reasons

A project log for Heimdall - dumb remote home

It's not smart. It's a raspberry pi I can ssh into. With a fancy mac inspired case.

davedarkodavedarko 06/02/2015 at 20:000 Comments
sudo apt-get install mosquitto mosquitto-clients

sudo apt-get install apache2 php5 libapache2-mod-php5 -y

It's time I work myself into it. Here's a little bash script, that I've added to my cronjob list for logging the temperature of the raspberry. I should use something similar for the current sensor (ACS712 5A) that I have to read out. It's 5V and I might dedicate an arduino over USB for reading that and maybe talk to the neopixels as well. I still have to tweak the output of the temperature script. This should be on an SD card somewhere... dammit.

#!/bin/bash
TEMP=$(vcgencmd measure_temp)
echo $TEMP
mosquitto_pub -t sensors/temperature -m $TEMP -q 1

Also for web inclusion:

sudo usermod -G video www-data
sudo /etc/init.d/apache2 restart

Discussions