0

I want to use Raspberry Pis to communicate collected Data via Python (Modbus TCP and RTU) scripts to a Database. These scripts are constantly running on the Pi and are connected to the Products where the data is coming from. Consequently, we have to ship the already set up Raspberry Pi to the Customer. Now the Problem occurs, that the Database Credentials are stored in the Python Scripts running on the Raspberry Pi. Is there a possibility to overcome this Problem?

1
  • You can add a server module which connects to the db and the raspberry pi only communicates with server module Commented Aug 29, 2019 at 8:24

1 Answer 1

1

Naive solution: Store database credentials on your server (or somewhere on internet) so every time Raspberry Pi run the script, it connect to the server to get the credentials first.

My recommended solution: Create an API (may be web API) to communicate with database and Rasp Pi only work with this API. By this way, the client side doesn't know about database's credentials and some private things you want to hide also.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the quick answer! The Problem is, that the User is still able to catch the database credentials. An API would be a better approach I think. Is node js the way to go?
@benni0108 this is simple task, you can choose any language you familiar with!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.