SMA SunnyBoy¶
WebConnect¶
-
class
sma_sunnyboy.sma.WebConnect(ip: str, user: sma_sunnyboy.right.Right, password: str, port=80, use_ssl=False)¶ Bases:
objectThe WebConnect object contains all methods to handle SMA features
Returns: A new instance of WebConnect Return type: WebConnect -
auth()¶ Establish a new connexion
Returns: Is the authentication is successful Return type: bool
-
check_connection()¶ Check connexion state
Returns: Is connected Return type: bool
-
get_all_keys()¶ Get all keys from the & API
Returns: All keys Return type: dict
-
get_logger(start: int, end: int)¶ Get solar production in the timestamp range
Parameters: - start (int) – The start timestamp
- end (int) – The end timestamp
Returns: All values in the timestamp range
Return type: list
-
get_serial()¶
-
get_value(key: sma_sunnyboy.key.Key)¶ Get a specific value
Parameters: key (dict) – The key to retrieve values from (see in the Key class) Returns: A list of values Return type: str | int | None
-
ip= None¶
-
logout()¶ Logout and clear connexion
Returns: Is the logout is successful Return type: bool
-
lsid= None¶
-
ssid= None¶
-
use_ssl= False¶
-
Key¶
-
class
sma_sunnyboy.key.Key¶ Bases:
object-
device_error= {'tag': '6100_00412000', 'unit': 'W'}¶
-
device_state= {'tag': '6180_084B1E00', 'unit': 'W'}¶
-
device_warning= {'tag': '6100_00411F00', 'unit': 'W'}¶
-
ethernet_counter_status= {'tag': '6180_084AAA00', 'unit': 'status'}¶
-
ethernet_dns= {'tag': '6800_10AA6400'}¶
-
ethernet_gateway= {'tag': '6800_10AA6300'}¶
-
ethernet_ip= {'tag': '6800_10AA6100'}¶
-
ethernet_netmask= {'tag': '6800_10AA6200'}¶
-
ethernet_status= {'tag': '6180_084A9600', 'unit': 'status'}¶
-
injection_time= {'tag': '6400_00462F00', 'unit': 's'}¶
-
power_ab= {'tag': '6380_40251E00'}¶
-
power_amp= {'tag': '6100_40465300', 'unit': 'A'}¶
-
power_b= {'tag': '6380_40451F00'}¶
-
power_current= {'tag': '6100_40263F00', 'unit': 'W'}¶
-
power_total= {'tag': '6400_00260100', 'unit': 'W'}¶
-
productivity_total= {'tag': '6400_00260100'}¶
-
server_dns= {'tag': '6180_104A9D00'}¶
-
server_gatewy= {'tag': '6180_104A9C00'}¶
-
server_ip= {'tag': '6180_104A9A00'}¶
-
server_netmask= {'tag': '6180_104A9B00'}¶
-
service_time= {'tag': '6400_00462E00', 'unit': 's'}¶
-
tide_ab= {'tag': '6380_40452100'}¶
-
voltage_ab= {'tag': '6380_40451F00'}¶
-
wlan_dns= {'tag': '6180_104ABA00'}¶
-
wlan_gateway= {'tag': '6180_104AB900'}¶
-
wlan_ip= {'tag': '6180_104AB700'}¶
-
wlan_netmask= {'tag': '6180_104AB800'}¶
-
wlan_scan_status= {'tag': '6180_084ABB00'}¶
-
wlan_status= {'tag': '6180_084ABC00', 'unit': 'status'}¶
-
wlan_strength= {'tag': '6100_004AB600'}¶
-