mtdcr/pysml

How to use it

Opened this issue · 2 comments

I have a landis gyr e220 power-meter that sends binary data over IR which I learned is SML protocol. I thought this project could do the decode but I can't see how to use it.
The example doesn't run because some module is missing:

(sml_env) C:\Users\munich-ml\Desktop\github\pysml\examples>python sml-mqtt-bridge.py
Traceback (most recent call last):
  File "sml-mqtt-bridge.py", line 35, in <module>
    from asyncio_mqtt import Client, MqttError, Will
ModuleNotFoundError: No module named 'asyncio_mqtt'

Can somebody give me a kickstart?

mtdcr commented

This project is mainly used as a library.

sml-mqtt-bridge is just an example application. To use it, you need to install this library: https://pypi.org/project/asyncio-mqtt/

You may be the first person to use it under windows, though. Good luck!

@mtdcr: There seems to be a change in dependencies:

We renamed asyncio-mqtt to aiomqtt and released a version 1.0.0 in the process. This is the last release under the asyncio-mqtt name. You can find the new repository at https://github.com/sbtinstruments/aiomqtt

I am also seeing this error, not sure if the API changed or if I have an issue with the installation of the requirements:

$ python sml-mqtt-bridge.py
Traceback (most recent call last):
  File "/home/user/ha/sml/sml-mqtt-bridge.py", line 36, in <module>
    from sml import SmlSequence, SmlGetListResponse
ImportError: cannot import name 'SmlSequence' from 'sml' (/home/user/.local/lib/python3.11/site-packages/sml/__init__.py)