Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it #16

Open
munich-ml opened this issue Oct 22, 2023 · 2 comments
Open

How to use it #16

munich-ml opened this issue Oct 22, 2023 · 2 comments

Comments

@munich-ml
Copy link

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
Copy link
Owner

mtdcr commented Nov 5, 2023

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!

@bluepuma77
Copy link

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants