Giter Club home page Giter Club logo

cortictechnology / cep Goto Github PK

View Code? Open in Web Editor NEW
165.0 9.0 21.0 225.41 MB

CEP is a software platform designed for users that want to learn or rapidly prototype using standard A.I. components.

License: MIT License

Shell 0.06% Python 13.29% CSS 3.78% Less 1.54% SCSS 1.56% JavaScript 77.54% HTML 2.02% GLSL 0.02% Dockerfile 0.20%
oak-d edge-computing artificial-intelligence iot raspberry-pi speech-recognition speech-generation natural-language-processing lego-mindstorms smarthome

cep's Introduction

cep-banner

CEP is a software platform designed for users that want to learn or rapidly prototype using standard A.I. components. It runs on the popular Raspberry Pi 4B and 400 single-board computer and has native support for the Luxonis OAK-D and OAK-D-Lite stereo cameras. It comprises two sub-components: CAIT (the Cortic A.I. Toolkit) and CURT (the Cortic Universal RunTime).

visual-programming

CAIT is a visual programming interface (based on Microsoft's MakeCode project) and a low-code Python API. Users with no prior programming experience can use the visual programming interface to create their own A.I. projects and deploy them to run on the OAK-D camera. More experienced users can use the low-code API to quickly create A.I. programs using Python.

CURT is a middleware system that enables users to distribute A.I. computations to different computing devices on the local network. CURT's decentralized mesh architecture automatically handles device failover and load balancing for the user. It also offers a simple command-based programming interface. Developers can implement complex workflows using easy-to-understand sequential commands while the system manages the scheduling of the underlying asynchronous tasks.

CURT allows the deployment of docker-based container modules. We currently include five built-in modules:

  1. Computer vision (deep learning vision models that run on either RPi or OAK-D)
  2. Voice (on device and cloud-based speech recognition and speech generation)
  3. NLP (customizable natural language processing tools)
  4. Control (LEGO motor control)
  5. Smart home (control smart home devices via HomeAssistant)

Each module can advertise a set of services on the network. In addition, each service can host a group of workers that perform various tasks. Please refer to our sample codes on configuring modules, services, and workers on supported devices. They also illustrate the use of the command-based programming interface.

Hardware Configuration

CEP currently supports the following hardware configuration.

  • Any of Raspberry Pi 4B 2GB/4Gb/8GB or 400 models
  • Micro SD card (we recommend at least 32GB)
  • OAK-D camera
  • USB Webcam
  • CSI Camera
  • ReSpeaker 4-Mic Array for Raspberry Pi
  • Mini speaker with 3.5mm audio jack
  • Any Raspberry Pi compatible battery HAT
  • LEGO Mindstorms Robot Inventor Kit
  • Lights and speakers supported by HomeAssistant

Installation

Before you start, make sure there is at least 32GB of free space on your SD card. Then, open a terminal in RaspberryPi OS and type the following commands.

$ git clone https://github.com/cortictechnology/cep
$ cd cep
$ bash setup.sh

The Raspberry Pi device will reboot at the end of the setup script.

Installing the ReSpeaker Driver

An additional installation step is required to support the ReSpeaker 4-Mic array. Enter the following commands into the terminal.

$ git clone https://github.com/respeaker/seeed-voicecard
$ cd seeed-voicecard
$ sudo ./install.sh
$ sudo reboot

Your device will reboot again after installing the Re-Speaker device driver.

The ReSpeaker installation script above will update your Raspberry Pi OS to the latest version. However, this update sometimes brings in a kernel update as well. In this case, the installation script will NOT install the driver and output the following warning message:

Not matching the updated version <version number>
Kernel was updated, but new kernel was not loaded yet
Please reboot your machine AND THEN run this script again

If you see this message, you’ll need to run the installation script again after your system reboots to ensure the driver is properly installed.

Visual Programming

  1. Make sure your Raspberry Pi device is connected to the Local Area Network (LAN).
  2. On a computer connected to the same LAN, go to http://<raspberry_pi_hostname>.local/setup on your browser and follow the instruction to complete the setup process. The Raspberry Pi device will reboot itself.
  3. After the setup process completes, you can access the visual programming interface at http://<raspberry_pi_hostname>.local/programming.
  4. You can use the link at the bottom of the login page to create a new local account.

You can click on the Load icon to open any sample project with the .cait extension in the examples folder.

Python Programming

We recommend using the VSCode editor for Python development. You can enter the following commands on the command line to install it.

sudo apt update 
sudo apt install code -y

Please refer to the Python sample codes included in the examples folder to get started using CAIT's low-code API and CURT's command-based API.

How to contribute

We welcome contributions from all our users. You can contribute by requesting features or reporting bugs under "Issues." You can also submit proposed code updates through pull requests to our "dev" branch.

Follow us on social media

If you are interested in upcoming features and applications of CEP, please follow us on Twitter or LinkedIn.

cep's People

Contributors

michaelhwn avatar ryan315 avatar yelu728 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cep's Issues

OAK-D Lite

Hi

I am trying to setup CAIT on my raspberry pi model 4 8 GB with 64 bit OS.

Ran the setup.sh to install pre-requisites.

Now when i am trying to run the setup; the page is unable to detect OAK-D camera. I have installed DepthAI pre-requisites and ran Age & Gender demo and its running successfully.

Below is the setup page with Devtools;
2022-03-11-150009_1360x768_scrot

here's the OAK-D camera which is functioning well;

2022-03-11-150251_1360x768_scrot

below is the lsusb command result;

2022-03-11-150428_1360x768_scrot

how do i complete the setup?

thanks
rex

Install help please

Hello

I followed the instructions to install cep, from your github page, followed by the Respeak driver (although I am not using the mic). Everything seemed to install without issue the pi rebooted but when I try to go to http://raspberrypi.local/setup it says this site can’t be reached.

My setup is as follows:
Raspberry Pi 4 4gb model
64Gb sd card
fresh install 32 bit bullseye (this is the first thing I am doing on this fresh OS)
Offical raspberry pi dsi screen
Oak-d lite

As there are no error messages or faults I have nothing to use to troubleshoot the issue.

Any help would be gratefully received.

Thanks, also posted on the cortic technologies web forum but no responses as yet so thought I would try here too.

Support for LEGO EV3 31313

@michaelhwn Can this be modified to support Mindstorms EV3 too? I guess CAIT is supported for EV3. How should I go about to integrate it with EV3 31313? I'm trying to use it with an OAK-D camera and a custom object detection model.

Thank you so much for your help! Hoping to hear back from you soon.

Building and extending docker modules

Are you able to provide guidance on how I should approach extending docker module functionality?

I want to add some additional custom blocks to CAIT for vision processing. My understanding is that I should implement this functionality in vision module. I'm a little out of my depth with Docker but I'm guessing that I need to build a local docker image using the dockerfile and then look into extending the code under /src/curt/modules/vision.

I tried to build the docker image for vision but I ran into a couple of issues:

  1. There were dependencies to packages libqtgui4, libqtwebkit4 and libqt4-test which could not be found. They were possibly deprecated. I commented those out to see if I can get it to work without those.
  2. Building the vision image failed with the following message:
ERROR: Failed building wheel for depthai
ERROR: Could not build wheels for depthai which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
The command '/bin/sh -c pip3 install --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/ depthai' returned a non-zero code: 1

Can't login in the Home Assistant Docker

Hello,

I find out that you install a docker with Hassio but I can't login.

I already have an Home Assistant server @home so I will unjoy your solution if I manage to integrate it.

Failed connecting to robot inventor

I'm having issues running any logic that depends on LEGO Hub connection. I'm running this on Raspberry Pi 4B. I setup Bluetooth connection with the hub following another tutorial. I had issues initially but after I followed the tutorial it seems to connect now if I select the option to connect it to serial port. The blue light comes on and the hub is shown as connected in the Bluetooth status area on the Pi.

On the coding canvas I can see the MAC address of the Hub is picked up so there is some kind of connection.
When I attempt to run a script I get the following error:
"Initialization of control failed. Failed connecting to robot inventor, try restarting the robot inventor hub and run initialize again."

I tried rebooting both the Pi and the hub.

Any hints on how to troubleshoot this or how to establish a successful connection?

The tutorial I followed for setting up Bluetooth connection is here: https://medium.com/jj-innovative-results/how-to-set-up-bluetooth-on-the-raspberry-pi-for-a-lego-spike-61b137f98673

OKD-Vision

Hello,

First of all many thanks to you for replying all the previous quires. I am successfully able to connect with your programming interface and I really like it. However,m when I am trying to connect with OKD-camera and I not able to connect it successfully. I am trying to initial the vision with but it seems like option is not loading properly.

20220316_005921

Can you please help me in this regard?

Many thanks to you!

cant get raspberrypi.local/setup to work

I've followed the instructions line by line. I've also installed fresh RaspberryPi sketch onto the SD card two times.
I get as far as visiting raspberrypi.local/setup

Then I get the error:
This site can’t be reachedCheck if there is a typo in raspberrypi.local.
DNS_PROBE_FINISHED_NXDOMAIN

This happens on both the pi itself and when trying to access on any other machine on the network.
I'm using DECO mesh WI-FI (not sure if this is impacting it). I've tried ethernet cable direct to router, with no difference.

Appreciate help getting this sorted.

Hardcoded secret key

Hello,

We are a cybersecurity research group from the CISPA Helmholtz Center for Information Security and Ca’ Foscari University of Venice. We recently conducted an analysis of the session management used in your web application as part of our research. We have discovered a security vulnerability that we believe requires your attention.

Vulnerability Description:

After our analysis, we have identified that your application is using a hard-coded secret key that is leaked through GitHub. If operators who install your web application do not change this secret key, they are vulnerable to cookie forgeries. The cookie forgery attack allows an attacker, knowing the key used to sign a cookie, to forge new arbitrary cookies to impersonate and take over other accounts.

link to the relevant code part

Recommendation for Mitigation:

To address this vulnerability and enhance the security posture of your web application, we highly recommend setting the secret key from an environment variable. If the environment file is not shared on GitHub then this would force operators of your application to create their own key upon installation, forcing them to set their own secure secret key.

We hope this notification helps improve your security. Can you take a look into the relevant code parts and comment on the issue?

install problem-rustup version

When installing:
Building wheel for crypt (PEP 517) ...
error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmpxoa6ytoh_in_process.py build_wheel /tmp/tmpnxiyvpfg
cwd:/tmp/pip-install-mw_pcpjn/bcrypt_4486499d7596497aaddf587cd8a22dc6
Complete output (58 lines):
running bdist_wheel
running build
running build py
creating build
creating build/lib. linux-armv7l-cpython-39
creating build/lib. linux-armv7l-cpython-39/bcrypt
copying src/berypt/
-• UY
3 build/Lib. linux-army?1-epython-39/berypt
copying src/berypt/.
init_
-> build/lib. linux-armv7l-cpython-39/bcrypt
running egg_info
writing src/bcrypt.egg-info/PKG-INFO
writing dependency.
writing top-level names to src/bcrypt.egg-info/top_level.txt
reading manifest file 'src/bcrypt.egg-info/SOURCES.txt°
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'requirements.txt'
warning: no previously-included files found matching
'release. py
warning: no previously-included files found matching
'mypy.ini
warning: no previously-included files matching
found under directory
warning: no previously-included files matching
•* found under directory
"src/_bcrypt/target®
•github•
writing manifest file
"src/bcrypt.egg-info/SOURCES.txt
copying
src/bcrypt/_bcrypt.pyi

build/lib. linux-armv7l-cpython-39/bcrypt
copying src/crypt/py.typed -> build/lib.linux-armv7l-cpython-39/bcrypt
running build_ext
running build_rust
===DEbUG ASSISIANCE==
If you are seeing a compilation error please try the following steps to
successfully install bcrypt:

  1. Upgrade to the latest pip and try again. This will fix errors for most
    users.
    See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
  2. Ensure you have a recent Rust toolchain installed. crypt requires
    rustc >= 1.56.0
    Python: 3.9.2
    platform: Linux-5.15.76-v71+-armv7l-with-glibc2.31
    pip: n/a
    setuptools:65.6.3
    setuptools_rust:
    -5-2
    rustcena
    ==DEBUG ASSISTANCE:
    error: can't find Rust compiler
    If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
    To update pip, run:
    pip install - -upgrade pip
    and then retry package installation.
    If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://ru.
    This package requires Rust >=1.56.0.
    ERROR: Failed building wheel for bcrypt
    Falled to. hullo PeTYP& whooLs for berypt which Use PEP 517 and cannot be installed directly

Therefore, I fresh a new system. I used Pip install --upgrade pip to the newest version. I used curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh to the newest version of rustup. Then I installed the cep, however the error still appears.

My setup is as follows:
Raspberry Pi 4 8gb model
256Gb sd card
fresh install 32 bit bullseye (this is the first thing I am doing on this fresh OS)
Offical raspberry pi dsi screen
Oak-d lite

Thank you very much.

CAIT Setup page looping

The setup page of CAIT remains in an infinite loop on message "Retreiving device information ..."

image

image

The only AJAX Request in error is the /getwifi page.

There is the following message in syslog

Feb  9 20:28:16 raspberrypi bash[467]: ERROR:flask.app:Exception on /getwifi [GET]
Feb  9 20:28:16 raspberrypi bash[467]: Traceback (most recent call last):
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/local/lib/python3.7/dist-packages/wifi/scan.py", line 39, in all
Feb  9 20:28:16 raspberrypi bash[467]:     stderr=subprocess.STDOUT)
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
Feb  9 20:28:16 raspberrypi bash[467]:     **kwargs).stdout
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/lib/python3.7/subprocess.py", line 487, in run
Feb  9 20:28:16 raspberrypi bash[467]:     output=stdout, stderr=stderr)
Feb  9 20:28:16 raspberrypi bash[467]: subprocess.CalledProcessError: Command '['/sbin/iwlist', 'wlan0', 'scan']' returned non-zero exit status 255.
Feb  9 20:28:16 raspberrypi bash[467]: During handling of the above exception, another exception occurred:
Feb  9 20:28:16 raspberrypi bash[467]: Traceback (most recent call last):
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 2292, in wsgi_app
Feb  9 20:28:16 raspberrypi bash[467]:     response = self.full_dispatch_request()
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1815, in full_dispatch_request
Feb  9 20:28:16 raspberrypi bash[467]:     rv = self.handle_user_exception(e)
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/local/lib/python3.7/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
Feb  9 20:28:16 raspberrypi bash[467]:     return cors_after_request(app.make_response(f(*args, **kwargs)))
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1718, in handle_user_exception
Feb  9 20:28:16 raspberrypi bash[467]:     reraise(exc_type, exc_value, tb)
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/lib/python3/dist-packages/flask/_compat.py", line 35, in reraise
Feb  9 20:28:16 raspberrypi bash[467]:     raise value
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1813, in full_dispatch_request
Feb  9 20:28:16 raspberrypi bash[467]:     rv = self.dispatch_request()
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1799, in dispatch_request
Feb  9 20:28:16 raspberrypi bash[467]:     return self.view_functions[rule.endpoint](**req.view_args)
Feb  9 20:28:16 raspberrypi bash[467]:   File "/home/pi/ia/cep/src/cait/cortic_webapp/main.py", line 180, in getwifi
Feb  9 20:28:16 raspberrypi bash[467]:     cells = list(Cell.all("wlan0"))
Feb  9 20:28:16 raspberrypi bash[467]:   File "/usr/local/lib/python3.7/dist-packages/wifi/scan.py", line 41, in all
Feb  9 20:28:16 raspberrypi bash[467]:     raise InterfaceError(e.output.strip())
Feb  9 20:28:16 raspberrypi bash[467]: wifi.exceptions.InterfaceError: b"wlan0     Interface doesn't support scanning : Device or resource busy"

When I run the command : iwlist wlan0 scan

There is no error :

wlan0     Scan completed :
          Cell 01 - Address: XX:XX:XX:XX:XX
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=70/70  Signal level=-31 dBm
                    Encryption key:on
                    ESSID:"XZ"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                    ....

Load Icon for loading examples

Hi,

First of all thank you so much for the great work. We are trying to load the examples but unable to do so. These are the following steps we are following:

  1. Click on Load button
  2. A window is open
  3. We are getting error "Connect rest error and on networks files API is throwing error

From the images you can see that the API is getting fail.
WhatsApp Image 2022-03-15 at 11 31 51 AM
WhatsApp Image 2022-03-15 at 11 31 51 AM (1)

Error while deleting directory tuned_blazeface_lib

There is an error in syslog file :

Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m Associating oakd pipeline to: oakd_hand_asl
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m Traceback (most recent call last):
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/modules/vision/main.py", line 17, in <module>
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     vision_main = VisionMain()
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/modules/vision/main.py", line 13, in __init__
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     super().__init__(VisionModule(), port=9436)
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/modules/vision_module.py", line 14, in __init__
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     super().__init__("vision")
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/base_module.py", line 49, in __init__
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     self.create_factory()
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/modules/vision_module.py", line 18, in create_factory
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     self.worker_factory = VisionFactory()
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/modules/vision/vision_factory.py", line 12, in __init__
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     super().__init__("vision")
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/base_factory.py", line 23, in __init__
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     self.load_configuration_file()
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/base_factory.py", line 54, in load_configuration_file
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     mod_class = getattr(mod, module_config[module])()
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/modules/vision/face_detection.py", line 23, in __init__
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     super().__init__("cpu",
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m   File "/data/curt/modules/vision/tvm_processing.py", line 60, in __init__
Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m     os.rmdir(os.path.dirname(os.path.realpath(__file__))

Feb  9 20:22:16 raspberrypi bash[475]: #033[35;1mcurt_vision_1         |#033[0m OSError: [Errno 39] Directory not empty: '/data/curt/modules/vision/../../../models/modules/vision/platforms/rpi32/tuned_blazeface_lib'



The code tries to delete an non empty dir. The fix consists in using shutil.rmtree (see attached patch)

patch-rmdir.txt

Not able to access setup site

I am using VMWare Workstation since I dont have a Pi 4 and they are very hard to come by right now. I am running latest Pi OS; was able to download the CEP packages with success and Desktop rebooted.

I am able to SSH into the Pi so I believe that confirms we are on the same LAN and able to access the Pi. However, every time I run:

http://<raspberry_pi_hostname>.local/setup

I get an error "Connection was Reset". Tried on Chrome and Edge browsers. Any idea why I cant access the setup site, do I need to run any commands on the Pi desktop to trigger it to act like server?

Thanks!

Can't login

Hello,
First of all I would like to thank you for this excellent work. In fact, I am trying to connect to http://raspberrypi.local/programming. I enter the username pi and the password and it shows me The username does not exist! Thanks in advance.

Package libqtgui4 is not available

Package libqtgui4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libqtgui4' has no installation candidate
E: Unable to locate package libqtwebkit4
E: Unable to locate package libqt4-test

For information :
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Localhost is not working

Hello,
We are using Raspberry Pi 4B and want to use the software "CAIT".

We are following Readme file instructions and while completing the step we have faced an issue. The steps are below:

Visual Programming

  1. Make sure your Raspberry Pi device is connected to the Local Area Network (LAN).
  2. On a computer connected to the same LAN, go to http://<raspberry_pi_hostname>.local/setup on your browser and follow the instruction to complete the setup process. The Raspberry Pi device will reboot itself.
    ONCE THIS STEP WAS COMPLETED OUR PI DEVICE RESTARTED AND THEN WE TRIED TO FOLLOW THIRD STEP BUT WE ARE NOW UNABLE TO ACCESS OUR LOCAL HOST.

Can you please help us in resolving this issue?

Kind regards

RPi CSI Camera Configuration Issue

First of all thank you for the great work you did implementing the CEP solution. After some tinkering I got it to work with an RPi /w CSI camera and a Lego Inventor Robot Kit. Your solution really is as much fun as it is educative and the interface is simply great.

However, after some tinkering I always arrive at a dead-end when initialization of the CSI camera will fail in during the setup of my program with the message "Initialization of vision failed. No CSI-Camera is detected, or connected device is not supported". At this point the camera preview on the setup screen also stops working. Camera and RPi are in a fixed setup, so there should not be any physical connection instabilities and work perfectly fine after the initial installation of CEP.

Rebooting the system or powering it off does not help. Once the issue happens I cannot recover the connection to the camera. I do believe the problem starts as soon as the setup phase of the program does fail once for any reason (e.g. the Lego Hub not being connected), but I am not certain.

Is there any solution to this problem or a feasible workaround? Can the camera setup be reset somehow?

I did check the camera connection using the Raspberry OS CommandLine-Tools and still-image as well as video work just fine. I did install the solution on the latest Raspberry OS Buster as CSI Camera Legacy mode in the most recent version caused issues.

Best regards,
Tobias

ErrorMessage
s

Initialise camera throwing 500 internal server error

Hello,

I am trying to complete the setup by retrieving the device information.

Actual Result:
On front end the screen is showing the loading sign.

On Backend:

oot : PWD=/home/pi/Desktop/Cortic/cep/src/cait/cortic_webapp ; USER=root ; COMMAND=/usr/sbin/iwgetid
Mar 16 12:18:01 raspberrypi sudo[26701]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Mar 16 12:18:01 raspberrypi sudo[26701]: pam_unix(sudo:session): session closed for user root
Mar 16 12:18:01 raspberrypi bash[383]: ERROR:main:Exception on /getwifi [GET]
Mar 16 12:18:01 raspberrypi bash[383]: Traceback (most recent call last):
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/local/lib/python3.9/dist-packages/wifi/scan.py", line 38, in all
Mar 16 12:18:01 raspberrypi bash[383]: iwlist_scan = subprocess.check_output(['/sbin/iwlist', interface, 'scan'],
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
Mar 16 12:18:01 raspberrypi bash[383]: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/lib/python3.9/subprocess.py", line 528, in run
Mar 16 12:18:01 raspberrypi bash[383]: raise CalledProcessError(retcode, process.args,
Mar 16 12:18:01 raspberrypi bash[383]: subprocess.CalledProcessError: Command '['/sbin/iwlist', 'wlan0', 'scan']' returned non-zero exit status 255.
Mar 16 12:18:01 raspberrypi bash[383]: During handling of the above exception, another exception occurred:
Mar 16 12:18:01 raspberrypi bash[383]: Traceback (most recent call last):
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/lib/python3/dist-packages/flask/app.py", line 2447, in wsgi_app
Mar 16 12:18:01 raspberrypi bash[383]: response = self.full_dispatch_request()
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1952, in full_dispatch_request
Mar 16 12:18:01 raspberrypi bash[383]: rv = self.handle_user_exception(e)
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/local/lib/python3.9/dist-packages/flask_cors/extension.py", line 165, in wrapped_function
Mar 16 12:18:01 raspberrypi bash[383]: return cors_after_request(app.make_response(f(*args, **kwargs)))
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1821, in handle_user_exception
Mar 16 12:18:01 raspberrypi bash[383]: reraise(exc_type, exc_value, tb)
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
Mar 16 12:18:01 raspberrypi bash[383]: raise value
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1950, in full_dispatch_request
Mar 16 12:18:01 raspberrypi bash[383]: rv = self.dispatch_request()
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/lib/python3/dist-packages/flask/app.py", line 1936, in dispatch_request
Mar 16 12:18:01 raspberrypi bash[383]: return self.view_functionsrule.endpoint
Mar 16 12:18:01 raspberrypi bash[383]: File "/home/pi/Desktop/Cortic/cep/src/cait/cortic_webapp/main.py", line 180, in getwifi
Mar 16 12:18:01 raspberrypi bash[383]: cells = list(Cell.all("wlan0"))
Mar 16 12:18:01 raspberrypi bash[383]: File "/usr/local/lib/python3.9/dist-packages/wifi/scan.py", line 41, in all
Mar 16 12:18:01 raspberrypi bash[383]: raise InterfaceError(e.output.strip())
Mar 16 12:18:01 raspberrypi bash[383]: wifi.exceptions.InterfaceError: b"wlan0 Interface doesn't support scanning : Device or resource busy"
Mar 16 12:18:01 raspberrypi bash[383]: 172.19.96.157 - - [16/Mar/2022 12:18:01] "GET /getwifi HTTP/1.1" 500 -
Mar 16 12:18:01 raspberrypi bash[383]: INFO:werkzeug:172.19.96.157 - - [16/Mar/2022 12:18:01] "GET /getwifi HTTP/1.1" 500 -
Mar 16 12:18:01 raspberrypi bash[383]: 172.19.96.157 - - [16/Mar/2022 12:18:01] "GET /isconnected HTTP/1.1" 200 -
Mar 16 12:18:01 raspberrypi bash[383]: INFO:werkzeug:172.19.96.157 - - [16/Mar/2022 12:18:01] "GET /isconnected HTTP/1.1" 200 -
Mar 16 12:18:02 raspberrypi sudo[26710]: root : PWD=/home/pi/Desktop/Cortic/cep/src/cait/cortic_webapp ; USER=root ; COMMAND=/usr/sbin/iwgetid
Mar 16 12:18:02 raspberrypi sudo[26710]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Mar 16 12:18:02 raspberrypi sudo[26710]: pam_unix(sudo:session): session closed for user root

Environment informaiton:
Raspberrypi 4B
OS: 32 bit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.