Announcement

Collapse
No announcement yet.

Jon00 Cumulative Uptime Monitor For Homeseer Devices

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jon00
    replied
    No, the device value and device string will only update together when the script is run.

    Here is something to think about. Why not write the cost data directly to my ini file using the TextAfterValue= entry.

    Run my script then run your script and then mine again. You will then see it in the virtual device as up-to-date data. Remember to use a <br> tag first to show your data on a new line in the virtual device.

    i.e.

    hs.SaveIniSetting ("Device1","TextAfterValue","<br>" & costdata,"Jon00Uptime.ini")

    Leave a comment:


  • Moskus
    replied
    Originally posted by jon00 View Post
    I will consider your request but knowing that you are also very good at scripting, why not just write something that reads the info from the ini file?
    Thanks, and I've already done it, as each second is stored in the DeviceValue it's not difficult, thanks to you!

    I'd just thought it would just be great to have both the time and price on the same Device.



    A thought occurs: If I understand you correctly the DeviceValue is updated every second, but the Device String is updated when your script is run?
    Then can't I just don't run the script and set the DeviceString myself?

    Leave a comment:


  • jon00
    replied
    Glad you like it.

    You will need to run the script some how to update the devices, however how that is done could be via device status change etc. It's using real time to calculate so it does not need to be updated unless you want to see the latest uptime and obviously to start/stop the timer.

    I will consider your request but knowing that you are also very good at scripting, why not just write something that reads the info from the ini file?

    Leave a comment:


  • Moskus
    replied
    This is fantastic!
    I just thought to my self: "Perhaps there's an easy way to monitor how much my living room oven is used". And a quick search later I found this!


    Two questions though:
    - I have to run the script Jon00Uptime.vben each time I want to update the status devices? Or is it possible to let the UpdateScript internal timer take care of this?

    - Would it be possible to add an "calculation line" to the plugin? This plugin is ideal to get an idea what it costs to have certain appliances running.

    I know that my oven draws 1336 W when it's on. The price is approx 0.45 kr/kWh. If the device value of the Uptime device is in second, I'd like to run the following calculation:
    DV * 1336 (effect) / 3600 (seconds in an hour) / 1000 (for kW) * 0.45 (price)

    (or DeviceValue*1336/3600/1000*45 for short).

    Leave a comment:


  • jon00
    replied
    Great!.... please let me know if all is OK!

    Leave a comment:


  • snedecor
    replied
    Thanks!

    Jon,

    Thanks for the quick update! I'll update when I get home. My work bans http connections on any ports but 80, so I can't get to your site, I'll have to wait....

    Gayle

    Leave a comment:


  • jon00
    replied
    Gayle,

    Version 1.02 is now available to allow inversion of device value and device status triggering.

    Leave a comment:


  • jon00
    replied
    OK, I'll add it as a feature request as it's better just to have one event. It will not be for a few weeks though.

    Leave a comment:


  • snedecor
    replied
    What about tracking &quot;OFF&quot; time?

    Jon

    I would like to use this to track the usage of several appliances. However, they all use current sensors tied to DS-10 wireless door/window sensors.

    These sensors report ON or "alert" when the door is open (magnet away, contact open), and OFF or "normal" when the door is closed (magnet is near, contact closed). This translates to OFF when the appliance is running and ON when the appliance is not running. (I know it's kooky, but I don't know how to modify the electronics to reverse it).

    Is there a way to track OFF time rather than ON time? This could be used for other "normally closed" relay type devices.

    Thanks,

    Gayle

    P.S. I just realized I could just call the script with 1 and 0 parameters when my device changed state, so I'll do that. I think the only downside is that I need two events rather than one.
    Last edited by snedecor; October 2, 2009, 10:44 AM. Reason: read the manual

    Leave a comment:


  • Gogs
    replied
    Originally posted by jon00 View Post
    It now works with both so download away!
    Ta mate, now what was it called again, don't fret, I'll find it, as always.

    Leave a comment:


  • jon00
    replied
    It now works with both so download away!

    Leave a comment:


  • Gogs
    replied
    Originally posted by jon00 View Post
    Now I'm sure this was working when I was on V2.3.0.19 but I have just tried it again on V2.2.0.66 and it is not. I know what is causing this (it's the comma in the parms being used as a delimiter incorrectly by HS).

    Would you please confirm the version of HS you are running.
    As you may or not know I went back from HS2.3 to 2.2 as I found 2.3 leaks like a drain, and read something somewhere relating o that issue. Every script that had been altered or written under 2.3 had to be edited to work with 2.2

    So, running 2.2 which version should I download?

    BTW Jon, if you have not already done so, why not label them something to the effect compatible with HS2, but, not HS3 and visa versa.

    Strange HST have made such an insignificant change that effects so many!

    Leave a comment:


  • TeleFragger
    replied
    just downloaded but havent determined what I want to use it on yet....
    thinking some lights and hvac.... shed and gates....

    Leave a comment:


  • jon00
    replied
    That's a good idea!

    I think it is better to correct it so it works over all HS2 versions.

    Leave a comment:


  • snedecor
    replied
    Originally posted by jon00 View Post
    Gayle,

    Try version 1.01 on my site. Please note that the comma is now replaced with a semicolon i.e. to reset you use:

    ("Main","1;Reset")
    Jon,

    I will install and test when I get home from work.


    I was able to work around the issue for the time being by setting: (from work, not sure of exact syntax)


    Parm3=1,Reset
    Parm4=2,Reset
    Parm5=3,Reset

    I then called ("Main","Parm3") daily, Parm4 weekly, and Parm5 monthly

    Leave a comment:

Working...
X