I have a script which runs each night which reads the value of a few devices, updates a couple of virtual devices with the values, then zeros the devices which it just read. This works fine for my rain measuring devices and 99.99% of the time for my electricity consumption reading. Essentially, all I do is read the total daily power consumption from CC and write the log and update a "Previous Day Consumption" device with what was used the prior day.
The few lines of code for this particular device are:
eVal = hs.DeviceValue(30) 'electricity
hs.WritelogEx ("Info", "Daily KW-Usage " & eVal & " kWH","#0000FF")
'Electricity Yesterday
hs.SetDeviceString (205, "<img src='\Images\MyImgs\Electricity.png' align=absmiddle> " & "<font size = 2 color='Green'> <b>" & eVal & " kwh used previous day</b>", true)
I see this in the log.
Jul-13 11:59:45 PM Info Daily KW-Usage 0 kWH
Jul-13 11:59:45 PM Info Day total Sump Pump Count: 0
Jul-13 11:59:45 PM Info Day total rain: 1.4 mm
Jul-13 11:59:45 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/CountersCleared.vb
Again, this works 99.99% of the time. But I can't figure out why it doesn't work 100%
Any idea?
Robert
The few lines of code for this particular device are:
eVal = hs.DeviceValue(30) 'electricity
hs.WritelogEx ("Info", "Daily KW-Usage " & eVal & " kWH","#0000FF")
'Electricity Yesterday
hs.SetDeviceString (205, "<img src='\Images\MyImgs\Electricity.png' align=absmiddle> " & "<font size = 2 color='Green'> <b>" & eVal & " kwh used previous day</b>", true)
I see this in the log.
Jul-13 11:59:45 PM Info Daily KW-Usage 0 kWH
Jul-13 11:59:45 PM Info Day total Sump Pump Count: 0
Jul-13 11:59:45 PM Info Day total rain: 1.4 mm
Jul-13 11:59:45 PM Event Running script in background: C:/Program Files/HomeSeer HS3/scripts/CountersCleared.vb
Again, this works 99.99% of the time. But I can't figure out why it doesn't work 100%
Any idea?
Robert
Comment