Unfortunately, in Domoticz I am running into problems right away. After installation of the plugin from the hardware tab, I get error messages. Are there limitation as to what libs you can import? Apart from the Domoticz and sys lib, I have added:
import aiohttp
import asyncio
import pysmartthings
These libs have been installed in Python3.7 from the CLI first.
The log says:
2021-09-20 12:05:56.549 Error: STEST1A: (SmartThings) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/smartthings/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2021-09-20 12:05:56.549 Error: STEST1A: (STEST1A) Module Import failed, exception: 'SyntaxError'
2021-09-20 12:05:56.549 Error: STEST1A: (STEST1A) Import detail: File: , Line: 49, offset: 8
2021-09-20 12:05:56.549 Error: STEST1A: (STEST1A) Error Line ' async with aiohttp.ClientSession() as session:
2021-09-20 12:05:56.549 Error: STEST1A: (STEST1A) No traceback available
Line 49 is in this section in which I try to fill an array with available devices of my SmartThings setup on start:
Code: Select all
def onStart(self):
Domoticz.Log("onStart called")
async with aiohttp.ClientSession() as session:
api = pysmartthings.SmartThings(session, tokenSmartThings)
devices = await api.devices()