Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

[VD] Device Battery Monitor


Question

Posted (edited)

Hi,

I added a couple of more battery devices to my setup and decided I needed some type of a battery monitor

This virtual device is triggered to run every 6 hrs (by @Sankotronic Main Scene Scheduler) and checks a set number of Battery powered devices and sends a message if the battery is below 30%

It uses the Smart message Hub to send alerts but could easily be adapted to use email or popup

 

In addition to the 5 battery devices monitored by this VD, I also have 2 Minimote remotes but since they don't report battery level I couldn't include them

I know there are some excellent scenes and vd's that do this already. I kept mine very simple as this is what suits my needs. 

Sharing it as it may be of use to some HC2 owners

 

Web UI

Please login or register to see this image.

/monthly_2017_10/bm1.PNG.2348fdc9c90f1e8e1b50d396780c9e99.PNG" />

 

VD Display

Please login or register to see this attachment.

 

and icon I use

59ecff6fca55f_PowerBattery.png.95e6919956ced2d39e09ce1bb114f0d3.png

 

 

INSTRUCTIONS:

  1. Import the VD
  2. Comment out the HomeTable reference if you don't use one
  3. Amend the list in the devlist table
  4. Amend the battery level reference (line 19)
  5. Amend the messaging medium (line 21 and 29)
  6. Amend the labels as required

 

and that's it..

 

Please login or register to see this attachment.

Edited by AutoFrank
  • Like 2
  • Thanks 5

15 answers to this question

Recommended Posts

  • 0
Posted

Hi AutoFrank,

 

Can you let me know how it make those Web UI windows, please.

 

I put one Fibaro Door/Window sensor in my garage door and one switch on/off.

Of course I use the switch to open or close and sensor to know if it open or close, but I have 2 Web UI, and I would like to have only one.

 

Thanks

Alex

  • 0
Posted

I got an error:DEBUG] 21:47:10: 211[DEBUG] 21:47:10: DEBUG] 21:47:10: 2
[ERROR] 21:47:10: line getS..."]:21

 

this line starts with 21: 

20        fibaro:call(device, "setProperty", "ui.Label"..i..".value", battLevel.." %")
21       if battLevel < 30 then

 

What can that be?

 

with the following code:

Please login or register to see this code.

E

 

  • 0
Posted
On 22. 10. 2017 at 10:29 PM, AutoFrank said:

Ahoj,

Přidala jsem do svého zařízení několik baterií a rozhodla jsem se, že potřebuji nějaký typ baterie

Toto virtuální zařízení je spuštěno každých 6 hodin (pomocí programu @Sankotronic Main Scene Scheduler) a kontroluje nastavený počet zařízení napájených z baterie a pošle zprávu, pokud je baterie nižší než 30%

Využívá inteligentní komunikační Hub pro odesílání upozornění, ale může být snadno přizpůsoben pro použití e-mailu nebo popupu

 

Kromě 5 bateriových zařízení monitorovaných touto VD mám také 2 dálkové ovladače Minimote, ale protože nehlásí stav baterie, nemohl jsem je zahrnout

Vím, že existují nějaké vynikající scény a vd, které to dělají již. Držel jsem se mého velmi jednoduchého, protože to je to, co vyhovuje mým potřebám. 

Sdílejte jej, protože to může být užitečné pro některé vlastníky HC2

 

Webový uživatelský rozhraní

Please login or register to see this link.

 

VD displej

Please login or register to see this attachment.

 

a ikonu, kterou používám

Please login or register to see this link.

 

 

INSTRUKCE:

  1. Importujte VD
  2. Komentujte odkaz HomeTable, pokud ji nepoužíváte
  3. Změňte seznam v tabulce devlistů
  4. Změňte stav referenční úrovně baterie (řádek 19)
  5. Změňte médium zasílání zpráv (řádek 21 a 29)
  6. Podle potřeby upravte štítky

 

a to je vše..

 

Please login or register to see this attachment.

Please login or register to see this code.

  • 0
Posted

@AutoFrank I'm having the same problem like Gasty. The VD will only show the first device of the table. What could be the problem? Can you give us a hint please?

  • 0
  • Inquirer
  • Posted
    On 3/24/2018 at 10:06 PM, StefanS said:

    @AutoFrank Are you still here?

    can you post your code

    thanks

    • 0
    Posted (edited)

    Thank you for helping me!

     

    Please login or register to see this code.

    Debug is saying: 

     

     
    [DEBUG] 19:01:43: 100[
    ERROR] 19:01:43: line getS..."]:16
     
    Edited by StefanS
    • 0
  • Inquirer
  • Posted
    27 minutes ago, StefanS said:

    Thank you for helping me!

     

    Please login or register to see this code.

    Debug is saying: 

     

     
    [DEBUG] 19:01:43: 100[
    ERROR] 19:01:43: line getS..."]:16
     

     

    Hi

     

    The device list cannot be a list of hometable references.

    The code is written to work with a list device id's similar to 

    Please login or register to see this code.

    If you have hometable references it get confused by the jT.xxxx.yyy reference as it loops through the devList Table

     

    It is possible to modify the code to work with a list of hometable references but I haven't had the chance to evolve it to manage this.

    Try changing it to a list of ID's and let me know if it works...

     

    Thanks

    • 0
    Posted

    Please login or register to see this code.

    Same error es before...

    • 1
    Posted

    Hi @StefanS

    change this line :

    Please login or register to see this code.

    to:

     

    Please login or register to see this code.

     

    • 0
    Posted
    19 minutes ago, domin12 said:

    Hi @StefanS

    change this line :

    Please login or register to see this code.

    to:

     

    Please login or register to see this code.

     

     

    That did the trick :)

    Of course it's not a string. So dumb i didn't see it myself :P

     

    Thx

    • 0
    Posted

    @StefanS , this what You had before with HomeTable was ok .

    Please login or register to see this code.

    • 0
    Posted (edited)
    11 minutes ago, domin12 said:

    @StefanS , this what You had before with HomeTable was ok .

    Please login or register to see this code.

     

    You are right. I already tested it also :)

    Edited by StefanS
    • 0
    Posted

    Hi @AutoFrank ,

     

    Could you please move this topic to the Downloads? ;)

    • 0
    Posted

    @AutoFrank

     I have been using your VD for a while now and I find it very useful. But I have 1 Danfoss lc13 the battery is almost empty, but he now indicates in the VD that he is 225%. I think this should be 25%. what guest is wrong?

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...