Skip to main content

Crate sma_proto

Crate sma_proto 

Source
Expand description

§sma-proto

A Rust crate that provides an implementation of the SMA Speedwire protocol for building custom applications that communicate with SMA energy-meters or inverters.

§Crate Features and Goals

  • High level client for easy integration into applications.
  • Implement energy-meter protocol.
  • Implement inverter data readout protocol.
  • Optional no_std support for embedded devices.
  • Verify messages during de-serialization.
  • Being efficient if possible.
  • Simple Wireshark dissector for debugging on network layer. (Lua script is located in the repository root.)

§Rust Feature Flags

  • std (default) — Remove this feature to make the library no_std compatible.
  • client — Enables a tokio based high level client.
  • heapless - Enables support for heapless vectors.

§Specification

  • Energymeter protocol: link
  • Inverter protocol: reverse-engineered

§License

sma-proto is licensed under the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

§Disclaimer

This project is not affiliated with SMA. All trademarks belong to their respective owners.

Modules§

client
High level tokio based SMA speedwire client.
energymeter
Module for handling the SMA speedwire energy meter sub protocol.
inverter
Module for handling the SMA speedwire inverter sub protocol.

Structs§

SmaEndpoint
Identifies a SMA speedwire communication endpoint.

Enums§

AnySmaMessageBase
Container that can hold any supported SMA speedwire message.
Error
Errors returned from SMA speedwire protocol processing.

Traits§

SmaContainer
Interface to a variable length storage container.
SmaSerde
Interface for (de)serialization of SMA speedwire messages.

Type Aliases§

AnySmaMessage
An AnySmaMessageBase using default storage based on selected features.
AnySmaMessageHeapless
An AnySmaMessageBase using heapless::Vec as storage.
AnySmaMessageStd
An AnySmaMessageBase using std Vec as storage.
Result
A specialized Result type for SMA speedwire operations.