Trigger sensor reading

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

Trigger sensor reading

#1 Post by waspie » 26 Jul 2018, 13:46

Is there a way to trigger a sensor reading besides just the time parameter in the device settings?

Say I'd like a switch that changes position to force an ultrasonic sensor to take a reading outside its regular 60 second timing.
Is that possible?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Trigger sensor reading

#2 Post by grovkillen » 26 Jul 2018, 13:54

Yes you do a rule for that and trigger another task using TaskRun. Or you can just publish the current value when the switch is triggered. But you need to use rules either way.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

Re: Trigger sensor reading

#3 Post by waspie » 26 Jul 2018, 14:01

grovkillen wrote: 26 Jul 2018, 13:54 Yes you do a rule for that and trigger another task using TaskRun. Or you can just publish the current value when the switch is triggered. But you need to use rules either way.
Yeah republish won't fit. If a switch changes it likely means the reading will change.

taskrun...thanks, that'll probably be it then

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests