Skip to main content

license buy_me_a_coffee

pystuderxcom

Python library for retrieving sensor information from Studer-Innotec devices. This component connects directly over the local network using the Studer xcom protocol.

The custom component is comfirmed to be compatible with:

  • Xtender XTH 8000-48, XTM 4000
  • Xcom-CAN (BSP connection to a third party BMS)
  • Xcom-LAN (which actually is a Xcom232i with a Moxy NPort 5110A)
  • BMS
  • RCC-03
  • VarioTrack

It should also be able to detect and handle

  • Xtender (any other XTH, XTS and XTM models)
  • VarioString
  • RCC-02

Disclaimer: this library is NOT created by Studer-Innotec, but is based on their documentation of the Xcom protocol. That documentation can be found on: Studer-Innotec Download Center -> Openstuder -> Communication protocol Xcom-232i

Prerequisites

This library depends on having a Studer Xcom-LAN (i.e. an Xcom-232i and a Moxa ethernet gateway) acting as a Xcom client and connecting to this integration. For older systems this will be a separate component, for future systems Studer have indicated that LAN connection will become part of the Xtender range.

The Studer Xcom-LAN will be able to simultaneously send data to the Studer online portal as well as sending data to this libarary.

Configuration steps:

  1. Download and install the Moxa DSU tool (Device Search Utility)

    • Open www.moxa.com in a browser
    • Select Support -> Software and Documentation
    • Choose NPort 5100A series (or whatever specific device you have)
    • Scroll down under 'Related Software, Firmware and Drivers' to find 'Device Search Utility'
    • Download and install the utility
  2. Locate the Moxa NPort device on the local network

    • Run the Moxa Device Search Utility

    • Press the 'Search' button and wait until the search finishes

    • The utility should display the found NPort device

    • Double click on the found device to open its configuration page

      dsu_search_results

  3. Configure the Moxa NPort device

    • In the Main Menu, select 'Operating Settings' -> Port 1

    • Verify that 'Operation Mode' is set to 'TCP Client' (preferred mode, TCP Server and UDP are also supported)

    • Add the ip-address of your computer as 'Destination IP address'

    • Set Delimeter 1 to '0d' and Enable

    • Set Delimeter 2 to '0a' and Enable

    • Set Delimeter Process to 'Strip Delimeter'

    • Press the 'Submit' button

    • Press 'Save/Restart'

      moxa_operating_settings

Usage

The library is available from PyPi using: pip install pystuderxcom

To read an infos or param or write to a param:

from pystuderxcom import XcomApiTcp, XcomApiTcpMode, XcomDataset, XcomVoltage

dataset = XcomDataset.get_instance(XcomVoltage.AC240, XcomVoltage.DC48)
info_3023 = dataset.get_by_nr(3023, "xt")  # the "xt" part is optional but usefull for detecting mistakes
info_6001 = dataset.get_by_nr(6001, "bsp")
param_1107 = dataset.get_by_nr(1107, "xt")
dataset = None  # Release memory of the dataset

api = XcomApiTcp(mode=XcomApiTcpMode.SERVER, listen_port=4001)    # port number configured in Xcom-LAN/Moxa NPort
try:
    if not api.start():
        logger.info(f"Did not connect to Xcom")
        return

    # Retrieve info #3023 from the first Xtender (Output power)
    value = api.request_value(info_3023, "XT1")    # xt address range is 101 to 109, or use "XT1" to "XT9"
    logger.info(f"XT1 3023: {value} {info_3023.unit} ({info_3023.name})")

    # Retrieve param #6001 from BSP (Nominal capacity)
    value = api.request_value(info_6001, "BSP")    # bsp address range is only 601, or use "BSP"
    logger.info(f"BSP 6001: {value} {info_6001.unit} ({info_6001.name})")

    # Update param 1107 on the first Xtender (Maximum current of AC source)
    value = 4.0    # 4 Ampere
    if api.update_value(param_1107, value, "XT1"):
        logger.info(f"XT1 1107 updated to {value} {param_1107.unit} ({param_1107.name})")

finally:
    api.stop()

A complete list of param and infos numbers can be found in the source of this library in file src/pystuderxcom/xcom_datapoints_240v.json

A complete list of all available device families and their address range can be found in file src/pystuderxcom/xcom_families.py

Several other coding examples are provided:

Synchronous code Asynchronous code Description
example_api_use.py example_api_use_async.py read & write infos and params
example_api_msg.py example_api_msg_async.py display system messages
example_menu.py example_menu_async.py display menu structure
example_discover_devices.py example_discover_devices_async.py discover local xcom devices
example_discover_moxa.py example_discover_moxa_async.py discover url to moxa web-config

Param writes to device RAM

When the value of a Studer param is changed via this library, these are written via Xcom to the affected device. Changes are stored in the device's RAM memory, not in its flash memory as you can only write to flash a limited number of times over its lifetime.

However, reading back the value from the entity will always be from flash. As a result, the change to the entity value is not visible in the RCC or remote console. You can only tell from the behavior of the PV system that the Studer param was indeed changed.

After a restart/reboot of the PV system the system will revert to the value from Flash. So you may want to periodically repeat the write of changed param values via an automation.

IMPORTANT:

Be very carefull in changing params marked as having level Expert, Installer or even Qualified Service Person. If you do not know what the effect of a Studer param change is, then do not change it.

Credits

Special thanks to the following people for providing the information this library is based on:

Release files for pystuderxcom 3.6.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pystuderxcom 3.6.7
File Size Uploaded
pystuderxcom-3.6.7.tar.gz 104.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pystuderxcom 3.6.7
File Interpreter ABI Platform
pystuderxcom-3.6.7-py3-none-any.whl Python 3 none any Details

Total release size: 207.8 kB

Release files / pystuderxcom-3.6.7.tar.gz

Download URL pystuderxcom-3.6.7.tar.gz
Size 104.7 kB
Tags Source
SHA-256 checksum
How to use checksums
aeac807a801b7c632892e7a43111550bc4405c18a11142aa242beffee6074dc8
BLAKE2b-256 checksum
How to use checksums
8310520d11451bff51b55a3fd5437087a4a5e0e6564acb4d122c2406288d43ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / pystuderxcom-3.6.7-py3-none-any.whl

Download URL pystuderxcom-3.6.7-py3-none-any.whl
Size 103.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
120078d8ade9005f9c11bb37225a69dde4159549e52a7407c326da23bdab193d
BLAKE2b-256 checksum
How to use checksums
b726a04a835668e1a2d19a0598a96a5eba0b39f54000f23b059870416cf9ae0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

3.6.8

2 release files

This release

3.6.7 This release

2 release files

3.6.6

2 release files

3.6.5

2 release files

3.6.4

2 release files

3.6.3

2 release files

3.6.2

2 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.7

2 release files

3.4.6

2 release files

3.4.5

2 release files

3.4.4

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page