DanielOgorchock / OmniThing

OmniThing turns your ESP32, ESP8266, Raspberry Pi, Linux Computer, or Windows Computer into a SmartThings composite Device. It is being developed as a cross-platform successor to ST_Anything.
GNU General Public License v3.0
64 stars 16 forks source link

CommandReturnCode for TemperatureMeasurement? #10

Closed gilhaz closed 5 years ago

gilhaz commented 5 years ago

First, Your work is art! Thank you.

I wanted to use the TemperatureMeasurement device to monitor my RaspberryPi CPU temperature by running a script, something like this:

#!/bin/bash
CPU_TEMP=$(</sys/class/thermal/thermal_zone0/temp)
echo "$((CPU_TEMP/1000))"

But I don't see the CommandReturnCode as an input option, only InputFloatRef.

will CommandReturnCode be available in the future for TemperatureMeasurement device?

Thanks, Gil :)

DanielOgorchock commented 5 years ago

I just released v0.7.0 which adds the CommandParser InputFloat type. It attempts to parse stdout of the command you give it for a float.

gilhaz commented 5 years ago

Thank you for your fast response! Works perfectly! 🥇