grafana / iot-sitewise-datasource

IoT Sitewise
Apache License 2.0
18 stars 10 forks source link

Unable to extract out a bit from AWS IoT SiteWise Asset Property #360

Open kzawad1-ces opened 1 month ago

kzawad1-ces commented 1 month ago

Is your feature request related to a problem? Please describe.

I want the ability to take a AWS IoT SiteWise Asset Property that is a fault or alarm. This is usually some type of integer 16/32 bit unsigned integer where each bit represents a specific alarm.

If I have an alarm/fault property I want to be able to extract out a specific bit.

Describe the solution you'd like I want to be able to add a visual that can take 1 bit value from an SiteWise Asset Property and visualize it.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. I am told that with other data sources one can do a transformation or run a query on the data SELECT (your_integer & 1023) AS extracted_bits FROM your_measurement.

However, this is not possible with the AWS IoT SiteWise data source.

Additional context This is something very common with industrial automation and specifically industrial assets where a Mosbus or OPC-UA device has a integer values where bits represent alarms and fauls.

diehbria commented 1 month ago

Hi thanks for reaching out, the work around to achieve this functionality currently is to create a GreenGrass component to do the mapping and decoded to a string during ingestion process. Please let me know if you have any further questions.