wiki:Proposal

Version 7 (modified by Frédéric, 11 years ago) ( diff )

--

Table of Contents

  1. Main line
  2. Virtual Device

Proposal

This page is more or less a sandbox where I put my ideas. Feel free to comment.

Main line

pKNyX is not a ready-to-use application: it is a framework. This means that it is up-to-you to write the application which fits your needs.

For that, you will need to know Python, a powerfull , high level, object oriented, scripting language. Don't be afraid: Python is really easy to learn. It is now very popular, and used in many free and commercial applications to extend their capabilities. It is now even teached at school, to young people (~15 years old)! There are hundreds documentations, tutorials and examples on the web, and a huge community. Learning Python is really not a waste of time, and will help you to do many other tasks than simply building your KNX application!

pKNyX will provide you powerfull tools so you will only focus on your problem, and not on language subtilities, like it can be the case with other languages, like C, C++...

Ok, let me show you what I have in mind.

Virtual Device

This will be the central feature of pKNyX, allowing user to create virtual devices which mimics real KNX devices. They will follow the same architecture, like having Datapoints (aka as Communication Objects), which have to be linked to Group Address to communicate.

Here is a very simple example of what I have in mind: creating a virtual weather station, which uses informations from a non-KNX real weather-station, or even from a web site, like Weather Underground or so:

from pknyx.api import Device, ETS

# Weather station class definition
class WeatherStation(Device):

    # Datapoints (= Communication objects) definition
    DP_01 = dict(name="temperature", dptId="9.001", flags="crt", priority="low", initValue=0.)
    DP_02 = dict(name="humidity", dptId="9.007", flags="crt", priority="low", initValue=0.)
    DP_03 = dict(name="wind_speed", dptId="9.005", flags="crt", priority="low", initValue=0.)
    DP_04 = dict(name="wind_alarm", dptId="1.005", flags="crt", priority="high", initValue=""No alarm")
    DP_05 = dict(name="wind_limit", dptId="9.005", flags="cwtu", priority="low", initValue=15.)
    DP_06 = dict(name="wind_alarm_enable", dptId="1.003", flags="cwtu", priority="low", initValue="Disable")

# Instanciation of the weather station device object
station = WeatherStation(name="weather", address="1.2.3")

# Linking weather station Datapoints to Group Address
ETS.link(device=station, dp="temperature", gad="1/1/1")
ETS.link(device=station, dp="humidity", gad="1/1/2")
ETS.link(device=station, dp="wind_speed", gad="1/1/3")
ETS.link(device=station, dp="wind_alarm", gad="1/1/4")
ETS.link(device=station, dp="wind_limit", gad="1/1/5")
ETS.link(device=station, dp="wind_alarm_enable", gad="1/1/6")

That's it! Ok, that device does not do much things...

Note: See TracWiki for help on using the wiki.