Restore Config on Raspberry

This case is generally for all raspberry.

I have setup many raspberries connected to cayenne, now suddenly one of micro sd error and I cannot access the sd card (I also haven’t backup the micro sd).

In Cayenne Desktop, unfortunately, I cannot find auth code (like on the arduino devices).

Is there any way to setup a new raspberry with the same config as before the sd card error?
I think the idea is the keyword “Invite Code” in AppSettings.ini

cat /etc/myDevices/AppSettings.ini
InviteCode = xxxxxxxxxx 
Initialized = true
Version =
Environment = live
UpdateProgress =

Is there any way to retrieve the Invite Code again?

Hi @willy

You’re correct that there is no place to grab the invite code from the web dashboard, and I’ll presume you no longer have access to the installer or the AppSettings.ini file from the pi in question since its storage failed.

I made a message to our development team to see if we can pull the code(s) for your Pis from our back end DB. If this is possible then I can send them to you and you could re-install ‘as’ the old pi. If not, you may have to re-install and re-create the widgets. I will update as soon as I hear back from them.

Hi @rsiegel

Thanks for quick response. For the moment I have replaced my card with a fresh install, and my problem has been solved after created new icons, doing this and that. Please do not worry about my problem.

I think it would be nice to include the code in the future. So if someone has the same problem can easily restore the config.

Thanks for letting us know. I think it’s good feedback and that we should consider adding the invite code to the settings screen for each Raspberry Pi to make it easier to recover from a failure in this way.

1 Like

Guess what @rsiegel, today accidentally I’ve found that If I use the same device pi (with the error micro sd) and doing a fresh install on a brand new sd card without remember any invite code, add as a new pi on cayenne, it will automatically connect to the last cayenne’s panel.

So I don’t have to do anything to create new icons. as long we use the same pi. Fantastic!

I think cayenne record mac address of the pi, so we don’t really need the invite code. I haven’t tested what if I replace with a new pi with the same invite code. Will it connect to cayenne?

1 Like

Cayenne generates something we call a Machine ID which is based on unique attributes of the device’s hardware (perhaps the mac address is one of them, I’d have to ask our engineers). In this case we likely generated the same Machine ID and saw it as the same device. I’m happy that you were able to connect again without re-creating all of your widgets.

To connect a new pi, the system is designed with the expectation that you add one from either the mobile apps or the Add New > Device / Widget > Single Board Computers > Raspberry Pi web menu options which will generate a new installer executable with a new invite code, so that is what I recommend. Though I expect you may be right, re-using the old code which is tied to your account on a new pi should probably add that pi to your account as a new entry as it would have a new Machine ID.

1 Like