So I'm trying to solve a problem I'm having with waynehead99's Energy Usage script.
I have a variable (dim as decimal) called kWh
the script makes some calculation to put into that variable.
if I:
The value displayed in the log is fine
if I:
parmarray(3) being a virtual device.
The device value written ends up something like this: 9.71372584975558E-319 when it should be 1.552 in this case
am I missing something ?
thanks
Simon
Current Date/Time: 12/15/2017 1:17:11 PM
HomeSeer Version: HS3 Pro Edition 3.0.0.368
Linux version: Linux HomeSeer 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux System Uptime: 0 Days 16 Hours 16 Minutes 20 Seconds
IP Address: 192.168.10.213
Number of Devices: 147
Number of Events: 16
Available Threads: 297
Enabled Plug-Ins
2.0.74.0: BLLock
3.0.0.8: Chromecast
3.0.0.28: MediaController
3.0.1.109: PHLocation
0.0.0.35: Pushover 3P
3.0.6542.35207: UltraWeatherWU3
3.0.1.130: Z-Wave
I have a variable (dim as decimal) called kWh
the script makes some calculation to put into that variable.
if I:
Code:
hs.writelog ("kwh: ", kWh)
if I:
Code:
hs.SetDeviceValueByRef(ParmArray(3), kWh, True)
The device value written ends up something like this: 9.71372584975558E-319 when it should be 1.552 in this case
am I missing something ?
thanks
Simon
Current Date/Time: 12/15/2017 1:17:11 PM
HomeSeer Version: HS3 Pro Edition 3.0.0.368
Linux version: Linux HomeSeer 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux System Uptime: 0 Days 16 Hours 16 Minutes 20 Seconds
IP Address: 192.168.10.213
Number of Devices: 147
Number of Events: 16
Available Threads: 297
Enabled Plug-Ins
2.0.74.0: BLLock
3.0.0.8: Chromecast
3.0.0.28: MediaController
3.0.1.109: PHLocation
0.0.0.35: Pushover 3P
3.0.6542.35207: UltraWeatherWU3
3.0.1.130: Z-Wave