Small building automation project using Raspberry PI (or Arduino) - access control + some time-based actions using data from SQL
Budget: $250 β $750 USD
We rent 3 rooms for golf-training inside 1 building. The reservations are stored on our local server in SQL format. (basic DB row structure : clientID - start date/time - end date/time - status - roomID).
We think Raspberry PI is most suited but if you prefer Arduino, itβs OK too.
You only provide us the code, so no hardware but you provide all information about the hardware we need and setup.
#1 Acces control :
When client arrives at the building, he will scan his personal badge at the entry (RFID card or token). Action : query SQL DB if clientID has a reservation (acces allowed from 15 min before start to 15 min after end. If YES, set pin 00 high for 5 secs (door can be opened) . There is only one entrance door, the individual rooms have no lock. The RFID card reader uses the standard Wiegand26 protocol. We have to consider using read-only or read-write (write clientID) RFID cards. Any suggestions welcome.
#2 Climate control :
Query DB every minute (?) and set pin 01 (for roomID=1) high 30 mins BEFORE START till 5 mins BEFORE END (roomID=2 will be pin 02 and so on)
#3 Light in room :
Query DB every minute (?) and set pin 11 (for roomID=1 high 5 mins BEFORE START till 5 mins AFTER END (roomID=2 will be pin 12 and so on)
#4 Warning last 5 minutes :
Query DB every minute (?) and set pin 21 (for roomID=1 high 10 mins BEFORE END till 5 mins BEFORE END (roomID=2 will be pin 22 and so on)
Status :
If the reservation is cancelled , the STATUS field will be different and no action (#1 to #4) needs to be taken.
Remark :
The DB contains all reservations, not only the current and future ones but also the past and cancelled reservations.
All settings must be accessible over internet and changeable in admin panel (permanent or temporarily) but consider security using password. Also it must be possible to change the offset delays (15 min, 5 min, 30 min) although this is not something that will happen frequently and can be done by modifying the code instead of using a table.
We think Raspberry PI is most suited but if you prefer Arduino, itβs OK too.
You only provide us the code, so no hardware but you provide all information about the hardware we need and setup.
#1 Acces control :
When client arrives at the building, he will scan his personal badge at the entry (RFID card or token). Action : query SQL DB if clientID has a reservation (acces allowed from 15 min before start to 15 min after end. If YES, set pin 00 high for 5 secs (door can be opened) . There is only one entrance door, the individual rooms have no lock. The RFID card reader uses the standard Wiegand26 protocol. We have to consider using read-only or read-write (write clientID) RFID cards. Any suggestions welcome.
#2 Climate control :
Query DB every minute (?) and set pin 01 (for roomID=1) high 30 mins BEFORE START till 5 mins BEFORE END (roomID=2 will be pin 02 and so on)
#3 Light in room :
Query DB every minute (?) and set pin 11 (for roomID=1 high 5 mins BEFORE START till 5 mins AFTER END (roomID=2 will be pin 12 and so on)
#4 Warning last 5 minutes :
Query DB every minute (?) and set pin 21 (for roomID=1 high 10 mins BEFORE END till 5 mins BEFORE END (roomID=2 will be pin 22 and so on)
Status :
If the reservation is cancelled , the STATUS field will be different and no action (#1 to #4) needs to be taken.
Remark :
The DB contains all reservations, not only the current and future ones but also the past and cancelled reservations.
All settings must be accessible over internet and changeable in admin panel (permanent or temporarily) but consider security using password. Also it must be possible to change the offset delays (15 min, 5 min, 30 min) although this is not something that will happen frequently and can be done by modifying the code instead of using a table.