Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
The APsystems EZ1 Python library offers a streamlined interface for interacting with the local API of APsystems EZ1 Microinverters.
The APsystems EZ1 Python library can be used to interact with APsystems EZ1 Microinverters. It provides a convenient way to communicate with the microinverter over your local network, allowing you to read and set various device parameters like power status, alarm information, device information, and power limits.
This library is published, maintained, and developed by Sonnenladen GmbH. Our collaboration with the APsystems R&D Team has been instrumental in making this API a reality. At Sonnenladen GmbH, we are committed to providing top-notch solar energy solutions and are excited to offer this library to enhance the experience of using APsystems inverters.
For those interested in purchasing APsystems inverters, please visit our German online shop at Sonnenladen. We offer a range of APsystems products, backed by our expertise in solar energy solutions.
Device | Name | Support / Compatibility | Available to purchase at: |
---|---|---|---|
APsystems EZ1-M (Firmware: EZ1 1.6.0) | Sonnenladen GmbH - Online Shop IN STOCK | AUF LAGER |
The local API access needs to be activated once in the settings of the EZ1. Please follow our Step-By-Step Guide to do so:
apsystems-ez1
library via pip. The package is hosted on PyPI, making it straightforward to install and update. To install, run the following command:pip install apsystems-ez1
Language | -Version- | OS | Plattform | Support / Compatibility |
---|---|---|---|---|
Python: |
Python 3.11+ |
MacOS Linux Windows etc. |
PCs and Laptops Home Servers Virtual Machines Single Board Computers (Raspberry Pi) | |
MicroPython: |
N/A |
MicroPython as a Firmware |
Raspbery Pi Pico ESP8266 and ESP32 STM32 Microcontrollers Teensy, Pyboard and many more.. |
We're working on it... |
For a complete understanding of the APsystems EZ1 Python Library, refer to our online documentation. It includes detailed descriptions of the library's functionality, usage examples, and regular updates on new features and improvements.
Access the Documentation: APsystems EZ1M Python Library Documentation 📖
This resource is designed to support both new and experienced users in implementing and optimizing the library in their projects.
Here's a quick example of how to use the APsystemsEZ1 library:
from APsystemsEZ1 import APsystemsEZ1M # import the APsystemsEZ1 library
import asyncio
# Initialize the inverter with the specified IP address and port number.
inverter = APsystemsEZ1M("192.168.1.100", 8050)
async def main():
try:
# Get device information
device_info = await inverter.get_device_info()
print("Device Information:", device_info)
# Get alarm information
alarm_info = await inverter.get_alarm_info()
print("Alarm Information:", alarm_info)
# Get output data
output_data = await inverter.get_output_data()
print("Output Data:", output_data)
# Set maximum power limit (ensure the value is within valid range)
set_power_response = await inverter.set_max_power(500)
print("Set Power Response:", set_power_response)
# Set power status (ensure "ON" or other value is valid)
set_power_status_response = await inverter.set_device_power_status("ON")
print("Set Power Status Response:", set_power_status_response)
# Get current power status
power_status = await inverter.get_device_power_status()
print("Power Status:", power_status)
except Exception as e:
print(f"An error occurred: {e}")
# Run the main coroutine
asyncio.run(main())
Fetch and display data from the inverter.
This function performs the following tasks:
from APsystemsEZ1 import APsystemsEZ1M
import asyncio
# Initialize the inverter with the specified IP address and port number.
inverter = APsystemsEZ1M("192.168.178.168", 8050)
async def main():
try:
# Fetch output data from the inverter.
response = await inverter.get_output_data()
# Display power input from PV-Input 1 and 2.
print("Power PV-Input 1: " + str(response.p1) + " W")
print("Power PV-Input 2: " + str(response.p2) + " W")
# Display total energy generation for the current day.
print("Generation today " + str(round(response.e1 + response.e2, 3)) + " kWh")
except Exception as e:
# Handle any exceptions that occur during the data fetch and print the error.
print(f"An error occurred: {e}")
# Run the main coroutine.
# This is the entry point of the script and it runs the main function in an asynchronous manner.
asyncio.run(main())
Example Output:
Power PV-Input 1: 126 W
Power PV-Input 2: 161 W
Generation today: 3.167 kWh
Set the maximum power output limit of the inverter and display the response.
This script performs the following tasks:
from APsystemsEZ1 import APsystemsEZ1M
import asyncio
# Initialize the inverter with the specified IP address and port number.
inverter = APsystemsEZ1M("192.168.178.168", 8050)
async def main():
try:
# Fetch output data from the inverter.
response = await inverter.get_output_data()
# Display power input from PV-Input 1 and 2.
print("Power PV-Input 1: " + str(response.p1) + " W")
print("Power PV-Input 2: " + str(response.p2) + " W")
# Display total energy generation for the current day.
print("Generation today " + str(round(response.e1 + response.e2, 3)) + " kWh")
except Exception as e:
# Handle any exceptions that occur during the data fetch and print the error.
print(f"An error occurred: {e}")
# Run the main coroutine.
# This is the entry point of the script and it runs the main function in an asynchronous manner.
asyncio.run(main())
The library includes several methods to interact with the microinverter. You can find all of them with comprehensive docs ion our GitHub Pages.
get_device_info()
: Retrieves detailed information about the device.get_alarm_info()
: Fetches the alarm status information for various components of the device.get_output_data()
: Retrieves the output data from the device.get_total_energy_today()
: Retrieves the total energy generated today by inverter inputs.get_total_energy_lifetime()
: Retrieves the total lifetime energy generated by inverter inputs.get_max_power()
: Retrieves the set maximum power setting of the device.set_max_power(power_limit)
: Sets the maximum power limit of the device.get_device_power_status()
: Retrieves the current power status of the device.set_device_power_status(power_status)
: Sets the power status of the device.You can find the latest API documentation of APsystems inside the following directory:
assets/apsystems-documentation/*
https://github.com/SonnenladenGmbH/APsystems-EZ1-API/blob/main/assets/apsystems-documentation/
This library is released under the MIT License.
FAQs
The APsystems EZ1 Python library offers a streamlined interface for interacting with the local API of APsystems EZ1 Microinverters.
We found that apsystems-ez1 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.