Authentication failed. Please ensure you have a valid HUB_AUTH_TOKEN environment variable

Hi everyone,

I have been trying to get the Indoor Floor Level Tracker sample application to work and I am having trouble with the HUB_AUTH_TOKEN. I can no longer authenticate with the token. It seems to have worked for a little while, but just suddenly stopped. Any ideas as to what could be happening?

Thanks,

Mike

I decided to re-run the command to obtain the token again, and voila’, it works! I am not sure what caused the issue with the first authentication token.

1 Like

Hey @mikec,

Awesome, glad you got things working! And one thought—at the moment you can only have one authentication token for your account, so creating new tokens invalidates any old ones you’ve generated in the past.

If you run into any other issues with the app feel free to reach out.

TJ

1 Like

Hi again,

I’m not getting any pressure readings. How can I verify that I successfully flashed the SWAN?

Thanks,

Mike

Just as an fyi turns out I was wrong about this—your old tokens remain active when you generate new ones. I learned something new :sweat_smile:

I’m not getting any pressure readings. How can I verify that I successfully flashed the SWAN?

The project’s firmware does a lot of logging. I’d recommend checking the Swan’s serial log to see if there’s anything useful in there. If you’re using VS Code I like using this Serial Monitor extension: Serial Monitor - Visual Studio Marketplace.

TJ

Thanks for the info… I’ll install the extension and see what happens.

Mike

I managed to work out the problem with flashing the SWAN, but now after testing the project out I’m getting pressure readings with the Live Tracking OFF, which seems to be causing some problems with the floor accuracy. I’ve attached a pic with the reading.

How long does it take for the app to reset itself to a baseline reading?

Uploading: 4955F3C5-038B-4F3E-879A-98B0F0DC71FF.png…

I’m seeing that I’m on the 549 floor at the moment.

Thanks,

Mike

I managed to work out the problem with flashing the SWAN

Excellent! Glad you were able to get that running ok.

But now after testing the project out I’m getting pressure readings with the Live Tracking OFF, which seems to be causing some problems with the floor accuracy. I’ve attached a pic with the reading.
How long does it take for the app to reset itself to a baseline reading?

By default, the firmware takes readings every five minutes while idle and every one minute while “live”, but you can update those values here https://github.com/blues/app-accelerators/blob/25097b7534a9576fdcaecbcf597507a2a68b362e/indoor-floor-level-tracker/firmware/src/main.cpp#L40-L41.

The firmware resets its baseline whenever you toggle your fleet’s live environment variable to true. When you do that, it assumes the current pressure is equal to the floor you have configured as your baseline_floor environment variable (which is 1 by default).

(And fyi you image you attached doesn’t seem to have uploaded correctly.)

TJ