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

mqtt plugin: Unknown type: #4100

Open
ves1820 opened this issue Mar 19, 2023 · 2 comments
Open

mqtt plugin: Unknown type: #4100

ves1820 opened this issue Mar 19, 2023 · 2 comments

Comments

@ves1820
Copy link

ves1820 commented Mar 19, 2023

  • Version of collectd: collectd 5.12.0
  • Operating system / distribution: linux / openwrt 22.03.3
  • Kernel version (if applicable): -

Expected behavior

read data from mqtt-broker and write data to RRD plugin

(Description of the behavior / output that you expected)
Subscribe is working
data received:

stat/tasmota_9292EF/RESULT {"POWER1":"off"}
stat/tasmota_9292EF/POWER1 off
stat/tasmota_9292EF/RESULT {"POWER1":"on"}
stat/tasmota_9292EF/POWER1 on

Actual behavior

the data where not recognized:

mqtt plugin: Unknown type: "RESULT".
mqtt plugin: Unknown type: "POWER1".

(Description of the behavior / output that you observed)

Steps to reproduce

  • install collectd / mqtt plugin
  • configure mqtt in /etc/collectd/conf.d/mqtt.conf
<Plugin "mqtt">
   <Subscribe "outdoor">
     Host "127.0.0.1"
     Topic "stat/tasmota_9292EF/#"
     CleanSession true
   </Subscribe>
</Plugin>
@eero-t
Copy link
Contributor

eero-t commented Mar 20, 2023

Thanks for reporting this!

PR fixing the issue would be welcome. Otherwise it can take a long time until there's a fix for the issue.

(There are only few active developers, and they primarily look into plugins that they use / can test themselves.)

@viulian
Copy link

viulian commented Jul 20, 2023

I would argue that this is not a bug.

The mqtt.c plugin expects to find a data set called RESULT (or POWER1) here:

  ds = plugin_get_ds(vl.type);
  if (ds == NULL) {
    ERROR("mqtt plugin: Unknown type: \"%s\".", vl.type);
    return;
  }

(for a direct link):

ERROR("mqtt plugin: Unknown type: \"%s\".", vl.type);

Which, means that collectd expects to find a data set called POWER1 or RESULT into types.db - which, if you just installed collectd, most likely are not defined.

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

No branches or pull requests

4 participants