Collectd - openwrt and espeasy

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sash99
New user
Posts: 2
Joined: 20 Jan 2019, 15:18

Collectd - openwrt and espeasy

#1 Post by sash99 » 20 Jan 2019, 17:04

hi there, I started using esp Easy for my energy monitor project.. it uses and openwrt OS collectd for data collection and influxdb as the database graphing is done either by chonograf or grafana --locally or remotely depending on your preference) and for automation Domoticz.... it work very well and all and the best thing is for inputs it is extremely easy. none of this configuring nodes --. it is done through the format of the MQTT. and you can input data at extremely high rates .. ( 65000 inputs a second)
data collection is handled by collectd 5.8 mqtt (also writing to influx is handles by collectd.) and since its built on openwrt foundation with out infuxdb installed locally, the entire operating system when compress is less then 10 megs.. for a fully functioning energy/ IOT monitor. that can be installed on hundreds of different routers or pi devices ( i use the bananapi r1 or r2 ( support local sata)-- but functions just as well on a $7 orange pi zero or first generation raspberry pi. or archer c7 router if you want ).. since it based on collectd basically you can monitor thousand location very easily

but anyways i can not see how one can formats a custom string for mqtt in espeasy.. the string is not that hard.. example and break down of the string

mosquitto_pub -t 'incoming/OpenWrt/mqtt-Energy/power-grid' -m 'N:21.5'

topic : -t
incoming = what collectd uses to monitor incoming data ( required)
Openwrt = equal the host sending the mqtt - the name of the device sending the info or the absolute location
mqtt = what collectd plugin to use (required)
Energy = what subgroup for graphing with rrd ( my current groups are Energy, Flow, Temp, Humidity, Pressure) if using influxdb you can use anything you want as a subgroup name
power= how collectd processes the data- as absolute, derive, counter or gauge ( categories found in collectd type.db ( require)
grid = another subgroup it can be what ever you want the name of the device or location bathroom, living room etc....

metrics: -m
N = is the time of the data -- either N for now or or specified epoch time
21.5 - the actual data sent


how and where would one formats a custom Mqtt string in espeasy


perhaps at some point the developers of espeasy might naively support collectd mqtt as it is a well established data collection system..

sash99
New user
Posts: 2
Joined: 20 Jan 2019, 15:18

Re: Collectd - openwrt and espeasy

#2 Post by sash99 » 20 Jan 2019, 22:34

okay I sort of figured out how to do a work around..

I used one of your preexisting MQTT agents - domoticz- set to my broker parameters--

enabled rules and inserted this :

Code: Select all

on temp1#Temperature do
  Publish incoming/GPS_OPi/mqtt-Temp/temperature-greenhouse,N:[temp1#Temperature] 
endon

on temp2#Temperature do
  Publish incoming/GPS_OPi/mqtt-Temp/temperature-seedbed,N:[temp2#Temperature] 
endon
and in logs

Code: Select all

3434363: Domoticz: Sensortype: 1 idx: 3 values: 19.50
3435407: DS : Temperature: 20.00 (28-ff-89-d8-70-16-3-26)
3435410: EVENT: temp2#Temperature=20.00
3435434: ACT : Publish incoming/GPS_OPi/mqtt-Temp/temperature-seedbed,N:20.00
3435442: Command: publish
3435446: Domoticz: Sensortype: 1 idx: 4 values: 20.00
3452007: WD : Uptime 58 ConnectFailures 0 FreeMem 19360
now it stores and collectd Data in rrd file automatically on the router itself for any new data inputs -- for quick easy viewing and sends data automatically to a influxdb creating new database also automatically if needed without any user input- simple as pie set up procedures :) for any new devices -- and everything contained within in one single device that acts as a router for your home /bussines internet, IOT data logging and home automation.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests