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

Can HC3 send data to Influxdb with Telegraf?


JcBorgs
 Share

Question

Relatively new to this and can’t get it to work, have searched in other places/forums but can’t find any good information so hoping for some guidance here.

 

I have a HC3 and two RaspBerry Pi 4, one running 32bit OS and the other 64bit OS.

 

Have now tried on both of them to first setup InfluxDB  (version 1.8.4 on the 32bit and version 2.0.4 on the 64bit), so far so good and that piece seems to be working. Then I want to get the HC3 to send data into InfulxDB and saw that Telegraf has a Fibaro plug-in. Had some hassle to configure it, mostly on the 64bit Raspberry. But eventually got it installed on both, but here my problem start.

 

Both InfluxDB and Telegraf reports as active and running in both of the Raspberry’s. But as soon as I add configuration for the Fibaro plug-in in Telegraf I start to see messages when checking the Telegraf Status that there is an Error, something related to JSON not being able to pharse a “value.dead” as string (will copy the exact error message in a later post).

 

But my first questions are:
1. Is the Fibaro Plug-in in Telegraf compatible with the HC3 or is it intended to be used with the HC2?

2. Are there any alternative methods of getting the HC3 to log data to the InfluxDB?

3. Anyone with a similar working setup that can share some config examples? (Setup = HC3 logging to InfluxDB with Telegraf)

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

push data from scene to Infulx. i think it better than polling from grafana / telegram HC3.

you can use this scene

 

Please login or register to see this code.

 

base usage:

 

saveByDeviceID("flow"2116"value")
 
"flow" - just metric name in influx
2116 - device id what u wish to persist
"value" - just device value. you can use any support directives here like "batteryLevel" / "power" etc.
 

Please login or register to see this attachment.

Please login or register to see this attachment.

 

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thank you for quick and detailed answer!

     

    One thing I don’t get about your scene:

    The first line under — Power

    fibaro.call (1141, ’poll’)

     

    What does that do and in your setup what kind of device/scene/etc. are 1141?

     

    Otherwise the scene seems rather straight forward, will definitely test it out.

     

    Edited by JcBorgs
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Ok, this works like a charm.

    Did select a few devices and logged the batteryLevel from them to the InfluxDB..

     

    (still curious about the fibaro.call (1141, ’poll’), what does it do and what device is 1141?)

    Edited by JcBorgs
    Link to comment
    Share on other sites

    • 0
    2 hours ago, JcBorgs said:

    Ok, this works like a charm.

    Did select a few devices and logged the batteryLevel from them to the InfluxDB..

    I use also this code, but how I get the batteryLevel in InfluxDB, have you an example....

    saveByDeviceID("Battery", xxxxx, "????")

     

    Edited by twanve
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I do it by this example:

     

    SaveByDeviceID(“Battery”,1234,”batteryLevel”)

     

    • Thanks 1
    Link to comment
    Share on other sites

    • 0
    3 hours ago, JcBorgs said:

     

    (still curious about the fibaro.call (1141, ’poll’), what does it do and what device is 1141?)

    some crazy devices like HEM3

    it's still works in HC ugly.

    • Like 1
    Link to comment
    Share on other sites

    • 0

    Hi guys,

    I was able to run the script and save the data to influxdb. Unfortunately, I can't cope with having the status of devices sent from fibaro-> influxdb regularly. To get the next batch of data I have to run the scene manually each time.
    Any idea how to solve/workaround this is more than welcome :)
    Thank you.

    Link to comment
    Share on other sites

    • 0
    7 minutes ago, mariokil said:

    To get the next batch of data I have to run the scene manually each time.

    witam. nie wiem ale mam pomysl :) 

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    • 0
    1 minutę temu, hater napisał:

    witam. nie wiem ale mam pomysl

    Ok, dzięki. Postaram się sprawdzić :)

    Thank you, Ill check this :)

    • Thanks 1
    Link to comment
    Share on other sites

    • 0
    3 godziny temu, hater napisał:

    { conditions = { { isTrigger = true, operator = "match", property = "cron", type = "date", value = { "*", "*", "*", "*", "*", "*" } } }, operator = "all" }

    It works ;)

    Thank you ✌

    Link to comment
    Share on other sites

    • 0

    I solved it easily.
    I ran OS Home Assistant on my Synology virtual machine.
    Link:

    Please login or register to see this link.

    OS Home Assistant contains many applications as well as a database of infuxdb and grafan.
    I added my fibaro HC3 to Home Assistant where it loaded all the devices.

    Now everything from Home Assistant and Fibaro HC3 writes to my influx db database.

    I also used an android tablet with the HomeHabit app on the wall.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0
    W dniu 6.03.2021 o 13:01, hater napisał:

    Please login or register to see this code.

     

    Hi,

    fortuanetly LUA scen works (almost) fine. Above part of script shows only defaulte sensors assigned to specific room. How to get value for other devices for the same room which are not "default" ?

     

    thank you for any suggestion ;)

    Edited by mariokil
    Link to comment
    Share on other sites

    • 0
    22 hours ago, mariokil said:

     

    Hi,

    fortuanetly LUA scen works (almost) fine. Above part of script shows only defaulte sensors assigned to specific room. How to get value for other devices for the same room which are not "default" ?

     

    thank you for any suggestion ;)

    saveByDeviceID("garage_lighting"927"value")
    Link to comment
    Share on other sites

    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.

     Share

    ×
    ×
    • Create New...