First of all I think the the Application Server events PSQL integration is great, thank you.
My question is related to the state of the rx_info column in the device_up relation, currently it is ‘null’.
Is this an issue on my end or is that part of the integration not complete?
My current remedy is listening to gateway mqtt messages and updating device_up rows with some backend logic, it’s not elegant.
Note that I’m running Docker containers and [integration]marshaler=“json” gateway-bridge configuration.
I would like to visualize the rx_info contents with Grafana, other information is working correctly.
Notice that I’m using varibales like $dev_eui, they are useful so you can have the same graphs for your whole device fleet. You then have a select list at the top of the view to choose your device.
My variable is misnamed, it should be $device_name
so i cant convert to “numeric” the text as it contain some text charactere as [°C; KΩ,hPa etc…]
in my query i have somethings like :
SELECT (Column: object -> ‘DecodeDataObj’ -> ‘environment’ ->> ‘humidity’) :: numeric
Sure i could change the codec, but this is not the question…
sure i could use influxDb but still the same answer…
store in the db only numeric data without text addition names of measurement units. otherwise it will be text data. which makes difficult to work with values
And futhermore as my data is encoded… (all environmental data are in a chain of byte )
so after that i don’t know how to split it into different column for a database storage…
if your hex data is the pure text string with special symbolic names of values, you are need to use the substr. if not, rewrite the codec without adding °C; KΩ,hPa etc…
use the construction like this js-example:
decoded.temperature = bytes[offset];
offset += 1; // bytes offset depends on your payload structure
decoded.humidity = bytes[offset];
return decoded;