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.
USB Temperature Sensor Script (RDing TEMPer1F_V1.3)
Moderator: leecollings
-
- 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)
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¶m=udevice&idx=$IDXTEMP&nvalue=0&svalue=$TEMP"
Who is online
Users browsing this forum: No registered users and 1 guest