Async python library to communicate with Studer-Innotec devices on the local network via Xcom protocol
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
aioxcom
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 was tested with:
- Xtender XTH 8000-48 (but should also work for other XTH, XTS and XTM)
- Xcom-CAN (BSP connection to a third party BMS)
- Xcom-LAN (which actually is a Xcom232i with a Moxy NPort 5110A)
- RCC-03
It should also be able to detect and handle
- Studer BMS
- VarioTrack
- 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 -> Software and Updates -> Communication protocol Xcom-232i
Prerequisites
This device 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 integration.
Configuration steps:
-
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
-
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
-
-
Configure the Moxa NPort device
-
In the Main Menu, select 'Operating Settings' -> Port 1
-
Verify that 'Operation Mode' is set to 'TCP Client'
-
Add the ip-address or network name of your HomeAssistant as 'Destination IP address'
-
Press the 'Submit' button
-
Press 'Save/Restart'
-
Usage
The library is available from PyPi using:
pip install aioxcom
To read an infos or param or write to a param:
from aioxcom import XcomApiTcp, XcomDataset, VOLTAGE
dataset = await XcomDataset.create(VOLTAGE.AC240) # or use VOLTAGE.AC120
info_3023 = dataset.getByNr(3023, "xt") # the "xt" part is optional but usefull for detecting mistakes
info_6001 = dataset.getByNr(6001, "bsp")
param_1107 = dataset.getByNr(1107, "xt")
dataset = None # Release memory of the dataset
api = XcomApiTcp(4001) # port number configured in Xcom-LAN/Moxa NPort
try:
if not await api.start():
logger.info(f"Did not connect to Xcom")
return
# Retrieve info #3023 from the first Xtender (Output power)
value = await api.requestValue(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 = await api.requestValue(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 await api.updateValue(param_1107, value, "XT1"):
logger.info(f"XT1 1107 updated to {value} {param_1107.unit} ({param_1107.name})")
finally:
await api.stop()
A complete list of param and infos numbers can be found in the source of this library in file src/aioxcom/xcom_datapoints_240v.json
A complete list of all available device families and their address range can be found in file src/aioxcom/xcom_families.py
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 time 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. 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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioxcom-1.5.1.tar.gz.
File metadata
- Download URL: aioxcom-1.5.1.tar.gz
- Upload date:
- Size: 62.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a8a4f5d10853d47a0737adb00038b933b5c2d5919799155ba4d7dfd1c55dded
|
|
| MD5 |
203e6be326f5f6abe4ef4e717cf615e5
|
|
| BLAKE2b-256 |
a4f30d620d7149fe6091b0fc1af14c90ca60a3416d3b0ff1d8187d2b0028f91e
|
Provenance
The following attestation bundles were made for aioxcom-1.5.1.tar.gz:
Publisher:
publish.yml on ankohanse/aioxcom
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioxcom-1.5.1.tar.gz -
Subject digest:
7a8a4f5d10853d47a0737adb00038b933b5c2d5919799155ba4d7dfd1c55dded - Sigstore transparency entry: 151482180
- Sigstore integration time:
-
Permalink:
ankohanse/aioxcom@655ea6912ee4f346baad12490ecdf10dc9f16c96 -
Branch / Tag:
refs/tags/v1.5.1 - Owner: https://github.com/ankohanse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@655ea6912ee4f346baad12490ecdf10dc9f16c96 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aioxcom-1.5.1-py3-none-any.whl.
File metadata
- Download URL: aioxcom-1.5.1-py3-none-any.whl
- Upload date:
- Size: 60.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e45a28c5403d722f884947a32b167cbea9034578803538a13c94cdd97cb3f82e
|
|
| MD5 |
f694d460b7a0bd9e8dd35acac0dab351
|
|
| BLAKE2b-256 |
0f0e31551c0570ffcc1364d701a89b90450b47012e8f5aa7fe83dcd22aa13d31
|
Provenance
The following attestation bundles were made for aioxcom-1.5.1-py3-none-any.whl:
Publisher:
publish.yml on ankohanse/aioxcom
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioxcom-1.5.1-py3-none-any.whl -
Subject digest:
e45a28c5403d722f884947a32b167cbea9034578803538a13c94cdd97cb3f82e - Sigstore transparency entry: 151482186
- Sigstore integration time:
-
Permalink:
ankohanse/aioxcom@655ea6912ee4f346baad12490ecdf10dc9f16c96 -
Branch / Tag:
refs/tags/v1.5.1 - Owner: https://github.com/ankohanse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@655ea6912ee4f346baad12490ecdf10dc9f16c96 -
Trigger Event:
release
-
Statement type: