|
Post by frenchie on Nov 29, 2020 5:06:55 GMT -8
Hi,
After running the configuration and creating the JSON file, I get the following error on running SGS2.pyy. Any help most appreciated.
sudo python3 SGS2.py Traceback (most recent call last): File "SGS2.py", line 43, in <module> import pixelDriver File "/home/pi/SwitchDoc/SDL_Pi_SmartGardenSystem2/pixelDriver.py", line 28, in <module> LED_STRIP = ws.SK6812_STRIP_RGBW NameError: name 'ws' is not defined
Kind regards, Colin
|
|
|
Post by frenchie on Nov 30, 2020 4:50:08 GMT -8
Following on from more tests, and researching on the internet this is how I overcame this issue :
sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel sudo python3 -m pip install --force-reinstall adafruit-blinka
Then i replaced "from neopixel import *" with "from rpi_ws281x import *" in the pixelDriver.py on line 13.
i also had to comment out line 235 "/bin/bash: tx: command not found" in the same file not sure why this is here ?
Kind regards, Colin
|
|
|
Post by frenchie on Dec 1, 2020 5:03:56 GMT -8
Further tests, still not working ! So reinstalled everything (including Raspbian) it is a long and trying process Now, with no other changes the error is as follows: sudo python3 SGS2.py mmalipc: mmal_vc_init_fd: could not open vchiq service mmal: mmal_vc_component_create: failed to initialise mmal ipc for 'vc.camera_info' (7:EIO) mmal: mmal_component_create_core: could not create component 'vc.camera_info' (7) b'' b'' ############################################### SGS2 Version 021 - SwitchDoc Labs ############################################### Program Started at:2020-12-01 14:01:09 SGS.JSON File exists SGSConfiguration.JSON File does not exist ---------------------- Local Devices ---------------------- OLED: Not Present BMP280: Present DustSensor: Present ---------------------- Checking Wireless SGS Devices ---------------------- Garden - 13F9: Present subscribing to SGS/13F9 ---------------------- Plant / Sensor Counts ---------------------- Wireless Unit Count: 1 Sensor Count: 4 Valve Count: 8 ---------------------- Other Smart Garden System Expansions ---------------------- Weather: Not Present GardenCam: Not Present SunAirPlus: Not Present SolarMAX: Not Present Lightning Mode: Not Present MySQL Logging Mode: Not Present UseBlynk: Not Present ---------------------- done Traceback (most recent call last): File "SGS2.py", line 655, in <module> initializeScheduler() File "SGS2.py", line 459, in initializeScheduler state.scheduler.add_job(blinkLED, 'interval', seconds=5, args=[0,Color(0,0,255),1,0.250]) NameError: name 'Color' is not defined Any ideas ?
|
|
|
Post by frenchie on Dec 1, 2020 10:33:24 GMT -8
Update again. So removed adafruit_circuitpython_neopixe using sudo pip3 uninstall adafruit-circuitpython-neopixel and followed this for the NeoPixel drivers fromSDL. forum.switchdoc.com/thread/581/bad-link-pi-driversYahoooo :-) No more errors. Now time to play and see if the operating manual suggested configuration will work :-) Will try and do a full reinstall later in the week to see if my insctructions are complete
|
|
|
Post by SDL on Dec 2, 2020 8:40:34 GMT -8
Congratulations! I assume you were using your own SD Card installation? We don't have this problem on our image.
BP
|
|
|
Post by frenchie on Dec 3, 2020 8:58:30 GMT -8
Well I started out with yours. But the Raspberry PI 4 , for some reason required a firmware load, so I had to reformat the card.
Now all is working and I have listed the following software on Buster. If interested, I can list here all the apt-get install and pip3 install septs followed.
Now software is operational - I can think about boxing it up :- )
Cheers, Colin
|
|
|
Post by SDL on Dec 3, 2020 13:12:54 GMT -8
That would absolutely useful for everybody here.
Not sure why a firmware load would require a reformatting of the SDCard. I've done that several times on multiple Pi4B boards.
John
|
|
|
Post by frenchie on Dec 4, 2020 6:55:15 GMT -8
I just followed the instructions from Raspberry using the Raspberry Pi imager App -- it reformats the SD Card which simply allow the Pi4 to reload its boot sw. After sudo apt-get -y update && apt-get -u dist-upgrade Note I placed all the SDL software in a directory called SwitchDoc :-) - sudo apt-get clean - sudo apt-get autoremove - sudo apt-get install build-essential python3 python3-pip python3-dev python3-smbus git python3-apscheduler - sudo apt-get install pigpio python3-pigpio i2c-tools - sudo apt-get install mariadb-server - sudo apt-get install mosquitto mosquitto-clients - sudo apt-get install python-imaging-tk libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5sudo mysql_secure_installation - sudo apt-get install scons swig - sudo rasps-config to enable I2C - sudo i2cdetect -y 1 - sudo pip3 install --upgrade setuptools pip - sudo pip3 install setuptools --upgrade - sudo pip3 install i2cdevice - sudo pip3 install apscheduler adafruit-blinka picamera - sudo pip3 install mysqlclient paho-mqtt pillow - sudo pip3 install dash dash-bootstrap-components plotly remi pandas dash_daq - - mkdir SwitchDoc - cd SwitcDoc - git clone github.com/adafruit/Adafruit_Python_GPIO.git- cd Adafruit_Python_GPIO - sudo python3 setup.py install - cd ~/SwitchDoc - git clone github.com/switchdoclabs/SDL_Pi_8PixelStrip.git- cd SDL_Pi_8PixelStrip - scons - cd python - sudo python3 ./setup.py build - sudo python3 ./setup.py install - git clone github.com/switchdoclabs/SDL_Pi_SmartGardenSystem2- cd ~/SwitchDoc - cd SDL_Pi_SmartGardenSystem2 - sudo mysql -u root < SmartGardenSystem.sql - sudo python3 SGSConfigure.py - sudo python3 SSG2.py For this that are interested I then setup a systemd service and an rsyslog configuration file to send all messages to /var/log/smartgarden.log
|
|
|
Post by SDL on Dec 4, 2020 7:52:47 GMT -8
This is a great report! This should help people that are trying to build their own image.
Do you mind if I put this in the SGS2 README.md file for people?
BP
|
|
|
Post by frenchie on Dec 5, 2020 6:47:16 GMT -8
Please, of course you can reuse. Suggest the last two steps be changed to reflect you test and operational guide Also I think there is a type on the raspi-config line.
|
|
|
Post by Trish on Apr 21, 2022 4:54:13 GMT -8
Hi,
thank you very much frenchie for your report,it is so helpful!
I followed the instructions but had some issues with installing the following packages/modules:
python-imaging-tk liblcms1-dev ibtiff5sudo
The modules could not be found.
Later on I did have some issues with an imported module "colour" (in the skyCamera file) that was not found when I started the SG3 program file. I read that liblcms1-dev is a header for color management, so I traced the problem back to not being able to install this module.
I think I solved the problem with python-imaging-tk by installing it that way: sudo apt-get install python3-pil.imagetk
I did not install libtiff5sudo but libtiff5, which worked. I have to idea what this module does and if that is a problem.
I am relatively new to working with raspberry pi and I absolutely love the smart garden project. It would be great if I was able to get to run it on my own. It would be great to get some support.
Best regards, Patrizia
|
|