LinHK is a portably programmed extension for LCN that provides the basic functionality of LCN-PCHK: the conversion between serial bus telegrams and PCK. With this program, it is possible to obtain a bus connection without being dependent on the PCHK program. A PCHK license is not required in order to access an LCN system using LinHK, even via LCN-Pro (we would like to thank Issendorff GmbH for their support).
In addition, LinHK offers the following extra features:
In addition to supporting PCK, further commands and messages are supported (PCKE for PCK Extended) in order to make use of bus-coupling-relevant messages that are not available in PCK.
An integrated small web server (optionally also usable for secure access via HTTPS from the Internet) enables the easy implementation of a visually appealing visualization including manual control via a web browser.
LinHK can execute macros that can be started from a button on the LCN bus. Macro calls can be easily parameterized using LCN-PRO.
Storage of status changes and measured values for later evaluation.
When using LinHK for third-party coupling, it must be ensured that the external software complies with the PCK specification. In some cases, such software is tested only against the PCHK program, which also accepts other, non-specified inputs in certain areas.
Version Overview
LinHK for FRITZ!Box
FRITZ!Box 7170 via LCN-PKU, LCN-PK (via USB adapter), or LCN-PC (via USB adapter)
FRITZ!Box 7270 via LCN-PKU, LCN-PK (via USB adapter), or LCN-PC (via USB adapter)
FRITZ!Box 7390 via LCN-PKU, LCN-PK (via USB adapter), or LCN-PC (via USB adapter)
For using LinHK on a FRITZ!Box, the following are additionally required:
A suitable FRITZ!Box with USB host interface (recommended: 7390)
USB hub with optional own power supply (may be required)
USB cable and LCN-PKU
USB memory stick (alternatively a USB hard drive)
Installing LinHK on a FRITZ!Box without a USB stick is not supported, as LinHK cannot be used meaningfully without permanent write access.
LinHK for Raspberry Pi
Raspberry Pi (Type B with 512 MB RAM, Type 2B or Type 3B with 1 GB RAM) via LCN-PKU. Firmware optimally tailored for operating LinHK is provided.
To operate LinHK on a Raspberry Pi, a valid special virtual module of type “Calculator”, matching the personal license file, is required.
For using LinHK on the Raspberry Pi with the corresponding firmware, the following are additionally required:
A suitable Raspberry Pi with adequately sized power supply and appropriate connection cables
Optional USB hub with its own power supply (may be required)
USB cable and LCN-PKU
SD or micro-SD card suitable for the Raspberry Pi for the firmware
USB memory stick (alternatively a USB hard drive) for LinHK operation
Installing LinHK on the SD card is not supported, as LinHK cannot be used meaningfully without permanent write access.
Type of LCN Interface
(LCN-PC, LCN-PK, or LCN-PKU)
The actual usability of a given combination depends on the LCN installation, the typical bus traffic, and the specific bus connection including wiring. It may work without problems, but in the worst case it can also cause bus disturbances.
Due to technical reasons, a connection via LCN-PC is not optimal; a higher error rate compared to LCN-PKU is to be expected, which may not necessarily be noticeable during normal operation.
The LinHK Visualization System
The visualization system uses Web 2.0 technologies. This allows flexible visual design while simultaneously reducing LinHK’s processing load, enabling it to provide visualization even on a FRITZ!Box without issues. On the other hand, this technology places high demands on web browsers and their standards compliance.
It can generally be used successfully with one of the following modern web browsers:
Firefox
Chrome
Safari
Other web browsers may work, but sometimes with visual or functional limitations.
For browsers or devices that cannot meet these high requirements (e.g. PDAs), simple HTML pages can be used to at least allow basic control.
The visualization system is primarily intended for an LCN-based house bus and is therefore tailored to the characteristics of LCN modules. A demo visualization is included with LinHK as an example implementation.
To create your own visualization with LinHK, knowledge of the following is required:
HTML
Cascading Style Sheets (CSS)
JavaScript
Use of the Document Object Model (DOM)
Debugging of web pages
LCN parameterization (especially of the bus to be visualized)
PCK(E)
LinHK Macros
LinHK macros correspond in some ways to the macros known from LCN-W and are parameterized in the same way using LCN-PRO. A LinHK macro is ultimately an executable program or script that is started as soon as a corresponding command to LCN-W, evaluated by LinHK, is sent over the bus.
A macro is usually implemented in the scripting language provided by the operating system. During execution, the macro behaves like an already registered PCK client, meaning that PCK commands can be sent and messages can be read.
Several example macros are included and can usually be used simply by copying them into the macro directory and renaming them accordingly.
Virtual Modules
Virtual relays and corresponding outputs are a popular tool in LCN for implementing more complex control logic. However, available resources (indicators, sums, buttons) can quickly be exhausted. If these resources are not physically required, the virtual modules described here provide an easy remedy: such a virtual module can be connected to the bus without any cabling or wiring effort and then parameterized via LinHK with LCN-PRO as usual.
Since this virtual module sends status messages like any other module, these can be captured and used by a visualization or by real modules, creating additional possibilities.
Virtual modules are essentially small add-on programs that must be purchased in addition to the LinHK license.
Integrated 8-Channel Time Switch
A virtual module can behave as if each binary input were connected to the switching contact of a time switch.
Evaluation of Transponder Codes and IR Access Control
Normally, the serial numbers of detected transponders and IR remote controls are sent as status messages over the bus, but are evaluated only within the module to which the reader or IR receiver is connected.
In contrast, the virtual modules always evaluate such transponder and IR serial numbers read from the bus as status messages.
Measurement Value Arithmetic
The virtual modules offer the same possibilities for controller arithmetic as real modules. However, to simplify parameterization (and save resources), several optional special features are available.
Motor Control and Positioning via Relays and Outputs
LCN provides the option to position roller shutter motors. However, this requires many modules and BS4. The virtual modules offer a cost-effective alternative and can take over this positioning, provided that minor limitations in accuracy and operation are accepted.
Technical Implementation of the Virtual Modules
The virtual modules are closely linked to LinHK. Their “firmware” is part of LinHK and can therefore be easily modified through a LinHK update. The “EEPROM” of a virtual module is essentially a file that is read and written by LinHK. In this way, module parameterization is retained even in the event of a “power failure” (e.g. due to a restart of LinHK). Naturally, in this situation the operating message for mains voltage monitoring (formerly D8) is triggered.
For support, an internal area is available in the Bus-Profi forum, which is unlocked for every license holder after login (www.bus-profi.de).