1

My project is a home security system. Until now everything is embedded on one device. But I would like to use multiple Pi's, for example RFID reader on different spots without the need of cables.

The current project uses SQLite to store variables like if the system is armed, user's passcode (hashed) etc.

So for example Im using a RPi A model with the RFID reader set, is checking my tag ID and holds my ID variable. Now the system needs to authenticate that.

1 way is to somehow use netSQLite, SQLiteServer or even using SMB to mount the database on the Pi to do the authentication. If the authentication pass, then the "Armed" value on the database will be False. In the meanwhile the central unit/RPi, has to keep looping and checking if the "Armed" value has been changes so it can disable the sensors. But keep looping for something will may happen once a while I think is a waste of resources, right?

Another way which is easy on words but, a hell to implement it is to somehow call the python functions that are located on the central unit from the remote Pi. For example theres is an "Armed(Passcode):" function with input the passcode, the functions makes the authentication, and if the system is armed will disarmed it and vice versa. No looping is required here, but how is this concept going to be implemented?

So what do you think, Im still on the Research & Design of this project, so any suggestions will be great.

Bobys
  • 143
  • 3

2 Answers2

0

Calling remote functions is not hard;

ssh remoteHost remoteCommand

There are many other options but that's the most secure and simple

user1133275
  • 2,216
  • 16
  • 32
0

Look into either Pyro for Python

Which lets you execute function and python code remotely from other PIs running pyro.

Also there is Websocket WAMP Autobahn Python

Which is similar to Pyro but uses websocket protocol.

VLAZ
  • 103
  • 2
raspi-ninja
  • 889
  • 2
  • 8
  • 15