/aprstemper

App to log the current temperature from a Temper1 sensor and send it over APRS

Primary LanguageC

A command line sensor logger for Temper1 devices. It turns the output data into APRS telemetry frames ready to be sent over APRS.
To be used with APRX new exec beacon format.

Uses pcsensor.c by Michitaka Ohno, Juan Carlos Perez and Robert Kavaler
https://github.com/elpeo/rbtemper
https://github.com/bitplane/temper

Install intructions (Debian / Ubuntu)
=====================================

1. Install libusb-0.1.4 and dev package, plus build-essential 

    sudo apt-get install build-essential libusb-0.1.4 libusb-0.1.4-dev

2. Compile:

    make

3. Install:

    sudo make install

4. Uninstall

    sudo make uninstall


Usage instructions
==================

- Prior first use edit the callsign file and put your own callsign there. Must match the src callsign configured for the beacon in APRX but must be different from the $mycall APRX callsign.

Here a sample of the beacon I am using. $mycall is set to F4FXL-1, therefore to not conflict with APRX's built in telemetry we need to use another callsign.
<beacon>
	beaconmode both
	cycle-size 40m
	beacon interface $mycall srccall F4FXL-2 $myloc symbol "IA" comment "Station Temp" via WIDE2-1
	beacon interface $mycall srccall F4FXL-2 exec "/home/pi/aprstemper/aprstemper_labels"
	beacon interface $mycall srccall F4FXL-2 exec "/home/pi/aprstemper/aprstemper_eq"
	beacon interface $mycall srccall F4FXL-2 exec "/home/pi/aprstemper/aprstemper_units"
</beacon>

<beacon>
	beaconmode both
	cycle-size 5m
	beacon interface $mycall srccall F4FXL-2 exec "/home/pi/aprstemper/aprstemper_telem"
	beacon interface $mycall srccall F4FXL-2 exec "/home/pi/aprstemper/aprstemper_status"
</beacon>


To allow non-root users access
==============================

1. Add the udev rule set in /etc/udev/rules.d/ using the 60-temper.rules i.e.: copy the 60-temper.rules file to /etc/udev/rules.d/

2. Add a 'temper' group (using groupadd or edit the /etc/group file)

3. Add users to the 'temper' group

4. Reload the udev rules 

    sudo udevadm control --reload-rules

5. Unplug and replug the TEMPer device, if you still have no access to your device reboot your computer.