rWTT-基于链接到Dynamics AX的Raspberry硬件的Worktime Tracker(译文)
By robot-v1.0
本文链接 https://www.kyfws.com/pi/rwtt-a-worktime-tracker-based-on-raspberry-hardwar-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 19 分钟阅读 - 9107 个词 阅读量 0rWTT-基于链接到Dynamics AX的Raspberry硬件的Worktime Tracker(译文)
原文地址:https://www.codeproject.com/Articles/1200397/rWTT-A-Worktime-Tracker-based-on-Raspberry-hardwar
原文作者:FiegeU
译文由本站 robot-v1.0 翻译
前言
A worktime tracking solution that reads RFID tags on a Raspberry based terminal that is integrated to Dynamics AX 2009
一种工作时间跟踪解决方案,可在集成到Dynamics AX 2009的基于Raspberry的终端上读取RFID标签
介绍(Introduction)(该项目用不到30个字并用三张图片表示)((the project in less than 30 words and in three pictures))
该项目是关于一个基于Raspberry硬件的,基于RFID的时钟(考勤记录器)解决方案,并已集成到Dynamics AX 2009 ERP系统的实例中.(This project is about a RFID based time clock (attendance recorder ) solution based on Raspberry hardware and integrated to an instance of Dynamics AX 2009 ERP system.) 好(硬件)(The good (the hardware))
不好(软件)(The bad (the software))
丑陋的(结果)(The ugly (the result))
背景(Background)
在亚洲的一个站点上,有必要替换现有的(非常基本的)时钟解决方案来进行工作时间跟踪.(There was the demand to replace an existing (very basic) time clock solution for work time tracking at one of the sites in Asia.) 第一个想法是购买可以随时使用的东西,这不是一项艰巨的任务,因为有成千上万种产品可供选择.因此,无意做出购买或购买决定.但是,与往常一样,项目(尤其是IT项目)并没有遵循直接的道路.在定义需求时,最好将所有数据都存储在该站点的ERP中,这是MS Dynamics AX 2009.这样做的主要原因之一是,所有员工数据都已经在其数据库中.(The first idea was to buy something ready working, should not be a so hard task, there are thousands of products available. So there was no intention to have a make or buy decision. But like always, projects (especially IT projects) doesn’t follow the direct path. When it comes to define the requirements it turned out, it would be a good idea to have all data in the ERP, which is MS Dynamics AX 2009 at that site. One of the main reasons for that was, that all the employees data is already within its database.) 也不应该成为问题…是的,但是还没有价格合理的现成解决方案.实际上,我们当时订购的是现有解决方案,但事实证明,这种解决方案似乎无法像供应商向我们保证的那样工作.因此,请返回制作或购买决定并检查选项.(Shouldn’t be a problem either… Yes maybe, but there was no ready-to-go solution for that at a reasonable price. Actually we were at a point where we ordered an existing solution but it turned out that it doesn’t seem to work like the supplier assured us. So back to the make or buy decision and check the options.) 事实证明,如果使用基于Raspberry硬件的系统,我们将为终端提供所需的一切,并且我们可以自己在ERP上进行系统集成.(It turned out that if using a Raspberry hardware based system would us give all that we need for the terminal and we can do the system integration at the ERP by ourselves.) 因此,我们进行了一些原型设计,看起来非常好,因此我们决定进行该项目.(So we did some prototyping and it looked so good, we decided to give the project a go.)
要求(The requirements)
这些是为此项目定义的要求:(These were the requirements defined for this project:)
- 基于终端的解决方案,用户可以在登录或注销过程中扫描唯一的RFID标签以进行标识(A terminal based solution where user could scan an unique RFID-Tag for identification within the sign in or sign out process)
- 所有登录/注销数据记录均应存储在ERP中(All sign in / sign out data records should be stored in the ERP)
- 报告显示该站点上所有当前可用的人员(A report that shows all currently available persons at the site)
- 可能具有可定义日期范围的报告,其中显示了在该日期范围内哪个员工工作了多少小时的概览,包括总计(A report which could have a definable date range that shows an overview which employee worked for how many hours within the date range including a grand total)
这些要求是在项目处于实施阶段时定义的:(These requirements were defined while the project was in the implementation phase:)
- 触摸屏必须是7英寸,其他所有东西都很小(The touch display has to be 7 inch, everything else is to tiny)
- 硬件应基于使用Raspbian的Raspberry(The hardware should be based on Raspberry using Raspbian)
- 为了正确地跟踪时间,员工需要有可能签出休息或商务旅行(To track the time correctly, the employee needs to have the possibility to sign out for break or a business trip)
- 即使网络中断或ERP不可用,也必须可以登录/注销(Signing in/out has to be possible even if the network is down or the ERP is unavailable)
- 该解决方案应可移植到其他ERP系统(The solution should be portable to other ERP systems)
- 用户登录/注销时应以蜂鸣声形式获得反馈(The user should have feedback in form of a beep when he/she signs in/out)
- 错误的登录/注销过帐或忘记的过帐需要在ERP中更正(Wrong sign in/out postings or forgotten postings needs to be corrected in the ERP)
- 在ERP中,所有手动添加的过帐都应有一个标记,以便可以识别它们(In the ERP all manual added postings should have a marker, so they could be identified)
- 应该不能在ERP中删除过帐(It should not be possible to delete postings in the ERP)
- 所有时间处理将在几分钟内完成(All time processing will be done on a minute basis)
- 系统应具有服务菜单功能,使特权用户可以重新启动或关闭系统.应该使用特殊的RFID标签或输入数字代码来打开菜单.(The system should have a service menu function which gives a privileged user the possibility to restart or shutdown the system. The menu should be opened by using a special RFID-Tag or by entering a numeric code.)
- 服务器应分别提取每个发布记录,以确保在最坏的情况下我们丢失一个发布. (如果网络在传输时失去连接,例如…)(Every posting record should be fetched by the server separately to make sure that we lose one posting in the worst case. (If the network loses connectivity while transmitting e.g. …))
硬体(The hardware)
在硬件方面,我们决定拥有一个带有7英寸触摸屏的终端,因此我们订购了包含以下各项的Raspberry入门套件:(At the hardware side there was the decision made to have a terminal that has a 7 inch touch screen, so we ordered the Raspberry starter kit that contains these items:)
-
树莓派3(Raspberry Pi 3)
-
7英寸电容式触摸屏(7 inch capacitive touch screen)
-
触摸屏保护套(Case for the touch screen)
-
SD卡(SD card)
-
电源供应(Power supply)
-
HDMI电缆(HDMI cable)
-
电源供应(Power supply)
-
散热器(Heat sink) 作为附加硬件,我们使用了(As additional hardware we used)
-
模拟键盘的USB RFID读取器,并像在键盘上键入一样输入RFID的唯一ID.(USB RFID reader that emulates a keyboard and types in the unique id of the RFID like it was typed on a keyboard)
-
Raspberry的活动蜂鸣器,以最小化控制所需的代码量(An active buzzer for the Raspberry to minimize the amount of code needed for control)
入门包中的大多数组件:(Most of the components in the starter pack:)
USB-RFID读取器:(The USB-RFID reader:)
蜂鸣器模块:(The buzzer module:)
建立它(Building it)
第一步是将Raspberry连接到"显示"面板,并将电缆连接到DSI连接器:(The first step was to attach the Raspberry to the Display panel and connect the cable to the DSI connector:)
显示屏还需要在下一步添加两条电源线:(The display also needs two powerlines which are added in the next step:)
完成此操作后,可以安装散热器模块,并将显示器安装到机箱上:(When this is done, the heat sink modules could be attached and the display could be mounted to the case:) (我建议这样做之前先插入SD卡,因为在不装盒背面的情况下这样做更容易.)((I would suggest to insert the SD card before doing that because it is much easier to do it while the backside of the case is not attached.))
在最后一步中,使用热胶将蜂鸣器模块连接到外壳,并连接到电源和GPIO端口23:(In the last step the buzzer module was attached to the case using hot glue and connected to power and GPIO port 23:) (为确保蜂鸣器粘住,我在放置热胶的地方略微弄皱了外壳的表面.我不建议除去贴纸,如果没有贴纸,蜂鸣器的声音会很大.)((To make sure that the buzzer sticks, I roughed the surface of the case a little where I put the hot glue. I would not suggest to remove the sticker, the buzzer is getting really loud without it.))
引导系统将显示一切是否正常:(Booting the system will show if everything runs fine:)
该软件(The software)
该软件包含三个组件:(The software consists of three components:)
- Raspbian操作系统及其配置(The Raspbian operating system and its configuration)
- Raspberry上运行的一些Python脚本(A few Python scripts running on the Raspberry)
- 在ERP系统中用代码实现对数据的提取和处理(The implementation in the ERP system with the code to pull the data and process it)
这个概念(The concept)
在考虑架构满足项目要求的最佳方法时,做出了以下决定:(While thinking about the best approach for the architecture to fulfill the project requirements these decisions were made:) 所有登录/注销发布应存储在文件系统本地,并由处理系统使用HTTP或HTTPS提取.处理系统不应限于Dynamics AX.支持HTTP或HTTPS的任何其他系统(甚至Microsoft Access)的实现都应该是可能的.(All sign in/out postings should be stored locally in the filesystem and be pulled by the processing system using HTTP or HTTPS. The processing system should not be limited to Dynamics AX. An implementation of any other system that supports HTTP or HTTPS, even Microsoft Access, should be possible.) 从终端提取数据后,应将其删除,以防止SD卡内存不足.(After the data is pulled from the terminal, it should be deleted to prevent that the SD card runs out of memory.) 终端上的用户界面应作为网页运行.(The user interface on the terminal should run as a webpage.) 应该有多个终端,并且用户登录/注销的位置应该没有任何区别.(Multiple terminals should be possible and it should not make any difference where the user signs in/out.) Apache2用作应用程序服务器组件,所有脚本均使用Python编写.(Apache2 is used as the application server component and all scripts were made in Python.)
资料下载(Downloads)
对于该项目,需要一些可以在Internet上找到的工具.(For this project a few tools were needed that could be found on the internet.)
Raspbian映像(当前版本为2017-07-05-raspbian-jessie)可以在以下位置找到:(The Raspbian image (Current version 2017-07-05-raspbian-jessie) could be found here:) https://www.raspberrypi.org/downloads/raspbian/(https://www.raspberrypi.org/downloads/raspbian/) 可在此处找到将映像写入SD卡的工具:(A tool to write the image to the SD card is found here:) https://www.raspberrypi.org/downloads/raspbian/(https://www.raspberrypi.org/downloads/raspbian/) 可以在此处下载以图形方式远程访问系统的VNC-Viewer:(VNC-Viewer to get remote access to the system on a graphical way could be downloaded here:) https://www.realvnc.com/en/download/viewer/(https://www.realvnc.com/en/download/viewer/) Putty SSH客户端在终端级别访问Raspbian系统:(Putty SSH client to access the Raspbian system on terminal level:) https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html(https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
作业系统(The operating system)
下载Raspbian映像和将映像写入SD卡的程序后,应将映像写入SD卡.(After downloading the Raspbian image and the program to write the image to the SD card, the image should be written to the SD card.)
从SD卡启动系统后,第一步是启用SSH和VNC:(After booting the system from the SD card the first steps are to enable SSH and VNC:)
重新启动后,所有服务都将运行,并且将Raspberry连接到网络后,将可以使用SSH和VNC使用Raspberry.(After a reboot all services run and the Raspberry will be available using SSH and VNC when you connect it to the network.) 第一步应该是更改默认密码并启用root帐户,并为其设置一个密码.我知道Debian是Raspbian的基础,使用sudo方法,但是我更喜欢以root用户身份登录并直接在root上下文中进行工作.如果您出于安全考虑,可以稍后禁用根帐户.(The first steps should be to change the default password and enable the root account and give it a password as well. I know Debian, the base of Raspbian, uses the sudo approach, but I prefer to login as root and do the work directly in the root context. You could disable the root account later on if you have security concerns.)
下一步将是安装午夜指挥官,对我来说,在系统上进行安装和维护非常重要:(The next step would be to install midnight commander, for me it is essential to do installation and maintenance on the system:)
在当前Raspbian版本上,安装apache2首先需要进行系统更新:(Installing apache2 would need a system update first on the current Raspbian release:)
安装apache2:(Installing apache2:)
快速检查显示Apache2正在运行:(A quick check shows that the Apache2 is running:)
要为cgi启用Python,必须在控制台和mc中完成一些步骤:(To enable Python for cgi a few steps has to be done in console and mc:)
将红色标记的配置行添加到/etc/apache2/conf-enabled:(Add the red marked configuration line to /etc/apache2/conf-enabled:)
为了获得音频反馈,必须让apache进程与GPIO交互以打开蜂鸣器.这是通过以下命令完成的:(For audio feedback it is necessary to allow the apache process to interact with the GPIO to turn on the buzzer. This is done with this commands:)
所有登录/注销数据将存储在名为/tk/的目录中,该目录必须已创建并且可为apache进程写入:(All sign in/out data will be stored in a directory named /tk/ , this has to be created and be writeable for the apache process:)
apache用户还需要访问权限才能通过服务菜单关闭系统:(The apache user also needs the access right to shutdown the system via the service menu:)
到目前为止,用户pi具有很多访问权限,因此我们创建了一个名为guest的新用户帐户,并配置了自动登录和自动启动Chrome,并为其打开了登录/注销网页:(The user pi has by far to much access rights, so we create a new user account called guest and configure autologon as well as autostart of chromium and opening the sign in/out webpage for it:)
现在系统需要重新启动,因为用户主目录当前不包含自动启动文件,该文件必须立即编辑并添加以下行:(Now the system needs a reboot because the users home directory currently does not contain the autostart file which has to be edited now and added this line:) @ chromium-browser –noerrdialogs –kiosk –incognito –disable-pinch –overscroll-history-navigation =0 http://localhost/cgi-bin/wtt.py(@chromium-browser –noerrdialogs –kiosk –incognito –disable-pinch –overscroll-history-navigation=0 http://localhost/cgi-bin/wtt.py)
这将自动在Kiosk模式下启动浏览器,禁用捏缩放和历史记录滑动功能.(This will automatically start the browser in Kiosk mode, disable the pinch to zoom and the history swipe function.) 在项目文件中,您将找到/usr/bin/文件夹,其中包含一个名为Mutebeep.py的脚本.安装将在稍后进行.当您已经添加了蜂鸣器时,您会注意到它会在系统启动时发出噪音.原因是它是低电平有效的,并且GPIO引脚23的输出必须处于高电平才能使蜂鸣器静音.这是通过Mutebeep.py脚本完成的.(Within the project files you will find a folder /usr/bin/ that contains a script called mutebeep.py . The installation is happening later on. When you already added the buzzer, you will notice it will make noise when the system boots. The reason for it is, that it is low active and the output of GPIO pin 23 has to be on level high to make buzzer silent. This is done by the mutebeep.py script.) 我们将其添加到/etc/中的rc.local文件中:(We add it to the rc.local file located in /etc/:)
如果要使用raspi-config程序更改系统主机名,则下一步是可选的:(The next step is optional if you would like to change the systems hostname using the raspi-config program:)
当前,系统正在通过dhcp获取其IP地址.如果您要分配静态地址,请执行以下步骤:(Currently the system is obtaining its IP-Address by dhcp. If you would like to assign a static one, please do this steps:)
为了确保我们必须在终端上校正时间,我们还必须设置时区(对我来说是德国,柏林):(To make sure we have to correct time at the terminal, we have to set the timezone as well (for me it’s Germany, Berlin):)
谈论时间,让终端将本地时间与时间服务器同步永远是一个好主意.如果您在AD域中,则可以使用任何域控制器,也可以在Internet上使用一个域控制器(如果允许系统直接与外部通信).(Talking about time, it would be always a good idea to make the terminal sync the local time against a time server. If you are in an AD domain you could use any domain controller for it or use one on the internet, if the system is allowed to communicate directly to outside.)
如果您在代理环境中,则可能会找到此链接usefuel,它显示了如何配置Raspbian:(If you are in a proxy environment, you may find this link usefuel, it shows how to configure the Raspbian:) http://www.edugeek.net/forums/cleo/112806-raspberry-pi-connecting-proxy-server.html(http://www.edugeek.net/forums/cleo/112806-raspberry-pi-connecting-proxy-server.html)
Python脚本(The Python scripts)
下载并解压缩项目后,您将拥有三个文件夹.(After downloading and unzipping the project, you will have three folder.) AX->包含所有要作为项目导入AX的文件和单个文件(AX -> Containing all files for import in AX as a Project and single files) Raspi_bin->包含/usr/bin文件夹的所有文件(Raspi_bin -> Containing all files for the /usr/bin folder) Raspi_cgi-bin->包含/usr/lib/cgi-bin文件夹的所有文件(Raspi_cgi-bin -> Containing all files for the /usr/lib/cgi-bin folder)
必须将Raspi 文件夹中的文件复制到正确文件夹中的Raspberry中,并最终使其可执行.您可以通过USB拇指驱动器将它们复制到终端并运行以下命令:(The files in the Raspi folder have to be copied to the Raspberry in the right folders and finally made executable. You can copy them via an USB thumb drive to the Terminal and run these commands:) chmod +0755/usr/bin/mutebeep.py(chmod +0755 /usr/bin/mutebeep.py) chmod +0755/usr/lib/cgi-bin/reboot.py(chmod +0755 /usr/lib/cgi-bin/reboot.py) chmod +0755/usr/lib/cgi-bin/service.py(chmod +0755 /usr/lib/cgi-bin/service.py) chmod +0755/usr/lib/cgi-bin/shutdown.py(chmod +0755 /usr/lib/cgi-bin/shutdown.py) chmod +0755/usr/lib/cgi-bin/wtt.py(chmod +0755 /usr/lib/cgi-bin/wtt.py) chmod +0755/usr/lib/cgi-bin/wtt_get.py(chmod +0755 /usr/lib/cgi-bin/wtt_get.py)
详细信息cgi-bin文件夹中的文件(Files in the cgi-bin folder in detail)
reboot.py->用于重启系统的脚本(reboot.py -> Script that does the system reboot) service.py–显示服务菜单的脚本(service.py -> Script that shows the service menu) shutdown.py->执行系统关闭的脚本(shutdown.py -> Script that does the system shutdown) wtt_get.py->从远程应用程序调用以获取登录/注销数据的脚本->返回OK:如果返回数据则发布数据,否则返回NONE:如果没有可用数据(wtt_get.py -> Script called from remote application to get the sign in/out data -> Returns OK:posting data if data is returned or NONE: if no data is available) wtt.py脚本->显示主应用程序并创建签入/签出记录的脚本(wtt.py -> Script that shows the main application and creates the sign in/out records)
wtt.py提供了一些可配置的选项:(The wtt.py gives some configurable options:)
serviceTagID包含标签的ID,如果该标签被扫描,则会打开服务菜单(The serviceTagID holds the ID of the tag that if scanned opens the service menu) adminCode是在键盘上输入的代码,可打开服务菜单(The adminCode is the code that entered on a keyboard opens the service menu) storagePath在文件夹所在的文件系统中配置绝对路径,该路径临时存储签入/签出数据(The storagePath configures the absolute path in filesystem where the folder is located, that temporarily stores the sign in/out data) postText 定义在网页中发布登录/注销时显示的文本(The postText defines the text shown when a sign in/out is posted in the webpage) buzzerPort定义蜂鸣器连接到哪个GPIO端口(The buzzerPort defines to which GPIO port the buzzer is connected)
ERP软件组件(ERP software components)
压缩项目中的AX文件夹在两个单独的文件夹中包含此AX 2009组件:(The AX folder in the zipped project contains this AX 2009 components in two separate folders:) 所有元素都将自己导出到文件夹对象中,并且可以单独导入.(All elements are exported by themselves in the folder objects and can be imported separately.) 在子文件夹项目中包含整个AX开发项目.(In the subfolder project contains the whole AX development project.)
重要的项目是三种形式,即两个报表和两个类WTTcloseLastWorkingDays和WTTfetchTerminalData.(The important items are the three forms, the two reports and the two classes WTTcloseLastWorkingDays and WTTfetchTerminalData.)
表格WTT终端(Form WTT-Terminals)
以这种形式,必须从该数据中提取每个终端:(In this form every terminal from that data will be fetched has to added:)
提示:不会从未启用的终端获取任何数据.(Hint: No data will be fetched from terminals that are not enabled.)
表格WTT_RfidTagTable(Form WTT_RfidTagTable)
在此表中,需要输入每个RFID标签并将其连接到使用该标签的员工.(In this table every RFID tag needs to be entered and connected to the employee which is using the tag.)
表格WTT_WorkingDayTable(Form WTT_WorkingDayTable)
这是应用程序的主要形式.(This is the main form of the application.)
对于每个签入/签出的用户,都会在"工作日"网格(上部)中创建一条记录.只要一天未关闭,就不会正确计算工作时间分钟数.白天运行的批处理工作关闭了工作日.在"发布"部分(下部)中,您可以查看终端上的每个登录/注销过程以及手动生成的更正发布.手动更正过帐在相应字段中用是标记.(For every user that checked in/out a record in the Working Day grid (upper) is created. As long as the day is not closed the work time minutes are not accurately calculated. Days get closed by a batch job that runs at night. In the “Postings” section (lower) you can see every sign in/out process at the terminal as well as manual generated correction postings. Manual correction postings are marked by a yes in the corresponding field.) 通过单击"更正后"按钮,此对话框将打开,您必须在其中指定有关登录/注销记录的详细信息:(By clicking the “Post correction” button this dialog opens where you have to specify the details about the sign in/out record:)
报告WTT_CheckedInEmployees(Report WTT_CheckedInEmployees)
此报告将打印所有当前在现场签到的员工的概述.目的是在紧急情况下手头有一些东西:(This reports prints an overview of all currently checked in employees at site. The intention is to have something at hand in case of an emergency:)
报告WTT_WorkTimeOverview(Report WTT_WorkTimeOverview)
此报告显示每个员工在可定义的时间段内工作的小时数:(This reports shows the number of hours every employee worked in a definable timespan:)
重要的是要理解,此报告仅考虑休假日.(It is important to understand that only closed days are considered in this report.)
WTTcloseLastWorkingDays类(Class WTTcloseLastWorkingDays)
此类可以手动运行,但打算在早上作为批处理作业运行.它的主要目的是关闭发布日期并计算工作时间.它看起来是过去的7天,并检查是否需要计算任何更正.(This class could be run manually but is intended to run as a batch job in the morning. It’s main purpose is to close the days with postings and calculate the amount of working minutes. It looks seven days in the past and checks if any corrections have to calculated.) 提示:如果一天关闭并且手动完成更正过帐,则将立即重新计算工作时间.(Hint: If a days is closed and a correction posting is done manually, the working time will be recalculated instantly.)
WTTfetchTerminalData类(Class WTTfetchTerminalData)
此类旨在以批处理模式运行.它从所有终端获取所有可用的过帐记录.(This class is intended to run in batch mode. It fetches all available posting records from all terminals.) 每次发送都会分开发送,以确保在网络中断或任何其他错误的情况下,我们仅丢失一个登录/注销信息.(Every posting is transmitted separately to make sure, that in a case of network loss or any other error we lose just one sign in/out information.) 它应该每小时运行一次,或者无论您有什么需求.(It should run every hour or whatever your demand is.)
菜单项(Menu items)
您会注意到,当前没有元素添加到现有的AX菜单中.(You will notice that currently no elements are added to an existing AX menu.) 您可以根据需要将项目添加到菜单.(It is up to you to add the items to a menu at your wish.)
使用代码(Using the code)
源代码相当不错,可以根据需要进行修改.(The source code is pretty forward and can be modified as you want.)
附加的功能(Additional features)
我发现有趣的功能,但没有发现实施这些功能的时间是:(Features I found interesting but didn’t found the time to implement them would be:) 将员工姓名从ERP发送到终端,以便终端可以按名称欢迎员工.或作为增强显示亲自签名的图片.(Sending the employee names from the ERP to the terminal, so the terminal could welcome the employee by name. Or as an enhancement show a picture of the signing in person.) 跟踪假期. (也许有一个额外的菜单按钮,员工可以在该菜单上退出假期.)(Tracking of vacation days. (Maybe with an extra menu button where the employee signs out for vacation.)) 通过在月底发送电子邮件来自动生成报告.(Automate reporting by sending emails at the end of the month.)
提示和技巧(Hints and tricks)
如果您有要登录/注销的工作站,则可以将USB-RFID-Reader连接到该工作站,然后在该工作站上打开终端网页wtt.py.(If you have a workstation where you want to be able to sign in/out, you can attach an USB-RFID-Reader to it and open the terminals webpage wtt.py on that workstation.) 您可以通过添加公司徽标轻松地定制终端用户界面,因为所有内容都是HTML:(You can easily customize the terminals UI by adding the company logo to it, because everything is HTML:)
如果在将显示器安装到墙上时遇到屏幕倒置的问题,则可以编辑configfile/boot/config.txt并在最后添加以下行:(If you have the issue that your screen is upside down when the display is mounted to the wall, you can edit the configfile /boot/config.txt and add this line at the end:) lcd_rotate =2(lcd_rotate=2)
关于安全的几句话(A few words about security)
如果您在考虑安全性的环境中,可以这样做以提高安全性:(If you are in an environment where security is a concern you can do this to increase the security:)
- 禁用VNC(Disable VNC)
- 禁用SSH(但SSH目前是安全的)(Disable SSH (but SSH is secure currently))
- 为用户帐户pi禁用SSH登录(Disable SSH logins for the user account pi)
- 将传输协议更改为HTTPS(但请注意,您必须注意证书的有效性!)(Change the transmission protocol to HTTPS (But be aware that you have to take care about the certificate validity !))
- 更改用于将登录/注销数据交换为SSH的传输协议(Change the transmission protocol for exchanging the sign in/out data to SSH)
- 使用防火墙限制传入和传出网络访问(Limit the incoming and outgoing network access by using the firewall)
- 在树莓派上(机械地)阻塞USB端口(Block the USB ports (mechanically) at the Raspberry)
结论(Conclusion)
可以使用基于Raspberry硬件的低成本终端和RFID读取器以合理的努力完成工作时间跟踪.(Work time tracking can be done with a low cost terminal based on the Raspberry hardware and a RFID reader with a reasonable amount of effort.)
有用的链接(日期05.08.2017):(Useful links (dated 05.08.2017):)
基于Raspberry硬件的工作时间跟踪的另一种实现方式,采用了不同的方法(德语):(Another implementation of work time tracking based on a Raspberry hardware which follows a different approach (in German):) http://www.solongo.de/de/spielplatz/timr/(http://www.solongo.de/de/spielplatz/timr/) Raspbian图片:(The Raspbian image:) https://www.raspberrypi.org/downloads/raspbian/(https://www.raspberrypi.org/downloads/raspbian/) 将光盘映像写入SD卡的工具:(A tool to write disc images to a SD card:) https://sourceforge.net/projects/win32diskimager/(https://sourceforge.net/projects/win32diskimager/) VNC查看器:(VNC-Viewer:) https://www.realvnc.com/en/download/viewer/(https://www.realvnc.com/en/download/viewer/) Putty SSH客户端:(Putty SSH client:) https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html(https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
历史(History)
版本1.00初始版本06.08.2017(Version 1.00 Initial release 06.08.2017) 版本1.01格式更正和一些错字08.08.2017(Version 1.01 Format correction and a few typos 08.08.2017)
代码文件许可(License of code files)
我提供的所有代码均已获得GPL v3或更高版本的许可.(All code provided by me is licensed GPL v3 or later.) ©2017 by Ulrich Fiege(© 2017 by Ulrich Fiege)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
Python HTML Raspberry Linux Apache SysAdmin Dynamics-AX 新闻 翻译