Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Using Hass on Synology VMM & implications on serial port #456

Unanswered
IoTPlay asked this question in General
Discussion options

Hi, I install hassos on vmm on Synology. I want to connect to serial interface to enable modbus devices.

here is what I have done:

  1. the serial interface is setup on the VMM,
  2. I can test the serial interface by command in hass vmm terminal domes | grep tty which results in
    ch341-uart converter now attached to ttyUSB0
  3. I setup pyscript up correctly, some Services I have - does execute

Until I want to run a pyscript that uses import serial.

I have imported the serial interface by hand with:

apk add --update py-pip
pip install serial

But when I run an app in pyserial (properly configured - with it registed in config.yaml)

I get import serial ^ ModuleNotFoundError: import of serial not allowed

Any ideas?

You must be logged in to vote

Replies: 1 comment

Comment options

And here is the app in pyscript, named init.py with the import that causes it:

#!/usr/bin/env python3
# -*- coding:utf-8 -*-
@service # ("testpython.serialversion")
def testPythonSerial():
 import serial
 log.warning(serial.__version__)
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /