Dryer Sensor Temperature _Noob Here


#1

I am seeking assistance with creating a piston in webcore that uses a fabrio sensor for temperature to alert when a dryer is done.

With the sensor I would like it to detect the current temperature, and if the temperature goes up by 10 degrees the dryer is running, should it drop 6+ degrees the dryer has stopped and pushes a notification that the dryer is complete.

I tried using this piston, but I receive this error in the log.

Logs

1/2/2020, 7:04:43 PM +518ms
+96ms ║An error occurred while executing the event: java.lang.NullPointerException: Cannot get property ‘v’ on null object
1/2/2020, 6:49:47 PM +216ms
+77ms ║An error occurred while executing the event: java.lang.NullPointerException: Cannot get property ‘v’ on null object
1/2/2020, 6:34:50 PM +779ms
+110ms ║An error occurred while executing the event: java.lang.NullPointerException: Cannot get property ‘v’ on null object
1/2/2020, 6:19:54 PM +334ms
+111ms ║An error occurred while executing the event: java.lang.NullPointerException: Cannot get property ‘v’ on null object
1/2/2020, 6:04:55 PM +598ms
+101ms ║An error occurred while executing the event: java.lang.NullPointerException: Cannot get property ‘v’ on null object
1/2/2020, 5:51:11 PM +728ms
+508ms ║An error occurred while executing the event: java.lang.NullPointerException: Cannot get property ‘v’ on null object

Any help would be appreciated.


#2

I would make all three variables local… My logic is twofold:

(1) This piston notices global changes when it begins execution… (not during or between).

(2) Global updates are not written until after the piston completes…

In other words, using globals in this format will always reference old data. Using local variables will keep the numbers current, and will update as soon as the line is processed.


There is more advice to give with this, but I am walking out the door now…


#3

Thanks. How would the Piston be written?

Thanks again.


#4

I would recommend doing a load, and look at what the temperature gets to, say, every 5-10 minutes. Try to get a baseline temperature to work from, instead of doing guesswork with previous variables. If the dryer hits, say, 80 degrees, then set your piston to notify you when the temp rises above 75 (for some wiggle room), and drops below 75.

I would say, however, that using temperature might be hit or miss. Where on the dryer are you putting the sensor? You might want to look for a sensor or smartplug that measures how much electricity the dryer is using. That would have much higher jumps in numbers, and therefore easier to detect. Here’s one for $15. A lot of people on this forum use Peanuts (I have one, but haven’t used it in awhile.)
https://www.amazon.com/dp/B00TC9NC82/ref=sspa_dk_detail_5?psc=1&pd_rd_i=B00TC9NC82&pd_rd_w=3x2jM&pf_rd_p=c83c55b0-5d97-454a-a592-a891098a9709&pd_rd_wg=eD1dS&pf_rd_r=MK6JJKYHE1E279S3WY87&pd_rd_r=59425d2c-4fce-4d25-9f23-10a636cfacd5&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzNDFNM041RTVWVk1DJmVuY3J5cHRlZElkPUEwNDY2NTg2WUM0VlhPSzBTUDM3JmVuY3J5cHRlZEFkSWQ9QTA0NjE3MjM1SEREUko2TjVBVUMmd2lkZ2V0TmFtZT1zcF9kZXRhaWxfdGhlbWF0aWMmYWN0aW9uPWNsaWNrUmVkaXJlY3QmZG9Ob3RMb2dDbGljaz10cnVl#customerReviews


#5

Hi the dryer is electric, so 220v. Which is why I’m trying to use temperature.


#6

I have a temp sensor taped to the side of the dryer and it works great. Basically, if the temp is above a certain threshold and then drops, you know it’s cooling down. I find it extremely accurate even when doing load after load. 4 loads back to back:

Here’s my piston based on temp. Unlike WCmore’s suggestion, I DO use a global variable because I have a second piston for washer announcements that I don’t execute unless the dryer is also not running. No point in knowing the washer is done when the dryer is still running. Lot’s of extraneous stuff in here because I log the announcements as annotations in Grafana as seen above. And I make different announcements to different speakers depending on time of day. But you can pick out the relevant stuff easy enough.


#7

Thank you Millhouse. I also loaded that to try it out. Hopefully it works. I am using this on two dryers as I have two of each. I have a temp sensor attached to each exhaust vent and seem to get a benchmark of 80 degrees at the exhaust for each dryer. I will continue to monitor more this weekend when we build up more laundry to test on.

WCMore,
I am still interested in your thoughts and feedback as well.


#8

If you have never created variables before, you can edit this piston, and click on “Options”. Make sure that “Show variables” is checked.

pic

Then, on (approx) line 12, click on “+ add new variable”. You can give it a similar name, but leave out the “@”. This keeps it local, and much quicker to respond to changes.

If you go this route, you will also have to remove the “@” later on in the code as well.


#9

I wish to give a huge thanks to @WCmore, and @milhouse for all their help. The piston works great now for both my dryers. I do greatly appreciate your assistance!!


#11

Here is my dryer piston using these sensors.

https://www.ebay.com/p/26016578716?iid=392264878206

Here is my washer piston while using the below sensors.