OCR from picture taken with a DSLR CameraWhen it comes to image processing and development of computer-vision applications, it is quite handy to have an appropriate set of algorithms available to support your task. A major toolset for image processing is OpenCV, when additionally OCR (optical character recognition) is required tesseract-ocr is famous and reliable library. Once these tools are installed it is quite comfortable to work with both if them.

While Linux user have an integrated package manager (apt-get, yum, etc.) which makes it easy to install all the necessary libraries and dependencies, macOS user could use Homebrew or MacPorts. Another possibility to install the required packages on macOS is to compile them from source. This can become cumbersome, but nevertheless I feel comfortable by building the libraries on my own.

This article will cover the following:

  • Building tesseract-ocr from source (including the dependencies)
  • Setting up the development environment by installing OpenCV and pytesseract using pip into a virtualenv
  • Running a simple example which scans a business card and extracts text data recognised by tesseract-ocr

mqtt settings on simatic panelMQTT is a lightweight Machine-to-Machine (M2M) communication protocol often used in Industry 4.0 environments and IoT applications. Implementations and libraries exist for nearly every hardware, such as Arduino, Raspberry, PC, Smartphone, PLCs, etc.

MQTT (short for Message Queue Telemetry Transport) is an open standard (ISO/IEC PRF 20922) and is based on the publish-subscribe pattern. It works on top of the TCP/IP stack. It's main purpose is to exchange messages between clients and a server (broker). The clients can decide by themselves whether a message is important for them, based on the topics they have subscribed.

In this article I will shortly introduce how to setup the Simatic S7-1200 as a MQTT client (publisher role) and publish data to a MQTT broker on my local network.

The MQTT library for the Simatic PLC is taken from Siemens (from official Industry Support Portal) and as a broker I am using the hbmqtt library written in Python.

Simatic S7 1212C AC DC Rly reading temperature from PT1000 and offering via rest apiIn the previous post (RESTful API for Simatic S7-1200 PLC & Python Client (Part 1)) I showed how to design and implement a simple ReST API for the Simatic S7-1200 and the integrated web server. A client (written in python) was accessing the API. It was assumed, that no access restrictions were configured for the PLC and therefore the ReST API was accessible by everyone (anonymous user). Such a configuration is not conceivable for productive environments.

In this post I will shortly introduce how to use python (with the requests library) to login through the login form presented on the welcome page when you access the Simatic S7 using a web browser over HTTP/S. Once you have retrieved the authentication cookie successfully, you can access your API and your user-defined pages with your own clients.

Simatic S7 1200 PLC with KP300 Simatic PanelReST (Representational State Transfer) is an often used technique in distributed environments to simplify the data exchange between devices. It is used in web-services and is one possibility to achieve M2M (Machine-to-Machine) communication.

The Siemens Simatic S7-1200 PLC comes with an integrated web server which just needs to be activated for the specific project. Therefore, the access to variables and tags inside the PLC is not limited to the S7-1200 native web frontend, it is also possible to develop user-defined pages (or rather web apps) using JavaScript and HTML. With a bit of fortunes it can easily be achieved to "configure" the integrated web server to respond with a JSON or XML (or any other text based format) to a http/s request. The client which requests data from the S7 web-API can be a web app running on the S7 written in JavaScript but can also be any other client. In this case I will introduce a client written in Python using the requests library (and Tkinter to display a GUI).

FlightReportManager Application Icon


While flying, the Parrot Bebop Quadcopter (and the Bebop 2 Quadcopter) stores all flight information in a log file. This is a so called pud file and has a json structure.

This pud file includes the detailed flight information which is also used by Parrot to store the flights in their cloud (formerly known as ARDrone Academy, Drone Academy) and to perfrom the flight analysis, such as generating battery plot, speed plot and altitude plot.

This application uses the DroneDataConversion library to do the flight data conversion. You can manage and store your Parrot Bebop flights and take care for visualising and organising the flight data.