FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
04-28-2021 02:38 PM
A customer try to compile the python example in the SDK V1.8. using Pi running Ubuntu 18.04 server, but got this warning while building:
screenshot1
He can install it in the CORE without a problem, but when running he encounter this:
screenshot2
Also tried running it manually, but this doesn’t have the right environment.
screenshot3
Any tipp or idea? Thanks!
Solved! Go to Solution.
04-28-2021 03:07 PM
Hi redford,
yes you are right, you cannot run the script manually without the right environment.
Just a small hint, your customer can check the user-permissions of the start script "register_node" before running snapcraft.
Regards
Johannes
04-29-2021 03:52 PM
Hi Johannes,
could you please be more specific where and what we should change in the start script? Any tips how we can run the script?
Thanks!
04-29-2021 06:23 PM - edited 04-29-2021 06:23 PM
Hi redford
you can see in the screenshot the "regeister_node" script. Open the folder ./datalayer.provider/wrapper, then you can check the permissions with "ls -alh".
It should be executable.
If it is possible you can provide the systemreport.
Regards
Johannes
05-11-2021 04:03 PM
Hello Johannes,
Manage to build the python snaps for the CORE! Thank you for the help!
Now we try to run a flask server. We managed to run it on the emulation without problems, but on the real CORE it is saying that the connection is already in use (0.0.0.0:5000).
I also tried different ports and I’m using 0.0.0.0 to be able to access it from the outside.
Do you have any idea how we could go around this?
Also, is there any way to not specify the connection provider?
This was possible with the C++ SDK, but I couldn’t accomplish it here…
Best regards
05-18-2021 11:50 PM
Hi Redford,
My Flask app(s) are working. Example i hope it may help you.
I have just proxy integration. It is simply a basic demo.
Mauro
06-04-2021 02:10 PM
06-06-2021 02:24 AM
Hi redford,
Neve tried to do it. I think that the deviceadmin snap should connect any plug autonomously but i am not a developer. paste here the .yaml(s) if you can, maybe i can give you an hint.
where have you seen the message on the screenshot? never seen it.
Mauro
06-07-2021 11:33 AM
the message can be seen in the logbook..
here is the snapcraft.yaml:
name: rexroth-python-provider
version: 1.0.0
summary: Testsnap for Python
# title: SDK-Python
description: 'It Provides simple data to ctrlX Data Layer
'
base: core18
confinement: strict
grade: devel
apps:
interpreter:
command: python3
plugs:
- network-bind
- network-observe
- serial-port
- removable-media
provider:
command: wrapper/register_node
plugs:
- network-bind
- network-status
- removable-media
daemon: simple
flask-server:
command: wrapper/runserver
plugs:
- network-control
- network-observe
- network
- network-bind
- process-control
- gsettings
- udisks2
- hardware-observe
- system-observe
- mount-observe
- removable-media
daemon: simple
parts:
interpreter:
plugin: python
python-version: python3
source: .
#python-packages:
#- jupyter
provider:
plugin: python
python-version: python3
source: .
python-packages: # requirements go here
- ./ctrlx-sdk/public/whl/ctrlx_datalayer-1.0.1-py3-none-any.whl
- ./ctrlx-sdk/public/whl/ctrlx_fbs-1.0.0-py3-none-any.whl
- flatbuffers~=1.12
- flask
- flask-socketio
- python-socketio
files:
plugin: dump
source: .
# describes which interface slots are supported by defining the plugs
plugs:
datalayer:
interface: content
content: datalayer
target: $SNAP_DATA/.datalayer
system-files:
interface: system-files
write:
- /dev/shm
06-11-2021 09:25 AM
Since there where conflicts with removable-media interface and another feature, we decided to allow the usage only for signed apps reviewed by us to ensure system integrity. In the upcoming release 1.10.x the interface removable-media will be available and can be used by unsigned apps.
06-16-2021 04:54 PM
HI jochen-scheib,
really cool!!