[英]IoTAgent-LoRaWAN is apparently not working as expected
我試圖使用 TTN 憑據配置 IoTAgent-LoRaWAN,我正在關注官方文檔,這是我的 POST 請求:
{
"devices": [
{
"device_id": "{{node}}",
"entity_name": "LORA-N-0",
"entity_type": "LoraDevice",
"timezone": "Europe/Madrid",
"attributes": [
{
"object_id": "potVal",
"name": "Pot_Value",
"type": "Number"
}
],
"internal_attributes": {
"lorawan": {
"application_server": {
"host": "eu.thethings.network",
"username": "{{TTN_app_id}}",
"password": "{{TTN_app_pw}}",
"provider": "TTN"
},
"dev_eui": "{{TTN_dev_eui}}",
"app_eui": "{{TTN_app_eui}}",
"application_id": "{{TTN_app_id}}",
"application_key": "{{TTN_app_skey}}"
}
}
}
]
}
顯然,我正在使用 Postman 來管理集合中的所有 HTTP 請求,並且我設置了一些環境變量:
{{node}}
-> 設備 ID node_0
{{TTN_app_id}}
-> 我選擇dendrometer
的應用程序 ID
{{TTN_app_pw}}
-> 圖中顯示的應用程序訪問密鑰(可以在與應用程序概述相同的視圖中找到; https://console.thethingsnetwork.org/applications/<application_id>
)
{{TTN_dev_eui}}
和{{TTN_app_eui}}
也顯示在下圖中(關於設備;我認為這些不是敏感信息,因為 TTN 沒有隱藏它們,那是因為我正在發布圖片)
{{TTN_app_skey}}
-> 應用程序 Session 密鑰也顯示在下圖中(最后一個)
關鍵是……一旦我使用該請求配置了 IoTAgent, docker-compose logs -f iot-agent
就會顯示以下錯誤:
fiware-iot-agent | {"timestamp":"2020-06-23T11:45:53.689Z","level":"info","message":"New message in topic"}
fiware-iot-agent | {"timestamp":"2020-06-23T11:45:53.690Z","level":"info","message":"IOTA provisioned devices:"}
fiware-iot-agent | {"timestamp":"2020-06-23T11:45:53.691Z","level":"info","message":"Decoding CaynneLPP message:+XQ="}
fiware-iot-agent | {"timestamp":"2020-06-23T11:45:53.691Z","level":"error","message":"Error decoding CaynneLPP message:Error: Invalid CayennLpp buffer size"}
fiware-iot-agent | {"timestamp":"2020-06-23T11:45:53.691Z","level":"error","message":"Could not cast message to NGSI"}
所以我認為有些東西不能正常工作。 那是我的docker-compose.yml
,順便說一句http://ix.io/2pWd
但是我不認為問題是由 docker 引起的,所有容器顯然都按預期工作,因為我可以請求它們的版本並且我沒有在日志中看到錯誤消息。
另外......我覺得文檔不完整,我想要更多信息,關於如何使用 OrionCB 訂閱這些配置的設備(?)或刪除它們(文檔中沒有顯示,盡管只是對適當的 DELETE 請求URL。)
無論如何......我做錯了什么? 謝謝你們。
編輯:我覺得 IoTAgent 本身有問題,以下錯誤消息中有錯字:
fiware-iot-agent | {"timestamp":"2020-06-23T11:45:53.691Z","level":"info","message":"Decoding CaynneLPP message:+XQ="}
fiware-iot-agent | {"timestamp":"2020-06-23T11:45:53.691Z","level":"error","message":"Error decoding CaynneLPP message:Error: Invalid CayennLpp buffer size"}
因為它不是 CaynneLPP 而是 CayenneLPP。 我還在其 GitHub 存儲庫中打開了一個問題,但我預計他們不會很快回答。 我真的覺得這個項目已經被放棄了。
這顯然是編碼的問題,我使用的是arduinio-lmic庫建議的編碼方法,但 FIWARE 確實在 CayenneLPP 數據 model 下工作。 所以我將嘗試替換該編碼方法。
無論如何,謝謝大家,特別是@arjan
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.