USB Temperature Sensor Script (RDing TEMPer1F_V1.3)

Moderator: leecollings

Post Reply
knotty
Posts: 5
Joined: Wednesday 27 May 2015 16:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

USB Temperature Sensor Script (RDing TEMPer1F_V1.3)

Post by knotty »

Hi,

I'm hoping someone can help me. I've got a USB temperature sensor (RDing TEMPer1F_V1.3) attached to my Pi which runs Domoticz. I've got a script in the OS which when run provides the date/time and temperature.

root@raspberrypi:~# pcsensor
2016/10/13 09:03:16 Temperature 81.95F 27.75C
root@raspberrypi:~#

Can someone help me get this data into Domoticz please? Thanks.

Regards,
Paul.
Sappien
Posts: 114
Joined: Saturday 24 August 2013 9:59
Target OS: Linux
Domoticz version: beta
Contact:

Re: USB Temperature Sensor Script (RDing TEMPer1F_V1.3)

Post by Sappien »

Simple example

Code: Select all

#!/bin/bash

## Change Settings below ##

DOMOTICZ=127.0.0.1:8080
IDXTEMP=100
USBPRG=`/root/pcsensor`

###########################

TEMP=`echo $USBPRG | cut -d' ' -f5 | tr -d C`

echo $TEMP

curl -s "http://$DOMOTICZ/json.htm?type=command&param=udevice&idx=$IDXTEMP&nvalue=0&svalue=$TEMP"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest