Page 1 of 1

dht seperating values

Posted: Thursday 23 March 2017 13:01
by markjgabb
hi guys

i have a mysensors with a dht sensor with combined temp and humidity...but im unsure how to use that value

it appears as 17;77

so if i want to do something temp only related say if temp is above 25, how could i do it...i mostly use blocky at this stage....
but in any method im not sure how to seperate this value

Re: dht seperating values

Posted: Thursday 23 March 2017 14:09
by emme
for a similar problem with a Temp/Humidity 433 device (for which the otherdevice_temerature does not work) I used this in LUA:

tbTempHum = otherdevices['TEMP_Bagnetto']

Code: Select all

for w in (tbTempHum..';'):gmatch('([^;]*);') do table.insert(tbVals, w) end
print(tbVals[1]..' '..tbVals[2])

Re: dht seperating values

Posted: Thursday 23 March 2017 21:51
by markjgabb
Cheers for that.... I'm only just learning lua at the moment. Cam anyone describe to me what exactly that does in the background and foreground