Share My Creation HomeMatic Smart Home CCU Device Viewer

Open Source Project viewing all devices and current values from the HomeMatic Smart Home Central Control Unit.

1614329279347.png

View Option: All data points for the device selected

1614329322633.png

View Option: Filter by XML Attribute ACTUAL_TEMPERATURE

Purpose
  • To view the state of devices and their data points as configured in the CCU.
  • To get device data point(s) ID (XML attribute ise_id = "NNN") used for XML-API HTTP requests via for example Domoticz Homeautomation.
  • To quickly view the status of a device.
  • To filter a selected attribute for all devices, i.e. check low battery state (XML attribute type = "LOW_BAT").
  • To view system variables name, value and ID.
  • To export or copy device or data point data.
  • To save XML-API HTTP response to a text file with XML tree.
  • To have fun developing with B4J and the B4X language.
Requirements
Application
  • tested with an HomeMatic CCU3 3.55 10 and the XML-API CCU Addon 1.20.
  • developed with B4J v8.90 making use of B4XViews, B4XTable and more.
  • created as an Open Source project for personal use only, according the GNU GENERAL PUBLIC LICENSE; Usage at your own risk.
Concept
The device data from the CCU is obtained via HTTP XML-API request (running a script), i.e. http://ccu3-webui/addon/devicelist.cgi.
The HTTP XML-API requests response is an XML tree which is parsed to a map. The map contains lists and maps for the devices and data points.
The devices are selected and their XML attributes name, ise_id, device_type are used to populate a custom listview Devices.
A custom listview Device entry is a panel with fields for the selected XML attributes.

The next step is to get the full state list for all devices and data points, i.e. http://ccu3-webui/addon/statelist.cgi.
This is required to get the data points and their selected XML attributes for a device selected in the customlistview Devices.
Depending the number of devices defined in the CCU, this can be a rather big list.
Selecting a device from the Devices list, selects the data points from the state list.
The data points are populated to a B4XTable with 1 to N pages.
The table has columns for the XML attributes: type, value, ise_id and channel.
The column headings are Type, Value, ID, Channel.

The B4XTable is also used to populate filtered data from all devices.
The table has columns for the XML attributes: device type, device ise_id, data point value, data point ise_id.
The column headings are Device_Type, Device_Value, Datapoint_Value, Datapoint_ID.

For the system variables the concept is the same, i.e. get data using XML-API HTTP request http://ccu3-webui/addon/sysvarlist.cgi.
The returned XML tree is parsed and data, name, value, ise_id is added to the B4XTable columns Name, Value, ID

Source Code
The attached archive ccudeviceviewer.zip contains the B4J source.
Additional libraries required: B4XCollections, B4XTable, jOkHttpUtils2, Json, Xml2Map, XUI Views.

To-do
* Change the value of a selected data point via B4X dialog ("quickset function").
* Multiple XML attribute filters (instead one).
* Run HomeMatic scripts remote and capture the output (to be explored).
* Simplify the CCUClass.

More Info
Published on GitHub.

Licence
GNU GENERAL PUBLIC LICENSE v3.0.
 

Attachments

  • ccudeviceviewer.zip
    24.1 KB · Views: 320
Last edited:
Top