TTN V3(MQTT JSON) - > telegraf-> Grafana/ dragino lse01的传感器数据不适合

发布于 2025-02-04 18:13:36 字数 4333 浏览 3 评论 0原文

我在泰蒂格拉夫有问题。我有一个在TTN V3上注册的Dragino LSE01-8传感器。我可以通过订阅主题“ V3/LSE01-8@ttn/devices/+/up”来检查解码的有效载荷。

但是,当我想从涌入中获取数据时,尽管数据出现在JSON中,但我无法获得“ temp_soil”和“ water_soil”。 “ conduct_soil”没问题。但是我不知道为什么。有人可以给我一个提示吗?

另一个传感器(Dragino LHT 65)与我要访问的所有数据都可以正常工作。

可以从涌入数据库获取这些数据:

uplink_message_decoded_pa​​yload_batv uplink_message_decoded_pa​​yload_mod uplink_message_decoded_pa​​yload_conduct_soil uplink_message_decoded_pa​​yload_i_flag uplink_message_decoded_pa​​yload_s_flag uplink_message_f_cnt uplink_message_f_port uplink_message_locations_user_latitude uplink_message_locations_user_longitude UPLINK_MESSAGE_RX_METADATA_0_CHANNEL_INDEX UPLINK_MESSAGE_RX_METADATA_0_CHANNEL_RSSI uplink_message_rx_metadata_0_location_altitude UPLINK_MESSAGE_RX_METADATA_0_LATICE_LATITUDE uplink_message_rx_metadata_0_location_longitude uplink_message_rx_metadata_0_rssi uplink_message_rx_metadata_0_snr UPLINK_MESSAGE_RX_METADATA_0_TIMESTAMP uplink_message_settings_data_rate_lora_bandwidth uplink_message_settings_data_rate_lora_spreading_factor uplink_message_settings_timestamp

## Feuchtigkeitssensor Dragino LSE01-8
[[inputs.mqtt_consumer]]
  name_override = "TTN-LSE01"
  servers = ["tcp://eu1.cloud.thethings.network:1883"]
  qos = 0
  connection_timeout = "30s"
  topics = [ "v3/lse01-8@ttn/devices/+/up" ]
  client_id = "telegraf"
  username = "lse01-8@ttn"
  password = "NNSXS.LLSNSE67AP..................P67Q.Q...........HPG............KJA..........."   //
  data_format = "json"

这是我可以获得的JSON数据(我更改了一些数据以不发送任何密码或令牌)。

{
   "end_device_ids":{
      "device_id":"eui-a8.40.141.bbe4",
      "application_ids":{
         "application_id":"lse01-8"
      },
      "dev_eui":"A8...40.BE...4",
      "join_eui":"A8.40.010.1",
      "dev_addr":"2.9F.....8"
   },
   "correlation_ids":[
      "as:up:01G4WDNS..P3C3R...RK56VQ...KT7N076",
      "gs:conn:01G4H2F.ETRG.V2QER...RQ.0K1MGZ44",
      "gs:up:host:01G4H2F.ETWRZX.4PFN.A2M.6RDKD4",
      "gs:uplink:01G4WDN.N7B6P.J8E.JS.503F1",
      "ns:uplink:01G4WDNSFM.MCYYEZZ1.KY.4M78",
      "rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01G4W.NSFM29Z3.PABYW...43",
      "rpc:/ttn.lorawan.v3.NsAs/HandleUplink:01G4W....VTQ4DMKBF"
   ],
   "received_at":"2022-06-06T11:51:18.979353604Z",
   "uplink_message":{
      "session_key_id":"AYE...j+DM....A==",
      "f_port":2,
      "f_cnt":292,
      "frm_payload":"DSQAAAcVB4AADBA=",
      "decoded_payload":{
         "BatV":3.364,
         "Mod":0,
         "conduct_SOIL":12,
         "i_flag":0,
         "s_flag":1,
         "temp_DS18B20":"0.00",
         "temp_SOIL":"19.20",
         "water_SOIL":"18.13"
      },
      "rx_metadata":[
         {
            "gateway_ids":{
               "gateway_id":"lr8",
               "eui":"3.6201F0.058.....00"
            },
            "time":"2022-06-06T11:51:00.289713Z",
            "timestamp":4283143007,
            "rssi":-47,
            "channel_rssi":-47,
            "snr":7,
            "location":{
               "latitude":51.______________,
               "longitude":6.__________________,
               "altitude":25,
               "source":"SOURCE_REGISTRY"
            },
            "uplink_token":"ChsKG________________________________",
            "channel_index":2
         }
      ],
      "settings":{
         "data_rate":{
            "lora":{
               "bandwidth":125000,
               "spreading_factor":7
            }
         },
         "coding_rate":"4/5",
         "frequency":"868500000",
         "timestamp":4283143007,
         "time":"2022-06-06T11:51:00.289713Z"
      },
      "received_at":"2022-06-06T11:51:18.772518399Z",
      "consumed_airtime":"0.061696s",
      "locations":{
         "user":{
            "latitude":51._________________,
            "longitude":6.__________________4,
            "source":"SOURCE_REGISTRY"
         }
      },
      "version_ids":{
         "brand_id":"dragino",
         "model_id":"lse01",
         "hardware_version":"_unknown_hw_version_",
         "firmware_version":"1.1.4",
         "band_id":"EU_863_870"
      },
      "network_ids":{
         "net_id":"000013",
         "tenant_id":"ttn",
         "cluster_id":"eu1",
         "cluster_address":"eu1.cloud.thethings.network"
      }
   }
}

I have a problem with Telegraf. I have a Dragino LSE01-8 sensor which is registered on TTN v3. I can check the decoded payload by subscribing to the topic "v3/lse01-8@ttn/devices/+/up".

But when I want to grab the data from Influx, I can not get "temp_SOIL" and "water_SOIL", although the data appears in JSON. "conduct_SOIL" is no problem. But I don't know why. Can somebody give me a hint?

Another sensor (Dragino LHT 65) works fine with all data I want to access.

It's possible to get this data from the Influx-Database:

uplink_message_decoded_payload_BatV
uplink_message_decoded_payload_Mod
uplink_message_decoded_payload_conduct_SOIL
uplink_message_decoded_payload_i_flag
uplink_message_decoded_payload_s_flag
uplink_message_f_cnt
uplink_message_f_port
uplink_message_locations_user_latitude
uplink_message_locations_user_longitude
uplink_message_rx_metadata_0_channel_index
uplink_message_rx_metadata_0_channel_rssi
uplink_message_rx_metadata_0_location_altitude
uplink_message_rx_metadata_0_location_latitude
uplink_message_rx_metadata_0_location_longitude
uplink_message_rx_metadata_0_rssi
uplink_message_rx_metadata_0_snr
uplink_message_rx_metadata_0_timestamp
uplink_message_settings_data_rate_lora_bandwidth
uplink_message_settings_data_rate_lora_spreading_factor
uplink_message_settings_timestamp

## Feuchtigkeitssensor Dragino LSE01-8
[[inputs.mqtt_consumer]]
  name_override = "TTN-LSE01"
  servers = ["tcp://eu1.cloud.thethings.network:1883"]
  qos = 0
  connection_timeout = "30s"
  topics = [ "v3/lse01-8@ttn/devices/+/up" ]
  client_id = "telegraf"
  username = "lse01-8@ttn"
  password = "NNSXS.LLSNSE67AP..................P67Q.Q...........HPG............KJA..........."   //
  data_format = "json"

This is the JSON data I can get (I changed some data in order not to send any passwords or tokens).

{
   "end_device_ids":{
      "device_id":"eui-a8.40.141.bbe4",
      "application_ids":{
         "application_id":"lse01-8"
      },
      "dev_eui":"A8...40.BE...4",
      "join_eui":"A8.40.010.1",
      "dev_addr":"2.9F.....8"
   },
   "correlation_ids":[
      "as:up:01G4WDNS..P3C3R...RK56VQ...KT7N076",
      "gs:conn:01G4H2F.ETRG.V2QER...RQ.0K1MGZ44",
      "gs:up:host:01G4H2F.ETWRZX.4PFN.A2M.6RDKD4",
      "gs:uplink:01G4WDN.N7B6P.J8E.JS.503F1",
      "ns:uplink:01G4WDNSFM.MCYYEZZ1.KY.4M78",
      "rpc:/ttn.lorawan.v3.GsNs/HandleUplink:01G4W.NSFM29Z3.PABYW...43",
      "rpc:/ttn.lorawan.v3.NsAs/HandleUplink:01G4W....VTQ4DMKBF"
   ],
   "received_at":"2022-06-06T11:51:18.979353604Z",
   "uplink_message":{
      "session_key_id":"AYE...j+DM....A==",
      "f_port":2,
      "f_cnt":292,
      "frm_payload":"DSQAAAcVB4AADBA=",
      "decoded_payload":{
         "BatV":3.364,
         "Mod":0,
         "conduct_SOIL":12,
         "i_flag":0,
         "s_flag":1,
         "temp_DS18B20":"0.00",
         "temp_SOIL":"19.20",
         "water_SOIL":"18.13"
      },
      "rx_metadata":[
         {
            "gateway_ids":{
               "gateway_id":"lr8",
               "eui":"3.6201F0.058.....00"
            },
            "time":"2022-06-06T11:51:00.289713Z",
            "timestamp":4283143007,
            "rssi":-47,
            "channel_rssi":-47,
            "snr":7,
            "location":{
               "latitude":51.______________,
               "longitude":6.__________________,
               "altitude":25,
               "source":"SOURCE_REGISTRY"
            },
            "uplink_token":"ChsKG________________________________",
            "channel_index":2
         }
      ],
      "settings":{
         "data_rate":{
            "lora":{
               "bandwidth":125000,
               "spreading_factor":7
            }
         },
         "coding_rate":"4/5",
         "frequency":"868500000",
         "timestamp":4283143007,
         "time":"2022-06-06T11:51:00.289713Z"
      },
      "received_at":"2022-06-06T11:51:18.772518399Z",
      "consumed_airtime":"0.061696s",
      "locations":{
         "user":{
            "latitude":51._________________,
            "longitude":6.__________________4,
            "source":"SOURCE_REGISTRY"
         }
      },
      "version_ids":{
         "brand_id":"dragino",
         "model_id":"lse01",
         "hardware_version":"_unknown_hw_version_",
         "firmware_version":"1.1.4",
         "band_id":"EU_863_870"
      },
      "network_ids":{
         "net_id":"000013",
         "tenant_id":"ttn",
         "cluster_id":"eu1",
         "cluster_address":"eu1.cloud.thethings.network"
      }
   }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文