dht seperating values

Moderator: leecollings

Post Reply
markjgabb
Posts: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

dht seperating values

Post 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
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: dht seperating values

Post 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])
The most dangerous phrase in any language is:
"We always done this way"
markjgabb
Posts: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: dht seperating values

Post 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
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest