msunpv package
msunpv library.
- class msunpv.MSunPVWebConnect(session, ip)[source]
Bases:
objectClass to connect to the MSunPV webconnect module and read status.xml.
Init MSunPV connection.
- Parameters:
session (ClientSession) – aiohttp client session
ip (str) – Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- __init__(session, ip)[source]
Init MSunPV connection.
- Parameters:
session (ClientSession) – aiohttp client session
ip (str) – Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- async get_status()[source]
Get Status from MSunPV. Call HTTP URL: http://<IP_HOSTNAME>/status.xml
Args:
- Raises:
MSunPVXMLDataException – XML data not valid from status.xml.
- Returns:
class MSunPVDataIndex
- Return type:
- async get_index()[source]
Get Index from MSunPV. Call HTTP URL: http://<IP_HOSTNAME>/index.xml
Args:
- Raises:
MSunPVXMLDataException – XML data not valid from index.xml.
- Returns:
class MSunPVDataIndex
- Return type:
- exception msunpv.MSunPVConnectionException[source]
Bases:
MSunPVExceptionAn error occurred in the connection with the device.
- exception msunpv.MSunPVXMLDataException[source]
Bases:
MSunPVExceptionXML Data Exception
- class msunpv.MSunPVDataIndex(data_xml)[source]
Bases:
MSunPVCommonClass to store MSunPV Index data to JSON.
Init MSunPVDataIndex.
- Parameters:
data_xml (str) – data retry
Raises:
- __init__(data_xml)[source]
Init MSunPVDataIndex.
- Parameters:
data_xml (str) – data retry
- Return type:
None
Raises:
- typans: list[str]
Type sensors
PowRéso;1;6:PowP.V;1;6:OutBal;0;3:OutRad;0;3:VoltRés;1;4:T_Bal1;1;18:T_SDB;1;18:T_Amb;1;18:S9;0;0:S10;0;0:S11;0;0:S12;0;0:S13;0;0:S14;0;0:S15;0;0:S16;0;0:
- typouts: list[str]
Type Output
R_Bal1;0;2:Rad_SDB;0;2:A3;0;0:A4;0;0:A5;0;0:A6;0;0:A7;0;0:A8;0;0:A9;0;0:A10;0;0:A11;0;0:A12;0;0:A13;0;0:A14;0;0:A15;0;0:A16;0;0:
- sensor_type_info(id=0)[source]
Sensor information type
- Parameters:
id (int) – id (default 0)
- Return type:
Raises:
- Returns:
Sensor information
- Return type:
- Parameters:
id (int)
- counter_type_info(id=0)[source]
Counter information type
- Parameters:
id (int) – id (default 0)
- Return type:
Raises:
- Returns:
Counter information
- Return type:
- Parameters:
id (int)
- class msunpv.MSunPVDataStatus(data_xml)[source]
Bases:
MSunPVCommonClass to store MSunPV Status data to JSON.
Init MSunPVDataStatus.
- Parameters:
data_xml (str) – data retry
Raises:
- choutval: list[str]
Values calculated at the output of the heating modules
0;0;0;ff;:0,0;0,0;0,0;0,0;
- __init__(data_xml)[source]
Init MSunPVDataStatus.
- Parameters:
data_xml (str) – data retry
- Return type:
None
Raises:
- rssi_quality: int = 0
Wifi Received Signal Strength Indication in dbm [-100 dBm (weak signal) to 0 dBm (strong signal)]
-80
- out_balloon: float
Output Balloon
MSPV_2_2d – (0–400) → (0–100%) %, value
5MSPV_4_4d – Power en W, value
20
- out_radiator: float
Output Radiator
MSPV_2_2d – (0–400) → (0–100%) %, value
10MSPV_4_4d – Power en W, value
200
- class msunpv.SensorType[source]
Bases:
GenericTypeSame structure as GenericType
- class msunpv.CounterType[source]
Bases:
GenericTypeSame structure as GenericType
- class msunpv.MSunPVRead(ip)[source]
Bases:
objectClass to Read the MSunPV using webconnect module.
Init MSunPVRead reader class.
- Parameters:
ip (str) – Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- __init__(ip)[source]
Init MSunPVRead reader class.
- Parameters:
ip (str) – Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- DataMSunPVDataStatus: MSunPVDataStatus
Data from MSunPV status.xml
- DataMSunPVDataIndex: MSunPVDataIndex
Data from MSunPV index.xml
- async start()[source]
Initializes the HTTP session and the MSunPVWebConnect object.
Args:
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- async refresh_data(All=False)[source]
Reads data from WebConnect once. Read MSunPV data from status.xml and index.xml and update local variables:
MSunPVDataStatus
MSunPVDataIndex
- Parameters:
All (bool) – Rafresh All data (status.xml and index.xml) (Default: False)
- Raises:
MSunPVXMLDataException – Message
Submodules
msunpv.const module
Constants for MSunPV WebConnect library for Python.
- msunpv.const.DEFAULT_TIMEOUT = 15
Default time out 15s
msunpv.data module
Data for the MSunPV library.
- class msunpv.data.SensorType[source]
Bases:
GenericTypeSame structure as GenericType
- class msunpv.data.CounterType[source]
Bases:
GenericTypeSame structure as GenericType
- class msunpv.data.MSunPVCommon[source]
Bases:
objectGeneric Class function used in MSunPVDataStatus and MSunPVDataIndex
- class msunpv.data.MSunPVDataStatus(data_xml)[source]
Bases:
MSunPVCommonClass to store MSunPV Status data to JSON.
Init MSunPVDataStatus.
- Parameters:
data_xml (str) – data retry
Raises:
- choutval: list[str]
Values calculated at the output of the heating modules
0;0;0;ff;:0,0;0,0;0,0;0,0;
- __init__(data_xml)[source]
Init MSunPVDataStatus.
- Parameters:
data_xml (str) – data retry
- Return type:
None
Raises:
- rssi_quality: int = 0
Wifi Received Signal Strength Indication in dbm [-100 dBm (weak signal) to 0 dBm (strong signal)]
-80
- out_balloon: float
Output Balloon
MSPV_2_2d – (0–400) → (0–100%) %, value
5MSPV_4_4d – Power en W, value
20
- out_radiator: float
Output Radiator
MSPV_2_2d – (0–400) → (0–100%) %, value
10MSPV_4_4d – Power en W, value
200
- class msunpv.data.MSunPVDataIndex(data_xml)[source]
Bases:
MSunPVCommonClass to store MSunPV Index data to JSON.
Init MSunPVDataIndex.
- Parameters:
data_xml (str) – data retry
Raises:
- __init__(data_xml)[source]
Init MSunPVDataIndex.
- Parameters:
data_xml (str) – data retry
- Return type:
None
Raises:
- typans: list[str]
Type sensors
PowRéso;1;6:PowP.V;1;6:OutBal;0;3:OutRad;0;3:VoltRés;1;4:T_Bal1;1;18:T_SDB;1;18:T_Amb;1;18:S9;0;0:S10;0;0:S11;0;0:S12;0;0:S13;0;0:S14;0;0:S15;0;0:S16;0;0:
- typouts: list[str]
Type Output
R_Bal1;0;2:Rad_SDB;0;2:A3;0;0:A4;0;0:A5;0;0:A6;0;0:A7;0;0:A8;0;0:A9;0;0:A10;0;0:A11;0;0:A12;0;0:A13;0;0:A14;0;0:A15;0;0:A16;0;0:
- sensor_type_info(id=0)[source]
Sensor information type
- Parameters:
id (int) – id (default 0)
- Return type:
Raises:
- Returns:
Sensor information
- Return type:
- Parameters:
id (int)
- counter_type_info(id=0)[source]
Counter information type
- Parameters:
id (int) – id (default 0)
- Return type:
Raises:
- Returns:
Counter information
- Return type:
- Parameters:
id (int)
msunpv.exceptions module
Exceptions for the MSunPV library.
- exception msunpv.exceptions.MSunPVException[source]
Bases:
ExceptionBase exception of the msunpv library.
- exception msunpv.exceptions.MSunPVConnectionException[source]
Bases:
MSunPVExceptionAn error occurred in the connection with the device.
- exception msunpv.exceptions.MSunPVXMLDataException[source]
Bases:
MSunPVExceptionXML Data Exception
msunpv.read module
MSunPV Read library for Python.
See: https://ard-tek.com/
Source: https://github.com/thanatos-vf-2000/msunpv
Init MSunPV connection.
- Args:
ip (str): Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
KeyError: Hostname or IP address empty
- class msunpv.read.MSunPVRead(ip)[source]
Bases:
objectClass to Read the MSunPV using webconnect module.
Init MSunPVRead reader class.
- Parameters:
ip (str) – Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- __init__(ip)[source]
Init MSunPVRead reader class.
- Parameters:
ip (str) – Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- DataMSunPVDataStatus: MSunPVDataStatus
Data from MSunPV status.xml
- DataMSunPVDataIndex: MSunPVDataIndex
Data from MSunPV index.xml
- async start()[source]
Initializes the HTTP session and the MSunPVWebConnect object.
Args:
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- async refresh_data(All=False)[source]
Reads data from WebConnect once. Read MSunPV data from status.xml and index.xml and update local variables:
MSunPVDataStatus
MSunPVDataIndex
- Parameters:
All (bool) – Rafresh All data (status.xml and index.xml) (Default: False)
- Raises:
MSunPVXMLDataException – Message
msunpv.webconnect module
MSunPV WebConnect library for Python.
See: https://ard-tek.com/
Source: https://github.com/thanatos-vf-2000/msunpv
Init MSunPV connection.
- Args:
session (ClientSession): aiohttp client session ip (str): Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
KeyError: Hostname or IP address empty
- class msunpv.webconnect.MSunPVWebConnect(session, ip)[source]
Bases:
objectClass to connect to the MSunPV webconnect module and read status.xml.
Init MSunPV connection.
- Parameters:
session (ClientSession) – aiohttp client session
ip (str) – Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- __init__(session, ip)[source]
Init MSunPV connection.
- Parameters:
session (ClientSession) – aiohttp client session
ip (str) – Hostname or IP address of MSunPV 2*2 or 4*4
- Raises:
MSunPVConnectionException – Hostname or IP address empty
- async get_status()[source]
Get Status from MSunPV. Call HTTP URL: http://<IP_HOSTNAME>/status.xml
Args:
- Raises:
MSunPVXMLDataException – XML data not valid from status.xml.
- Returns:
class MSunPVDataIndex
- Return type:
- async get_index()[source]
Get Index from MSunPV. Call HTTP URL: http://<IP_HOSTNAME>/index.xml
Args:
- Raises:
MSunPVXMLDataException – XML data not valid from index.xml.
- Returns:
class MSunPVDataIndex
- Return type: