Need help on piston with time variable


#1

I am setting up my first piston, and am not succeeding.

I am using a samsung multi sensor acceleration detector to alert when toilet fills. Acceleration is detected when ballcock valve activates to fill tank. If the duration of acceleration active time is less than one minute, it indicates a short fill cycle, which I will interpret as a leaking flapper seal. I want to set up my piston to send sms messsage if this short fill cycle occurs.

I cannot get the sms alert to happen. I am probably missing something obvious, since I am new to Webcore.

The ST log does not indicate any change of state of the acceleration sensor, and I don’t know why.
I know the sensor shows state change in the things page of app.
I hope someone here can help with my piston design.
Thanks in advance for any advice.


#2

Your $minute is the minutes of the current hour. If it is 9:45, then $minute=45.


#3

Also, with the ST multi sensor, I would use “orientation” instead of acceleration if the flapper’s arm pivots over 45 degrees.


#4

Your statement about the minute shows me I don’t know how to set this up. I want to measure the active time of the device, then compare it to 1 minute. If it is 1 or less, trigger the notification. More than 1 minute, ignore.
Thanks for commenting.


#5

In this application, I am measuring the vibration of the flow valve, not the angle of the flapper. The theory is if the flapper seal is weak, it will drain down the tank slightly until the float causes the valve to turn on again briefly to bring the water level back up to full. A full refill from a flush will take 2 minutes or more. I have the multi sensor stuck to the top of the ballcock valve, so it can detect vibration when water floes through it.


#6

What would be the proper code to replace what I have for the time variable?


#7

I do not have that particular sensor so options will vary. My initial thought is that you could -

IF contact sensor 1 changes to VIBRATION
Then
     Wait 1 minute
IF contact sensor 1 is VIBRATION
Then
     Send SMS
End

One problem here is that I do not know the reset time of the vibration sensor. How long does it take for the sensor to reset to normal once vibration stops? Also, if the sensor changes its state during the 1 minute wait, then the piston will restart from the beginning, possibly without sending the SMS. Others here may have something more to add.


#8

Totally off topic, but I just want to commend @garhun for trying to get a Smart toilet up and running…
(This is the first time I have seen anyone attempt this)

For what it’s worth, the batteries in my samsung multi sensors typically last about 3 months… meaning I expect you’ll have to change your batteries 15-20 times before your flapper goes bad.
(potentially spending ten times more on batteries than the cost of a new flapper)

I am not trying to discourage you… .Just giving you a heads up in how much time & money you may be investing before you actually see your first benefit years down the road.

(if a leaking toilet is common in your household, please disregard this post)


#9

I currently have 6 of the Samsung multi sensors. The first one I got, I had to change the battery after 1 month.

After that, the sensor has been up and running for 9 months now. And the 5 I bought after that are fine also.


#10

It’s probably my fault… I buy my batteries in packs of 50 or more to save money in the long run. (currently averaging about a dollar per device per year, which isn’t too bad considering their daily use)


#11

I guess you could call it my “Head Start Program”:grin:.


#12

Thanks. I"ll try that out.