Closed avbentem closed 3 years ago
@jpmeijers Can you have a look why this is wrong?
Isn't this fixed @Ragnn @romeovs ?
Not yet. I'll work on it soon. @Ragnn added the backend part, but the front-end needs to be updated to reflect that.
This should be fixed by fe151b7f53. Can you confirm @avbentem?
@romeovs: This issue is still not resolved (as far as I can see on the PCN console).
Take as an example the office-app
. Our sensor at HQ should show an airtime of 51.456
. The gateway view shows the correct value, but the Data view doesn't.
Today I started with the implementation of #682, which adds the airtime to uplink (and downlink event) metadata. When deployed, that value can be displayed in the console.
The estimated airtime shown in the console is calculated by the github.com/TheThingsNetwork/ttn/utils/toa
package. Could it be that the parameters are interpreted wrongfully?
Both values are calculated by the console. One is correct, another isn't.
Coule it be that the console gives the wrong parameters to the toa
package? https://github.com/TheThingsIndustries/console/blob/master/server/api/events/app_subscription.go#L302-L305
Difference between PHY payload and application payload could be the cause? If so, how to get the PHY payload length?
Likely. In that case it can be resolved when https://github.com/TheThingsNetwork/ttn/commit/0f795e39c6f00b663f70212595de09cf4f2c92a4 is live
Is this still unsolved? I'm seeing some differences and I think the application estimated airtime is wrong.
Sending 38 byte of app payload, resulting in 51 byte payload in the gateway overview:
In the application:
And this is calculated with the Semtech LoRa Model Calculator Tool:
I recently had The Things Network stop the movement of all my data from my gateway to my apps due to going over the 30-second daily limit (not just the offending app/device, but all of my devices, even the ones not exceeding 30 seconds/day). This was due to using the app airtime estimate. Using the gateway airtime (which was significantly greater than the estimated airtime in the app), data began appearing in my apps again. I see reporting incorrect airtime (or calculation) as a significant bug.
Additionally, is it expected behavior for data from all apps to cease operating when one device exceeds the daily transmission limit?
Hi @kizniche, the 30-second daily limit is not enforced; we don't even have any code to do that, so I can with 100% certainty say that the lack of traffic was not caused by this.
Thank you for the clarification. Perhaps it's just a coincidence they all stopped. I'll have to investigate further.
This is a bug report for the console.
Get the correct estimated airtime of a packet in TTN Console.
Sent a 21 bytes packet (8 bytes application payload) on SF7. For this, the LoRaWAN air time calculation sheet at https://www.thethingsnetwork.org/forum/t/spreadsheet-for-lora-airtime-calculation/1190 shows 56.576 ms airtime. Also, the gateway's traffic page shows: "airtime (ms) = 56.6 ms".
(When repeating with 17 bytes total, being 4 bytes application payload, the sheet calculates 51.456 ms, and the gateway then shows 51.5 ms too.)
For 21 bytes, the application's and device's data pages show "Estimated Airtime = 51.456 ms" instead of 56.5 ms like the gateway does.
It seems 2 bytes too few are taken into account for the estimation? For 19 bytes, the calculation sheet indeed shows 51.456 ms.
(When repeating with 17 bytes, the application and device data show 46.336 ms, while the gateway shows 51.5 ms. Again: like 2 bytes fewer were used for the calculations, as for 15 bytes the sheet indeed shows 46.336.)
Gateway:
Device:
...after scrolling down:
Airtime calculator:
Mac OS X, Chrome, single-channel test gateways.
n/a
n/a
Maybe, if you open source the code ;-)