well good afternoon youtube so i just wanted to catch this diversion load running so i have my
simple code here running on the diversion load number one and you can see it's automatically
kicked up to five percent which is about 30 watts so this is the whole house power and there's two
clamps one on line one one on line two the way the codes written if it drops below 25 watts total
then this thing will go up 5 and that's what's happened here now 50 watts is the upper trigger
and you can see that it just turned this off basic logic here is if this goes below 25 i add
diversion load if it goes above 50 i take away the diversion load so what we can do is take a look at
the code here i'm using the no longer supported p-leg which is program logic event generator on
my vera plus home automation controller and main reason i'm using it is because it works and my old
code was written in this so i figure i'll just stick with what works until i get the
logic running here so these are the device triggers so these are the things that
trigger something to happen i trigger if the whole house energy goes above 150
i trigger if it goes above 50 and if it goes below 25 so those are the ones i'm using in my
diversion low here's the trigger below 25 watts here's the device the whole house energy goes
below 25. so anyway that's what's called a trigger so that's an event that happens and then down here
is my code that runs the diversion load so here's the code that turns it on if that trigger of below
25 watts happened and it's during the daytime and then i'm not maxed out so this p diversion load
one is the current settings that runs from zero to a hundred and then the idea is i just don't wanna
go over a hundred because then weird things happen that's turn on and then here's turn
up so this isn't triggered by an event happening but it's got its own little check here so it says
if the power on clamp number one is below 25 and then it's the same logic if it's during the day
and the betting isn't too high you turn this condition true if it goes above 50 i turn it down
if it goes above 150 i turn it off so those are my basic conditions these are the what's called
the logic actions so this is what actually does something uh turn up turn down turn off
this is the condition turn up diversion load one and then it just says take the diversion load one
and set it to the current value plus five percent turn down diversion load is the same thing except
it says take the current value and subtract five so this is pretty simple it doesn't do a whole lot
here so i have turn on and turn off function and then i have an increase and decrease function so
anyway that's what the code does this is what they call their status report so i have the triggers
here so you can see they gives me the the name of the trigger and this is the current state so
these two here are true we're below 50 watts and we're also below 75. i used to use 75 in my old
system and then here clamp 2 is below 50 watts i have the properties this is the way you basically
read the values you just say this variable p clamp 1 power is equal to that device and the
energy metering value of that device we've got clamp one clamp two there's the current value of
the two diversion loads so diversion load one is just the dimming setting currently at five
and that's the various conditions here tells you whether that condition is true or false
not a lot there but that's the status report oh it looks like yes everything's shut off here and i
guess that was because the refrigerator turned on and drove the whole house power above 150 watts
so this turned off so anyway that's my basic code for controlling this diversion load one here it's
not terribly sophisticated but it basically shows that it works with this system i have
roughly 300 watts of grid tie power feeding into clamp one so actually right now the whole house
is using about 430 watts 300 of those watts are coming off of the grid tie
system so the net is only 128 129 but when the refrigerator shuts off this number could go
negative and that's the idea of this diversion load as it can come in here and basically soak
up 30 or 60 watts of power i think the highest i've seen this go is maybe 15 so it does the 5
from the initial trigger and then it does maybe two more increments with the checking
this power below 25 watts so it's not really very sophisticated but it does actually do the job and
it turns on when it's supposed to and it turns off when it's supposed to and it keeps the power
in the range of 25 to 50 watts and it'll sit here and cycle on and off during the day
so yeah this is my home assistant screen i've got home assistant running on my synology nas but you
can see here it's picked up these three devices the home energy monitor for the whole house and
then clamp one and clamp two power and so if we look at the power here you can see overnight we're
running oh three or 400 watts there it's about 300 watts and if the refrigerator is running it's
about 400 and then you can see now during the the morning here it's closer to 50 watts 46 30 40 50
yeah right there 10 47 it was 21 watts that's about the time that the system kicks in
it'll keep going until maybe 2 30 or 3 in the afternoon what i've done is i've run the
diversion load up to 20 percent so i put roughly 120 watts of load on and then i'll turn this off
and we can watch what happens here so this should drop we were at 96 watts that should drop
down yeah and so we got this one to trigger because this one went below
25 so that triggered here this one here didn't go below 25 it went back up from 27 to 45.
you can play around with this load and then watch the system react to it you have a little knob here
you know i can turn the house power up and down with this slider and then watch what happens here
and make sure it's doing the right thing if you have any questions post up in the
comments section below and in the next video we'll look at diversion load two and it's
handled a little bit different so stay tuned for that video and as always thanks for watching