Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module error #6

Open
dervomsee opened this issue Oct 21, 2020 · 11 comments
Open

Module error #6

dervomsee opened this issue Oct 21, 2020 · 11 comments

Comments

@dervomsee
Copy link

Sorry for my issue, but i'm no sql pro..
I tried several variants of a query but every query returned in a error message.

Variant 1

SELECT
  time,
  "windspeed"  AS speed,
  "winddirection"  AS direction
FROM 
 "weather_data" 
WHERE  ("sensor" = 'esp_weather_measurement') AND $__unixEpochFilter("time")
ORDER BY time

Query inspector error message: "error parsing query: missing parameter: __unixEpochFilter"

Variant 2

SELECT
  time,
  "windspeed"  AS speed,
  "winddirection"  AS direction
FROM 
 "weather_data" 
WHERE  ("sensor" = 'esp_weather_measurement') AND $timeFilter
ORDER BY time

Query succeeds, but i get a windrose module error "RangeError: invalid array length".

@jdavid
Copy link
Member

jdavid commented Oct 21, 2020

I've tested this plugin with PostgreSQL and ClickHouse data sources. Which data source are you trying? Which version of Grafana?

@dervomsee
Copy link
Author

I'm using Grafana 7.2.1 with InfluxDB as a data source. When googling about it I already guessed, that the unixEpochFilter is something Post-/MySQL special.
But variant 2 generates a valid set of data, only the windrose plugins does not work or generates the array length error.
The query inspector can generate a small sample output. Could that help to debug?

@jdavid
Copy link
Member

jdavid commented Oct 21, 2020

yes please, can you post the sample output?

@jdavid
Copy link
Member

jdavid commented Oct 21, 2020

By the way this is an example with the ClickHouse data source:

SELECT
    $timeSeries as t,
    WS_16_33_1_1_1 AS "speed",
    WD_20_35_1_1_1 AS "direction"
FROM table
WHERE $timeFilter
ORDER BY t

@jdavid
Copy link
Member

jdavid commented Oct 21, 2020

Just added an example to the readme file for ClickHouse, https://github.com/spectraphilic/grafana-windrose#usage

Maybe replacing time, by $timeSeries as time will fix your issue.

@dervomsee
Copy link
Author

I replaced time by $timeSeries as time and i get the error message error parsing query: missing parameter: timeSeries.

With the following query i get in the query inspector the debugging data below:

SELECT
  time,
  "windspeed"  AS speed,
  "winddirection"  AS direction
FROM 
 "weather_data" 
WHERE  ("sensor" = 'esp_weather_measurement') AND $timeFilter
ORDER BY time
{
  "request": {
    "method": "POST",
    "url": "api/datasources/proxy/1/query",
    "params": {
      "db": "iot",
      "epoch": "ms"
    },
    "data": "q=SELECT%0A%20%20time%2C%0A%20%20%22windspeed%22%20%20AS%20speed%2C%0A%20%20%22winddirection%22%20%20AS%20direction%0AFROM%20%0A%20%22weather_data%22%20%0AWHERE%20%20(%22sensor%22%20%3D%20'esp_weather_measurement')%20AND%20time%20%3E%3D%20now()%20-%206h%0AORDER%20BY%20time",
    "precision": "ms",
    "hideFromInspector": false
  },
  "response": {
    "results": [
      {
        "statement_id": 0,
        "series": [
          {
            "name": "weather_data",
            "columns": [
              "time",
              "speed",
              "direction"
            ],
            "values": [
              [
                1603322861026,
                0.14,
                0.07
              ],
              [
                1603322921546,
                0.14,
                0.07
              ],
              [
                1603322984966,
                0.14,
                0.07
              ],
              [
                1603323047809,
                0.14,
                0.07
              ],
              [
                1603323108304,
                0.14,
                0.07
              ],
              [
                1603323168718,
                0.76,
                0.07
              ],
              [
                1603323229359,
                1.12,
                0.07
              ],
              [
                1603323292477,
                1.65,
                335.06
              ],
              [
                1603323352937,
                2.06,
                319.61
              ],
              [
                1603323413403,
                1.91,
                315.93
              ],
              [
                1603323473881,
                1.8,
                310.26
              ],
              [
                1603323537517,
                1.87,
                306.95
              ],
              [
                1603323597800,
                1.42,
                306.95
              ],
              [
                1603323658104,
                1.46,
                306.95
              ],
              [
                1603323718448,
                0.97,
                306.86
              ],
              [
                1603323781436,
                0.33,
                306.86
              ],
              [
                1603323844427,
                0.5,
                306.95
              ],
              [
                1603323904753,
                0.5,
                306.86
              ],
              [
                1603323965346,
                0.8,
                306.95
              ],
              [
                1603324025826,
                0.9,
                306.86
              ],
              [
                1603324086334,
                1.24,
                306.95
              ],
              [
                1603324146960,
                1.01,
                309.1
              ],
              [
                1603324210187,
                1.21,
                313.95
              ],
              [
                1603324273486,
                0.62,
                313.59
              ],
              [
                1603324333947,
                0.62,
                313.68
              ],
              [
                1603324397004,
                0.88,
                313.5
              ],
              [
                1603324457548,
                0.62,
                313.59
              ],
              [
                1603324517951,
                0.44,
                313.68
              ],
              [
                1603324578369,
                0.14,
                313.68
              ],
              [
                1603324638901,
                0.14,
                313.68
              ],
              [
                1603324702035,
                0.36,
                313.68
              ],
              [
                1603324765242,
                0.14,
                313.68
              ],
              [
                1603324825563,
                0.14,
                313.68
              ],
              [
                1603324888558,
                0.14,
                313.68
              ],
              [
                1603324949070,
                0.14,
                313.68
              ],
              [
                1603325009554,
                0.14,
                313.68
              ],
              [
                1603325070002,
                0.14,
                313.68
              ],
              [
                1603325130312,
                0.14,
                313.68
              ],
              [
                1603325191069,
                0.14,
                313.68
              ],
              [
                1603325254600,
                0.14,
                313.68
              ],
              [
                1603325314921,
                0.14,
                313.68
              ],
              [
                1603325375452,
                0.14,
                313.68
              ],
              [
                1603325435984,
                0.14,
                313.68
              ],
              [
                1603325496697,
                0.14,
                313.68
              ],
              [
                1603325557128,
                0.42,
                313.68
              ],
              [
                1603325617470,
                1.1,
                313.59
              ],
              [
                1603325677953,
                1.19,
                322.93
              ],
              [
                1603325738270,
                1.52,
                334.97
              ],
              [
                1603325798782,
                1.11,
                335.06
              ],
              [
                1603325861808,
                1.42,
                334.97
              ],
              [
                1603325922113,
                1.09,
                341.08
              ],
              [
                1603325982585,
                0.83,
                340.72
              ],
              [
                1603326043094,
                0.8,
                340.99
              ],
              [
                1603326106170,
                0.32,
                340.72
              ],
              [
                1603326169382,
                0.33,
                340.72
              ],
              [
                1603326229787,
                0.4,
                340.63
              ],
              [
                1603326290202,
                0.21,
                340.63
              ],
              [
                1603326353227,
                0.14,
                340.63
              ],
              [
                1603326416724,
                0.14,
                340.63
              ],
              [
                1603326480112,
                0.14,
                340.63
              ],
              [
                1603326540694,
                0.14,
                340.63
              ],
              [
                1603326601201,
                0.14,
                340.63
              ],
              [
                1603326661620,
                0.14,
                340.63
              ],
              [
                1603326722115,
                0.14,
                340.63
              ],
              [
                1603326782426,
                0.88,
                340.72
              ],
              [
                1603326842967,
                1.05,
                340.63
              ],
              [
                1603326903290,
                0.76,
                340.82
              ],
              [
                1603326963619,
                0.76,
                340.63
              ],
              [
                1603327023944,
                0.83,
                340.99
              ],
              [
                1603327087162,
                0.55,
                340.82
              ],
              [
                1603327147711,
                0.48,
                340.72
              ],
              [
                1603327208159,
                0.21,
                340.72
              ],
              [
                1603327268634,
                0.55,
                340.63
              ],
              [
                1603327328942,
                0.25,
                340.72
              ],
              [
                1603327389478,
                0.14,
                340.72
              ],
              [
                1603327449998,
                0.14,
                340.72
              ],
              [
                1603327513206,
                0.14,
                340.72
              ],
              [
                1603327573531,
                0.14,
                340.72
              ],
              [
                1603327633992,
                0.18,
                340.72
              ],
              [
                1603327694421,
                0.14,
                340.72
              ],
              [
                1603327754759,
                0.14,
                340.72
              ],
              [
                1603327815149,
                0.8,
                340.72
              ],
              [
                1603327875459,
                0.33,
                340.63
              ],
              [
                1603327936001,
                0.14,
                340.63
              ],
              [
                1603327996553,
                0.25,
                340.63
              ],
              [
                1603328056882,
                0.14,
                340.63
              ],
              [
                1603328120458,
                0.3,
                340.63
              ],
              [
                1603328183776,
                0.14,
                340.63
              ],
              [
                1603328247341,
                0.14,
                340.63
              ],
              [
                1603328307893,
                0.72,
                340.63
              ],
              [
                1603328368221,
                1.12,
                325.63
              ],
              [
                1603328431335,
                1.03,
                328.59
              ],
              [
                1603328495039,
                0.87,
                327.79
              ],
              [
                1603328555451,
                0.62,
                327.79
              ],
              [
                1603328615927,
                0.8,
                328.33
              ],
              [
                1603328676230,
                0.87,
                327.87
              ],
              [
                1603328736764,
                0.76,
                339.92
              ],
              [
                1603328797299,
                0.98,
                344.14
              ],
              [
                1603328857801,
                1.17,
                339.64
              ],
              [
                1603328918309,
                0.62,
                339.19
              ],
              [
                1603328981392,
                0.57,
                339.1
              ],
              [
                1603329041703,
                0.14,
                339.1
              ],
              [
                1603329102012,
                0.14,
                339.1
              ],
              [
                1603329162652,
                0.14,
                339.1
              ],
              [
                1603329223141,
                0.14,
                339.1
              ],
              [
                1603329283693,
                0.55,
                339.55
              ],
              [
                1603329346937,
                0.55,
                339.1
              ],
              [
                1603329409949,
                0.21,
                339.19
              ],
              [
                1603329470353,
                0.14,
                339.19
              ],
              [
                1603329533456,
                0.14,
                339.19
              ],
              [
                1603329596464,
                0.14,
                339.19
              ],
              [
                1603329656964,
                0.14,
                339.19
              ],
              [
                1603329717469,
                0.14,
                339.19
              ],
              [
                1603329780681,
                0.64,
                339.29
              ],
              [
                1603329843672,
                0.83,
                339.1
              ],
              [
                1603329904247,
                0.95,
                347.55
              ],
              [
                1603329967534,
                0.14,
                347.46
              ],
              [
                1603330030610,
                0.14,
                347.46
              ],
              [
                1603330093760,
                0.14,
                347.46
              ],
              [
                1603330154069,
                0.14,
                347.46
              ],
              [
                1603330214540,
                0.15,
                347.46
              ],
              [
                1603330274937,
                0.18,
                347.46
              ],
              [
                1603330335438,
                0.14,
                347.46
              ],
              [
                1603330395964,
                0.4,
                347.46
              ],
              [
                1603330456497,
                0.14,
                347.55
              ],
              [
                1603330519153,
                0.14,
                347.55
              ],
              [
                1603330582614,
                0.14,
                347.55
              ],
              [
                1603330645821,
                0.14,
                347.55
              ],
              [
                1603330709181,
                0.14,
                347.55
              ],
              [
                1603330769708,
                0.14,
                347.55
              ],
              [
                1603330830260,
                0.14,
                347.55
              ],
              [
                1603330890777,
                0.14,
                347.55
              ],
              [
                1603330951204,
                0.14,
                347.55
              ],
              [
                1603331011704,
                0.14,
                347.55
              ],
              [
                1603331071996,
                0.14,
                347.55
              ],
              [
                1603331132313,
                0.33,
                347.55
              ],
              [
                1603331192862,
                0.56,
                347.55
              ],
              [
                1603331256393,
                0.91,
                346.74
              ],
              [
                1603331316976,
                0.95,
                335.15
              ],
              [
                1603331377585,
                1.05,
                333.18
              ],
              [
                1603331438102,
                0.76,
                333.18
              ],
              [
                1603331501222,
                1.05,
                332.82
              ],
              [
                1603331564243,
                0.69,
                333.27
              ],
              [
                1603331624753,
                0.7,
                332.82
              ],
              [
                1603331685064,
                0.55,
                333.18
              ],
              [
                1603331748418,
                0.29,
                333.18
              ],
              [
                1603331808807,
                0.9,
                333.08
              ],
              [
                1603331871902,
                0.47,
                332.82
              ],
              [
                1603331935267,
                0.9,
                333.08
              ],
              [
                1603331998486,
                0.62,
                332.82
              ],
              [
                1603332058944,
                0.5,
                332.82
              ],
              [
                1603332119571,
                0.26,
                332.82
              ],
              [
                1603332182801,
                0.14,
                332.82
              ],
              [
                1603332245888,
                0.14,
                332.82
              ],
              [
                1603332309324,
                0.14,
                332.82
              ],
              [
                1603332375327,
                0.14,
                332.82
              ],
              [
                1603332439005,
                0.14,
                332.82
              ],
              [
                1603332504804,
                0.7,
                332.82
              ],
              [
                1603332564803,
                0.7,
                332.82
              ],
              [
                1603332567909,
                0.62,
                332.82
              ],
              [
                1603332630468,
                0.73,
                332.82
              ],
              [
                1603332690978,
                0.58,
                332.82
              ],
              [
                1603332751597,
                0.58,
                333.08
              ],
              [
                1603332812006,
                0.58,
                333.18
              ],
              [
                1603332872620,
                0.56,
                332.82
              ],
              [
                1603332936070,
                0.88,
                333.08
              ],
              [
                1603332999125,
                0.8,
                333.18
              ],
              [
                1603333062165,
                0.47,
                332.82
              ],
              [
                1603333122595,
                0.62,
                333.27
              ],
              [
                1603333186017,
                0.74,
                333.18
              ],
              [
                1603333246429,
                0.96,
                332.82
              ],
              [
                1603333306837,
                0.8,
                332.82
              ],
              [
                1603333376333,
                0.76,
                333.18
              ],
              [
                1603333432840,
                0.76,
                333.18
              ],
              [
                1603333432983,
                0.91,
                333.18
              ],
              [
                1603333493469,
                0.99,
                333.18
              ],
              [
                1603333553897,
                0.95,
                332.91
              ],
              [
                1603333614311,
                0.76,
                332.82
              ],
              [
                1603333674811,
                1.06,
                294.45
              ],
              [
                1603333735352,
                1.14,
                291.49
              ],
              [
                1603333795658,
                1.39,
                290.69
              ],
              [
                1603333859127,
                1.86,
                290.41
              ],
              [
                1603333922389,
                1.31,
                290.41
              ],
              [
                1603333982772,
                1.27,
                288.53
              ],
              [
                1603334043236,
                1.49,
                287.72
              ],
              [
                1603334103792,
                1.28,
                292.66
              ],
              [
                1603334164211,
                1.17,
                292.57
              ],
              [
                1603334224519,
                0.83,
                292.66
              ],
              [
                1603334287914,
                0.8,
                292.66
              ],
              [
                1603334348415,
                0.66,
                287.09
              ],
              [
                1603334408932,
                0.74,
                287.09
              ],
              [
                1603334472444,
                0.91,
                287
              ],
              [
                1603334535478,
                0.76,
                287
              ],
              [
                1603334598636,
                0.9,
                287.36
              ],
              [
                1603334659082,
                0.91,
                297.87
              ],
              [
                1603334719627,
                1.12,
                297.42
              ],
              [
                1603334780218,
                1.36,
                297.51
              ],
              [
                1603334840654,
                1.2,
                298.86
              ],
              [
                1603334903723,
                0.9,
                307.66
              ],
              [
                1603334964020,
                0.73,
                307.75
              ],
              [
                1603335024337,
                0.43,
                307.75
              ],
              [
                1603335084653,
                0.28,
                307.75
              ],
              [
                1603335145354,
                0.55,
                307.66
              ],
              [
                1603335205975,
                0.76,
                307.57
              ],
              [
                1603335269256,
                0.14,
                307.66
              ],
              [
                1603335332736,
                0.4,
                307.66
              ],
              [
                1603335393224,
                0.14,
                307.66
              ],
              [
                1603335453730,
                0.14,
                307.66
              ],
              [
                1603335514147,
                0.43,
                307.66
              ],
              [
                1603335577294,
                0.62,
                308.38
              ],
              [
                1603335637604,
                0.51,
                308.38
              ],
              [
                1603335698160,
                0.7,
                308.38
              ],
              [
                1603335758581,
                0.55,
                308.38
              ],
              [
                1603335819087,
                0.47,
                308.11
              ],
              [
                1603335882632,
                0.59,
                307.75
              ],
              [
                1603335942995,
                0.58,
                307.57
              ],
              [
                1603336003501,
                0.55,
                307.66
              ],
              [
                1603336066853,
                0.25,
                308.47
              ],
              [
                1603336127181,
                0.8,
                307.66
              ],
              [
                1603336190417,
                0.69,
                308.11
              ],
              [
                1603336251191,
                0.43,
                307.75
              ],
              [
                1603336311694,
                0.47,
                307.66
              ],
              [
                1603336372262,
                0.18,
                307.66
              ],
              [
                1603336432763,
                0.51,
                307.75
              ],
              [
                1603336493460,
                0.58,
                307.57
              ],
              [
                1603336556698,
                0.18,
                307.57
              ],
              [
                1603336617196,
                1.11,
                307.66
              ],
              [
                1603336677714,
                1.17,
                267.05
              ],
              [
                1603336738149,
                0.9,
                266.96
              ],
              [
                1603336798566,
                1.06,
                267.42
              ],
              [
                1603336858873,
                0.7,
                268.49
              ],
              [
                1603336919347,
                0.8,
                268.49
              ],
              [
                1603336982746,
                0.29,
                268.49
              ],
              [
                1603337043292,
                0.28,
                268.49
              ],
              [
                1603337103813,
                0.14,
                268.49
              ],
              [
                1603337164145,
                0.81,
                268.49
              ],
              [
                1603337224557,
                0.58,
                268.49
              ],
              [
                1603337287987,
                0.83,
                268.58
              ],
              [
                1603337348449,
                0.83,
                268.49
              ],
              [
                1603337409080,
                0.98,
                268.58
              ],
              [
                1603337469386,
                1.46,
                269.31
              ],
              [
                1603337532299,
                1.54,
                270.47
              ],
              [
                1603337593391,
                1.67,
                270.38
              ],
              [
                1603337654013,
                1.45,
                271.28
              ],
              [
                1603337716850,
                1.51,
                272.71
              ],
              [
                1603337777214,
                1.39,
                269.31
              ],
              [
                1603337840584,
                1.16,
                269.31
              ],
              [
                1603337900897,
                0.33,
                269.31
              ],
              [
                1603337964382,
                0.14,
                269.31
              ],
              [
                1603338024809,
                0.14,
                269.31
              ],
              [
                1603338085324,
                0.14,
                269.31
              ],
              [
                1603338145841,
                0.56,
                274.15
              ],
              [
                1603338209085,
                0.17,
                281.07
              ],
              [
                1603338269627,
                0.58,
                281.43
              ],
              [
                1603338332869,
                0.95,
                265.08
              ],
              [
                1603338393341,
                0.62,
                265.08
              ],
              [
                1603338459752,
                0.44,
                265.08
              ],
              [
                1603338523234,
                0.41,
                265.08
              ],
              [
                1603338583720,
                0.14,
                265.08
              ],
              [
                1603338649615,
                0.14,
                265.08
              ],
              [
                1603338712657,
                0.14,
                265.08
              ],
              [
                1603338775864,
                0.14,
                265.08
              ],
              [
                1603338836178,
                0.14,
                265.08
              ],
              [
                1603338896498,
                0.14,
                265.08
              ],
              [
                1603338956957,
                0.14,
                265.08
              ],
              [
                1603339020199,
                0.48,
                265.08
              ],
              [
                1603339080663,
                0.65,
                265.08
              ],
              [
                1603339141174,
                0.48,
                265.17
              ],
              [
                1603339204408,
                0.76,
                265.08
              ],
              [
                1603339265080,
                0.14,
                265.08
              ],
              [
                1603339328208,
                0.14,
                265.08
              ],
              [
                1603339388518,
                0.14,
                265.08
              ],
              [
                1603339449089,
                0.14,
                265.08
              ],
              [
                1603339509600,
                0.14,
                265.08
              ],
              [
                1603339570149,
                0.14,
                265.08
              ],
              [
                1603339630660,
                0.14,
                265.08
              ],
              [
                1603339691160,
                0.14,
                265.08
              ],
              [
                1603339751699,
                0.14,
                265.08
              ],
              [
                1603339814755,
                0.14,
                265.08
              ],
              [
                1603339877761,
                1.5,
                33.66
              ],
              [
                1603339939183,
                1.12,
                51
              ],
              [
                1603339999871,
                0.58,
                50.19
              ],
              [
                1603340060431,
                0.76,
                50.19
              ],
              [
                1603340120942,
                1.34,
                27.55
              ],
              [
                1603340181575,
                1.5,
                330.22
              ],
              [
                1603340248246,
                1.46,
                324.56
              ],
              [
                1603340307410,
                1.46,
                324.56
              ],
              [
                1603340307866,
                1.16,
                324.46
              ],
              [
                1603340368190,
                0.69,
                324.73
              ],
              [
                1603340428756,
                0.14,
                324.46
              ],
              [
                1603340489061,
                0.76,
                336.59
              ],
              [
                1603340552530,
                0.62,
                339.19
              ],
              [
                1603340612971,
                0.14,
                339.55
              ],
              [
                1603340673386,
                0.14,
                339.55
              ],
              [
                1603340736559,
                0.14,
                339.55
              ],
              [
                1603340800062,
                0.14,
                339.55
              ],
              [
                1603340861043,
                0.95,
                338.39
              ],
              [
                1603340921629,
                0.73,
                334.26
              ],
              [
                1603340985108,
                0.48,
                334.61
              ],
              [
                1603341048623,
                0.14,
                334.16
              ],
              [
                1603341111733,
                0.15,
                334.16
              ],
              [
                1603341172057,
                0.14,
                334.16
              ],
              [
                1603341232379,
                0.14,
                334.16
              ],
              [
                1603341292907,
                0.87,
                334.16
              ],
              [
                1603341353426,
                0.69,
                334.16
              ],
              [
                1603341413848,
                0.33,
                334.26
              ],
              [
                1603341474376,
                0.14,
                334.26
              ],
              [
                1603341537691,
                0.14,
                334.26
              ],
              [
                1603341600936,
                0.51,
                334.26
              ],
              [
                1603341661461,
                0.88,
                334.26
              ],
              [
                1603341721971,
                0.91,
                334.26
              ],
              [
                1603341782291,
                0.9,
                334.35
              ],
              [
                1603341845219,
                0.91,
                334.61
              ],
              [
                1603341905691,
                0.99,
                334.35
              ],
              [
                1603341966017,
                0.62,
                334.26
              ],
              [
                1603342026631,
                0.14,
                334.26
              ],
              [
                1603342087144,
                0.14,
                334.26
              ],
              [
                1603342147649,
                0.14,
                334.26
              ],
              [
                1603342208190,
                0.14,
                334.26
              ],
              [
                1603342271399,
                0.14,
                334.26
              ],
              [
                1603342331886,
                0.99,
                334.26
              ],
              [
                1603342392281,
                0.95,
                334.16
              ],
              [
                1603342452931,
                1.02,
                334.52
              ],
              [
                1603342516455,
                0.48,
                334.61
              ],
              [
                1603342576881,
                0.33,
                334.26
              ],
              [
                1603342640368,
                0.14,
                334.26
              ],
              [
                1603342700705,
                0.14,
                334.26
              ],
              [
                1603342761251,
                0.55,
                334.26
              ],
              [
                1603342826868,
                0.69,
                334.26
              ],
              [
                1603342890516,
                0.73,
                334.26
              ],
              [
                1603342950993,
                0.17,
                334.26
              ],
              [
                1603343014420,
                0.95,
                334.35
              ],
              [
                1603343074907,
                1.02,
                270.38
              ],
              [
                1603343135335,
                0.94,
                270.74
              ],
              [
                1603343195936,
                0.83,
                270.38
              ],
              [
                1603343256341,
                0.83,
                270.38
              ],
              [
                1603343316845,
                1.13,
                276.94
              ],
              [
                1603343377265,
                1.35,
                282.86
              ],
              [
                1603343437709,
                1.39,
                287.81
              ],
              [
                1603343498240,
                1.79,
                292.66
              ],
              [
                1603343558829,
                1.5,
                287.72
              ],
              [
                1603343619149,
                1.31,
                290.41
              ],
              [
                1603343680078,
                1.39,
                281.43
              ],
              [
                1603343740515,
                1.61,
                284.39
              ],
              [
                1603343801030,
                1.8,
                280.62
              ],
              [
                1603343861545,
                1.49,
                273.8
              ],
              [
                1603343921954,
                1.19,
                272.71
              ],
              [
                1603343982478,
                0.94,
                267.05
              ],
              [
                1603344042966,
                1.36,
                262.83
              ],
              [
                1603344106470,
                0.96,
                262.83
              ],
              [
                1603344167012,
                1.09,
                271.18
              ],
              [
                1603344230498,
                1.54,
                289.96
              ],
              [
                1603344291008,
                1.9,
                291.05
              ],
              [
                1603344351445,
                1.69,
                291.85
              ]
            ]
          }
        ]
      }
    ],
    "executedQueryString": "SELECT\n  time,\n  \"windspeed\"  AS speed,\n  \"winddirection\"  AS direction\nFROM \n \"weather_data\" \nWHERE  (\"sensor\" = 'esp_weather_measurement') AND time >= now() - 6h\nORDER BY time"
  }
}

@jdavid
Copy link
Member

jdavid commented Oct 22, 2020

Can you check Format as is set to Time series (not Table) ?

@dervomsee
Copy link
Author

It makes no difference. The windrose error is with format Time series the following:


An unexpected error happened
RangeError: invalid array length

    in t
    in Cn
    in t
    in div
    in div
    in div
    in div
    in div
    in t
    in t
    in t
    in div
    in Mo
    in div
    in dn
    in div
    in div
    in t
    in div
    in t
    in div
    in t
    in div
    in t
    in div
    in div
    in t
    in x
    in div
    in t
    in x
    in r
    in Unknown
    in t
    in Unknown
    in h
    in Unknown
    in Unknown
    in t
    in t
    in l

@beerygaz
Copy link

beerygaz commented Jan 6, 2021

Did anyone ever find a solution to the InfluxDB issue? I'm getting the same error when trying to use the plugin using data from InfluxDB

@mpenn0
Copy link

mpenn0 commented May 23, 2021

Hi. I've been experimenting around a bit too.

A bit difficult were the settings, because at the first call everything was empty.

A graphic was only shown when I had set the value for "Step" from "0" to "1" under "Options".

The following must be entered in the InfluxDB query:
For A:
SELECT "value" FROM "alias.0.Wetterstation.Wind-Mittel" WHERE $timeFilter
Importend is "Format AS" with "Time series" and very importend the "Alias by" with the the name "speed"

For B:
SELECT "value" FROM "alias.0.Wetterstation.Wind-Richtung" WHERE $timeFilter
The same here: "Format AS" with "Time series" and very importend the "Alias by" with the the name "direction".

Attached also a screenshot of the settings.
grafik

My wind rose and installation steps can be seen here.
I use Grafana v7.5.7

@jdavid Can you please add the parameter query for the Influx DB in the readme?

@jdavid
Copy link
Member

jdavid commented Feb 7, 2022

PR #19 by @orymate (already merged) adds support for InfluxDB and includes an example, see https://github.com/spectraphilic/grafana-windrose#flux

I've not tested it myself (don't use InfluxDB), but does this solve your issues with InfluxDB?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants