Formula Rules

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
isva
New user
Posts: 2
Joined: 16 Jan 2017, 22:12

Formula Rules

#1 Post by isva » 16 Jan 2017, 22:33

Hello,

I would like to make a formula: My sensor post 8 cm HC-sr-04. I would like to calculate a volume. 8*(100*100).

Someone has an idea?

Thank you for the coperation

Best regards Vinc

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Formula Rules

#2 Post by toffel969 » 12 Feb 2017, 16:32

isva wrote:Hello,

I would like to make a formula: My sensor post 8 cm HC-sr-04. I would like to calculate a volume. 8*(100*100).

Someone has an idea?

Thank you for the coperation

Best regards Vinc
try to activate the formula option in the hc sr 04 ino . you will have to compile.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

isva
New user
Posts: 2
Joined: 16 Jan 2017, 22:12

Re: Formula Rules

#3 Post by isva » 26 Apr 2017, 21:23

Hello,

Wehre can I compile?

Do you have an example for the formula?

Thank you

Best regards

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Formula Rules

#4 Post by toffel969 » 28 Apr 2017, 16:52

isva wrote: 26 Apr 2017, 21:23 Hello,

Wehre can I compile?

Do you have an example for the formula?

Thank you

Best regards
In order to compile, you have to download the source files, modify them and then compile them in the ArduinoIDE. There is a tutorial in the wiki

There is however a simpler solution to your problem; rules :-

1. Activate rules under the advanced tab
2. Create a dummy device with value name Volume (for example as task 2)
3. Under rules tab enter the following code

Code: Select all

On US#distance do 		//whenever there is a Ultrasonic distance measurement do:
Taskvalueset 2,1,[US#distance]*100*100		// use  the value obtained by ultrasoundsensor, do your calculation and write it to the dummy
Endon
That should be all
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

Post Reply

Who is online

Users browsing this forum: No registered users and 66 guests