Speedtest-cli Internet Up-/Downlink Measurement Integration

Thank you! It turns out it’s not two different files (two blocks of code as the author of the article showed), but one file. I put it in the rules folder and it all worked. But unfortunately the data record does not work in influxdb (collectd works) and openhab does not transfer data to the database. The empty database is created from scratch and a separate openhab user is created for it, all privileges are set for both writing and reading.

Sys: Ubuntu Server 16.04.3 X64
openhab: 2.1.0

Openhab2:
1. Install influxdb persistence
Снимок

2. The data in the file is filled: influxdb.cfg

url=http://127.0.0.1:8086
user=openhab
password=mypass
db=openhab
retentionPolicy=autogen

3. influxdb.persist:

    Strategies {
        everyMinute : "0 * * * * ?"
        everyHour   : "0 0 * * * ?"
        everyDay    : "0 0 0 * * ?"
        default = everyMinute
    }

    Items {
        gInfluxDB* : strategy = everyChange, everyMinute
        Presence_Phone : strategy = everyChange
    }

4. SpeedTest.items

Group gSpeedtest <"network-icon"> (Whg)

String      SpeedtestSummary        "Ск.Инта: [%s]"             <"speedtest_network">       (gSpeedtest, gInfluxDB)
Number      SpeedtestResultPing     "Ping [%.3f ms]"             <"speedtest_next5">         (gSpeedtest, gInfluxDB)
Number      SpeedtestResultDown     "Downlink [%.2f Mbit/s]"     <"speedtest_download">      (gSpeedtest, gInfluxDB)
Number      SpeedtestResultUp       "Uplink [%.2f Mbit/s]"       <"speedtest_upload">        (gSpeedtest, gInfluxDB)
String      SpeedtestRunning        "Speedtest запущен ... [%s]" <"speedtest_new">           (gSpeedtest)
Switch      SpeedtestRerun          "Ручной запуск"              <"speedtest_reload2">       (gSpeedtest)
DateTime    SpeedtestResultDate     "История: [%1$td.%1$tm.%1$tY в %1$tH:%1$tM]"   <"speedtest_problem4">      (gSpeedtest, gInfluxDB)

5. sudo systemctl status influxdb:
Снимок2

No data db openhab:

root@edgi-server:/etc/openhab2/items# influx
Connected to http://localhost:8086 version 1.4.0~n201709010800
InfluxDB shell version: 1.4.0~n201709010800
> auth
username: openhab
password:
> use openhab
Using database openhab
> show measurements
>
>
>

nothing no data from openhab