hardwareid in InfluxDB

41 views
Skip to first unread message

Shaun Houghton

unread,
Jan 3, 2018, 5:57:04 AM1/3/18
to SiteWhere
I have converted to using the MongoDB/InfluxDB combination for data storage.  All events are logging into the InfluxDB with no problems.  Is it possible to modify which fields are added to the InfluxDB data points?  For example it would be very useful for us to get the hardwareid, as currently only the assignmentid is logged.  The hardwareid is more useful to us as it allows for the identification of a specific device without having to first reference the SiteWhere system using the assignmentid.  

Derek Adams

unread,
Jan 3, 2018, 7:12:09 AM1/3/18
to SiteWhere
Thanks for the suggestion. We added a GitHub issue to make sure this is addressed in the 2.0 release:

Shaun Houghton

unread,
Jan 3, 2018, 9:52:21 AM1/3/18
to SiteWhere
Hi Derek, thanks for acknowledging the query, looking forward to the 2.0 release.

Gary Smith

unread,
Jan 11, 2018, 1:16:20 PM1/11/18
to SiteWhere
IAs a work around it's possible to add custom tags   which will can be added based on a per device assignment.

If for example via Sitewhere admin UI  you go into a device assignment and edit it's metadata you can add a influx tag  by adding metada field prefixed by INFLUX_TAG_  and assigning a value to it  e.g.

INFLUX_TAG_HARDWARE_ID      12345676

This should result in a tag named HARDWARE_ID with a value 12345676 being added to your data in influxdb.

This is in the later versions of Sitewhere 1.X  definitely in 1.13

May not be practical to go through all your current devices manually and do this but it could be a work around for the moment.

Shaun Houghton

unread,
Jan 12, 2018, 7:41:36 AM1/12/18
to SiteWhere
Hi, thanks for sharing this, I have tried adding the INFLUX_TAG metadata to the assignment and it works. Running SiteWhere 1.12.0 CE.

The device load is quite low at the moment so should not be too much trouble to update all the assignments.

Reply all
Reply to author
Forward
0 new messages