Hi all,
After recently hooking up zwave devices to monitor power consumption on my appliances and monitor on/off status, I thought I could do more than that, especially with our fridges. I had thought about hooking up door sensors to them and temperature sensors inside so that I could be alerted if there were problems. However, I realized that the power usage patterns are also good indicators of how the fridge is doing. I started with one fridge and determined it had the following power usage:
idle: 0-15 Watt
door open: 60 Watt (due to light bulb being on)
compressor running during cooling cycle: 140-160 Watt
defrost cycle: 360-400 Watt
If one or both of the doors are open during the cooling or defrost cycles, then the power draw increases by an equivalent amount. Our other fridge has a similar pattern, but with different values.
Common problems with fridges are doors being left open, being stuck in the defrost cycle, the defrost cycle not coming on at all, the compressor running continuously due to a refrigerant leak, or the compressor not running at all. All these can be detected by monitoring the power usage and then triggering alerts if the power usage becomes abnormal.
I created 3 virtual devices for each fridge, one called Status (on/off), one called Mode (idle/cooling/defrost), and one called Door (closed/open) along with a parent device which I used to group them:
I then used a script that was called when the fridge's power consumption changed. Three parameters, separated by commas, need to be passed to it: the Door Device, the Mode Device and the device with the power usage. The script updates the virtual devices as needed. The Status device is directly updated by events. I used a similar script for the other fridge because the ranges were different.
Other events are used to monitor the devices and will send alerts as needed. See the next post for details.
Cheers
Al
After recently hooking up zwave devices to monitor power consumption on my appliances and monitor on/off status, I thought I could do more than that, especially with our fridges. I had thought about hooking up door sensors to them and temperature sensors inside so that I could be alerted if there were problems. However, I realized that the power usage patterns are also good indicators of how the fridge is doing. I started with one fridge and determined it had the following power usage:
idle: 0-15 Watt
door open: 60 Watt (due to light bulb being on)
compressor running during cooling cycle: 140-160 Watt
defrost cycle: 360-400 Watt
If one or both of the doors are open during the cooling or defrost cycles, then the power draw increases by an equivalent amount. Our other fridge has a similar pattern, but with different values.
Common problems with fridges are doors being left open, being stuck in the defrost cycle, the defrost cycle not coming on at all, the compressor running continuously due to a refrigerant leak, or the compressor not running at all. All these can be detected by monitoring the power usage and then triggering alerts if the power usage becomes abnormal.
I created 3 virtual devices for each fridge, one called Status (on/off), one called Mode (idle/cooling/defrost), and one called Door (closed/open) along with a parent device which I used to group them:
I then used a script that was called when the fridge's power consumption changed. Three parameters, separated by commas, need to be passed to it: the Door Device, the Mode Device and the device with the power usage. The script updates the virtual devices as needed. The Status device is directly updated by events. I used a similar script for the other fridge because the ranges were different.
Code:
Sub Main(ByVal Parms As String) Dim logName As String = "Fridge Status" 'set log type for HS log Dim Debug As Boolean = False 'set to True if the script give you errors and it will provide additional info in the HS3 log to help troubleshoot Dim ParmArray() as String ParmArray = Parms.tostring.split(",") dim DoorDev as Double = CDbl(ParmArray(0)) 'reference ID of the Door device dim ModeDev as Double = CDbl(ParmArray(1)) 'reference ID of the Mode device dim PowerDev as Double = CDbl(ParmArray(2)) 'reference ID of the Power device Dim Power As Double = hs.DeviceValueEx(PowerDev) If Debug Then hs.writelog(logName,CStr(Power)) Select Case Power Case 0 To 49.9999999 If hs.DeviceValue(DoorDev) = 100 Then hs.SetDeviceValueByRef(DoorDev,0,True) If hs.DeviceValue(ModeDev) <> 1 Then hs.SetDeviceValueByRef(ModeDev,1,True) Case 50 To 124.9999999 If hs.DeviceValue(DoorDev) = 0 Then hs.SetDeviceValueByRef(DoorDev,100,True) If hs.DeviceValue(ModeDev) <> 1 Then hs.SetDeviceValueByRef(ModeDev,1,True) Case 125 To 189.999999 If hs.DeviceValue(DoorDev) = 100 Then hs.SetDeviceValueByRef(DoorDev,0,True) If hs.DeviceValue(ModeDev) <> 2 Then hs.SetDeviceValueByRef(ModeDev,2,True) Case 190 To 274.999999 If hs.DeviceValue(DoorDev) = 0 Then hs.SetDeviceValueByRef(DoorDev,100,True) If hs.DeviceValue(ModeDev) <> 2 Then hs.SetDeviceValueByRef(ModeDev,2,True) Case 275 To 424.999999 If hs.DeviceValue(DoorDev) = 100 Then hs.SetDeviceValueByRef(DoorDev,0,True) If hs.DeviceValue(ModeDev) <> 3 Then hs.SetDeviceValueByRef(ModeDev,3,True) Case 425 To 599.999999 If hs.DeviceValue(DoorDev) = 0 Then hs.SetDeviceValueByRef(DoorDev,100,True) If hs.DeviceValue(ModeDev) <> 3 Then hs.SetDeviceValueByRef(ModeDev,3,True) End Select End Sub
Other events are used to monitor the devices and will send alerts as needed. See the next post for details.
Cheers
Al
Comment