📜 ⬆️ ⬇️

Time tracking on Tibbo Project System, integration with AggreGate and 1C: Enterprise 8

image

We have already talked about what the Tibbo Project System is . In the comments we were asked to assemble a simple device, such as “Hello World”, in order to demonstrate in practice our automation platform. We decided to build a universal terminal for time tracking, integrate it with 1C , as well as professional software AggreGate Time and Attendance .

The market is represented by a rather extensive range of working time recording terminals. The main differences of the models are in the types of readers, communication interfaces, the possibility of creating distributed systems, data processing, etc. We decided to build a flexible universal terminal that could combine various customer requirements.
From a hardware point of view, time tracking terminals are built quite simply:



Hardware


Since the terminal is built on the Tibbo Project System , the TPP2 board is chosen as the computing basis of the system. As we wrote in our previous article, the board already has a microcontroller, 1MB of flash-memory, an Ethernet interface and optionally WiFi is implemented, a power stabilizer is present. Debugging of the application and firmware download is carried out directly through the local network. Characteristics fully meet the requirements for time tracking terminals. To start working with the board, we just need to connect a twisted pair to it and supply power.
')
For our terminal, we will use external card readers. Usually they are connected via RS232 interfaces, or Wiegand, Clock / Data. The device can use one reader, and the type of arrival / departure event is determined by pressing the corresponding buttons by the user. Two readers can be used, one of which is focused on the "arrival", the second on the "care". For the basic version, we chose the version with one reader connected via RS232 interface. Therefore, we will install Tibbit # 01 on board S5.
It should be noted that the firmware provides for work with two readers and support for interfaces Wiegand, Clock / data. For such a modification of the terminal, you only need to install the appropriate Tibbits (# 01 or # 08) on the S3 and S5 platforms and select the desired terminal operation mode in the settings.

If necessary, a relay is installed on the S9 pad. Then, when choosing the appropriate mode of operation, our terminal will be able to control the electromagnetic lock, i.e. opening the door or turnstile.

As the case for our terminal, we will choose the TPB2L modification, which includes a graphic display and touch keys. The case is universal for TPP2 boards and can be used regardless of the selected terminal configuration. The display will display user information. Touch keys are used to determine the type of event (arrival / departure) in the case of using a single reader. The housing is supplied with a wall-mounting kit, which makes it easy to install the device at the point of passage. Given that the terminal is networked and is able to remotely synchronize with the server, it is possible to install a distributed system (it is installed at each point of passage through the terminal).

Firmware


The logic of the terminal is very simple. When the reader triggers, a record of the type is formed: card number, date, time, terminal id, event type (determined by the key or reader). In the local version, the data is recorded in the internal memory of the system and, upon request, uploaded to the server or control PC. In the network version, data is immediately sent to the server, and when communication is lost, it is recorded locally. In total, up to 16,000 lines can be stored in memory, after which overwriting of obsolete values ​​begins. The firmware has a web interface for setting up the terminal and uploading data. There are 2 modes of electromagnetic lock control with different access levels: without validity control (the lock opens with any identification) and access control mode (a list of employees who are allowed to enter is entered into the terminal).

Communication with the terminal via Ethernet interfaces, optionally WiFi or RS485. On the object can be installed as a single terminal, and a variety of terminals at different points of passage.

The source code of the firmware is open and the user can adjust it to fit his tasks. For example, using our library, upload data directly to the MySQL database.


Integration with 1C: Enterprise 8


For many companies, the requirements for working time accounting systems are simple: install one or two terminals, generate a report of actual hours worked by employees and calculate wages (fines) on the basis of these data. In such conditions it is not advisable to install heavy professional software, it is enough to use already installed applications, for example, one of the 1C: Enterprise configurations.

We have created a simple processing for 1C: Enterprise 8 configuration "1C: Retail 2". The list of employees is loaded from the main base, allowing you to assign identification (badge-card) numbers to them. Based on the data received from our terminal, creates a report on employees. The solution turned out to be convenient, and now we are porting it to other configurations (“1C: Trade Management”, “1C: Accounting”, “1C: Salary and Personnel”). The source code is open and can be adjusted for your own tasks. Processing is free.


Integration with AggreGate


In cases when specialized software is required for work taking into account working hours, we offer a professional solution AggreGate Time and Attendance . The system is able to work with terminals in online and offline modes. With AggreGate, you can remotely configure terminals, upload data, update the access list, configure access zones, schedules, company structure, etc. And due to the built-in report generator - generate your own reports based on the source data.

What terminal we got in the end:



The development of the hardware took a few minutes; writing the firmware (including integration with external software) took no more than two weeks. This example shows how easy it is to create your own devices on the Tibbo Project System platform.

References:
The page of the terminal of the account of working time on our site.
Create a room weather station
Access control on TPS .
Overview of the Tibbo Project System .

Source: https://habr.com/ru/post/237031/


All Articles