Python programming for rfid, MySQL and Raspberry Pi

In Progress

I need help to write a python program described below to read rfid tags, activate two relays and save rfid number to MySQL database.

----------- Equipment -----------

I will use the following products for this project:

- Raspberry Pi B with ethernet connection and Raspbian OS (OS can of course be changed if needed)

- SainSmart 5V 2 Channel Relay ([url removed, login to view])

- MAX3232 RS232 Serial Port To TTL Converter Module ([url removed, login to view])

- RFID-reader (please see attached pdf for user manual. Help on how to connect it to the rs232 converter is needed)

----------- Programming details-----------

MySQL database specification:

Three tables; one table named MF_Logg with fields Logg_ID, Logg_RFID_ID and Logg_Tid, one table named MF_Djur with fields Djur_RFID_ID, Djur_Namn, Djur_Intervall, Djur_Intervall_Foder1, Djur_Intervall_Foder2, Djur_Foder1 and Djur_Foder2 and one table named MF_Lantbruk (I will complete this table later, but data from column Lantbruk_Email will be used in this project).

Programming details:

1. When a rfid tag is read, the rfid number is controlled in the MF_Djur table (field Djur_RFID_ID).

1.1 If tag number exist in table MF_Djur:

1.1.1 Read the time for the latest time the tag was recorded in MF_Logg (A) and read the value of Djur_Intervall (minutes) from table MF_Djur (B).

1.1.1.1 If current time is within time interval A + B minutes: Read values from field Djur_Intervall_Foder1 and Djur_Intervall_Foder2 and activate the relay 1 for the time (seconds) specified in Djur_Intervall_Foder1 and activate the relay 2 for the time (seconds) specified in Djur_Intervall_Foder2.

1.1.1.2 If current time is not within time interval: Read values from field Djur_Foder1 and Djur_Foder2 and activate the relay 1 for the time (seconds) specified in Djur_Foder1 and activate the relay 2 for the time (seconds) specified in Djur_Foder2. Write tag number and current date and time to table MF_Logg. If internet connection exist: MySQL table need to synchronize with a MySQL database on another server on Internet.

2.1 If tag number does not exist in table MF_Djur:

2.1.1 In table MF_Djur save rfid number to Djur_RFID_ID, set Djur_Intervall to 180, set all four Foder-fields to 2.

2.1.2 Activate both relays for 2 seconds

2.1.3 Write tag number and current date and time to table MF_Logg.

2.1.4 If/when internet connection exist: Syncronize both tables with MySQL database on other server and send email to the specified emailaddress in table MF_Lantbruk with info that a new rfid tag has been saved to the database.

- When the Raspberry Pi starts up, this program must autostart.

- Programming must be well commented.

----------- Comments-----------

- Because this is a personal project that I will work on in my rare spare time, testing may take a little longer than usual so please accept that I need two-three weeks for testing after your coding has been finished.

- I can’t connect the rfid reader at the moment because I’m still waiting for the male db9/rs232 connector to arrive (it is said to arrive in beginning of next week)

- Because I don’t know Linux very well, please accept questions on what commands I have to run to get the script working.

- If you suggest that the coding can be made better in another language or with other hardware, please tell me in your bid description so I know before I choose a coder.

- I prefer fixed bids and will not rent a coder on hourly rates.

Skills: Linux, MySQL, PHP, Python, Software Architecture

See more: python rfid, raspberry rfid mysql, raspberry mysql python, python connect mysql raspberry, rfid raspberry, rfid reader python, python rfid programming, python programming raspberry pdf, python mysql read rfid data, python mysql rfid data, python serial save mysql, raspberry python rs232, rfid reader mysql script python, program raspberry read rfid, rfid raspberry python, python rfid database, www html programming com, www c programming language com, what programming language is this, what programming language does arduino use, what programming language, what is python programming used for, what is programming language, what is in programming, what is database programming

Project ID: #5222091

Awarded to:

ngocphukmt

Hi sir, I have strong experience with Raspberry Pi and Python programming (Python is my primary language for Pi's projects).I also have knowlege in MySQL and website developer.Some projects i have done with my Pi boar More

$100 USD in 7 days
(4 Reviews)
2.9

8 freelancers are bidding on average $373 for this job

linuxfreak1985

Hi there, I have over 7 years experience working on HTML, Wordpress, Magento, Database administration, OpenCart, Website Design, Logo / Banner Design Joomla, CSS and Linux Administration. I have read the project descri More

$360 USD in 10 days
(389 Reviews)
7.7
diegou

Hi Im expert coder with experience on developing for Raspberry and Python I do have a Raspberry to test and develop Please check my profile Best regards Diego

$555 USD in 15 days
(39 Reviews)
6.0
suriyant

With strong experience in embedded system software development including on Raspberry Pi device, I can do this. Please keep me into you consideration. Look forward to working with you. Thanks.

$200 USD in 7 days
(48 Reviews)
5.7
NTechcorporate

Hi, Hope you are doing well! We have gone through your requirement and we understand that you are looking for highly skilled, qualified, and experience Python development team for your project. Our developer More

$670 USD in 15 days
(8 Reviews)
5.1
romanuwa

Hi, I have worked with RFID before, and I have some question for you. Issues/Questions. Does the Reader support python, then you should provide API specification for the reader. According to my knowledge most of More

$400 USD in 15 days
(13 Reviews)
3.9
grrod

Hi Menhir. Im Telecommunication engineer. Ive developed similar projects before. I programmed directly the DATA0 and DATA1 (green and brown wires on your model) to inputs pins on Raspberry and detect the event with More

$555 USD in 20 days
(2 Reviews)
2.0
saravanafroyo

Hi Menhir, Read your requirements and I am interested in working with you. I am programming expert and know inside out about it,since I have more than 6 years of coding experience.Not only python, I have expertise i More

$144 USD in 3 days
(1 Review)
1.8