Closed Gwigga closed 5 months ago
Could you try to debug: https://theyosh.github.io/TerrariumPI/faq/how-to-debug-terrariumpi/ and send the outcome of the startup?
Traceback (most recent call last):
File "/home/robin/TerrariumPI/terrariumPI.py", line 16, in
Ok, I think the following command should fix it: sudo chown pi.pi /dev/shm/terrariumpi.*
After that it should run. You can try it in debug first, and when it continues, just pres Ctrl+C
to stop it and start the service normal again.
sudo chown pi.pi /dev/shm/terrariumpi.* chown: invalid user: ‘pi.pi’
sudo chown pi /dev/shm/terrariumpi.*
does work? If so, that should be enough also
Traceback (most recent call last):
File "/home/robin/TerrariumPI/terrariumPI.py", line 16, in
sudo chown pi /home/robin/TerrariumPI/log/terrariumpi.debug.log
I guess you have run it as root somehow...
Traceback (most recent call last):
File "/home/robin/TerrariumPI/terrariumPI.py", line 19, in
You are running with a custom user robin
. This is not well tested, and explains the issues.
It is much easier now to start over and just use the user pi
. Else we are busy the hole evening solving issues...
sure no problem, will start from scratch
yeah started all over again with pi as the user (venv) pi@raspberrypi:~/TerrariumPI $ python terrariumPI.py Traceback (most recent call last): File "/home/pi/TerrariumPI/venv/lib/python3.9/site-packages/yoyo/backends/base.py", line 338, in _insert_lock_row self.execute( File "/home/pi/TerrariumPI/venv/lib/python3.9/site-packages/yoyo/backends/base.py", line 388, in execute cursor.execute(sql, params) sqlite3.OperationalError: attempt to write a readonly database
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/TerrariumPI/terrariumPI.py", line 19, in
Exception ignored in: <module 'threading' from '/usr/lib/python3.9/threading.py'> Traceback (most recent call last): File "/home/pi/TerrariumPI/venv/lib/python3.9/site-packages/gevent/monkey.py", line 911, in _shutdown orig_shutdown() File "/usr/lib/python3.9/threading.py", line 1428, in _shutdown lock.acquire() File "/home/pi/TerrariumPI/venv/lib/python3.9/site-packages/gevent/thread.py", line 121, in acquire acquired = BoundedSemaphore.acquire(self, blocking, timeout) File "src/gevent/_semaphore.py", line 180, in gevent._gevent_c_semaphore.Semaphore.acquire File "src/gevent/_semaphore.py", line 249, in gevent._gevent_c_semaphore.Semaphore.acquire File "src/gevent/_abstract_linkable.py", line 521, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait File "src/gevent/_abstract_linkable.py", line 487, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core File "src/gevent/_abstract_linkable.py", line 490, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core File "src/gevent/_abstract_linkable.py", line 442, in gevent._gevent_c_abstract_linkable.AbstractLinkable._AbstractLinkable__wait_to_be_notified File "src/gevent/_abstract_linkable.py", line 451, in gevent._gevent_c_abstract_linkable.AbstractLinkable._switch_to_hub File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch KeyboardInterrupt:
again, somehow the database rights are incorrect...
sudo rm /home/pi/TerrariumPI/data/terrariumpi.*
sudo chown pi /home/pi/TerrariumPI/data/
and try again....
(venv) pi@raspberrypi:~/TerrariumPI $ python terrariumPI.py
Traceback (most recent call last):
File "/home/pi/TerrariumPI/terrariumPI.py", line 16, in
sudo chown pi /dev/shm/terrariumpi.*
venv) pi@raspberrypi:~/TerrariumPI $ python terrariumPI.py 2024-01-22 20:32:23,188 - INFO - terrariumEngine - Starting up TerrariumPI 4.8.2 on a Raspberry Pi Zero 2 W Rev 1.0 ... 2024-01-22 20:32:23,270 - INFO - terrariumEngine - Loaded 30 settings in 0.08 seconds. fatal: detected dubious ownership in repository at '/home/pi/TerrariumPI' To add an exception for this directory, call:
git config --global --add safe.directory /home/pi/TerrariumPI
Traceback (most recent call last):
File "/home/pi/TerrariumPI/terrariumPI.py", line 19, in
looks like im going....
(venv) pi@raspberrypi:~/TerrariumPI $ python terrariumPI.py
2024-01-22 20:33:43,355 - INFO - terrariumEngine - Starting up TerrariumPI 4.8.2 on a Raspberry Pi Zero 2 W Rev 1.0 ...
2024-01-22 20:33:43,437 - INFO - terrariumEngine - Loaded 30 settings in 0.08 seconds.
2024-01-22 20:33:44,974 - INFO - terrariumEngine - Loading existing sensors from database.
2024-01-22 20:33:44,987 - INFO - terrariumEngine - Scanning for new sensors ...
2024-01-22 20:33:54,217 - INFO - terrariumEngine - Loaded 0 sensors in 9.24 seconds.
2024-01-22 20:33:54,219 - INFO - terrariumEngine - Loading existing relays from database.
2024-01-22 20:33:54,239 - INFO - terrariumEngine - Scanning for new relays ...
No GEMBIRD SiS-PM found. Check USB connections, please!
2024-01-22 20:33:55,600 - INFO - hardware.relay.energenie_relay - No Energenie USB relays connected.
2024-01-22 20:34:11,319 - INFO - terrariumEngine - Loaded 0 relays in 17.10 seconds.
2024-01-22 20:34:11,321 - INFO - terrariumEngine - Loading existing buttons from database.
2024-01-22 20:34:11,344 - INFO - terrariumEngine - Loaded 0 buttons in 0.02 seconds.
2024-01-22 20:34:11,345 - INFO - terrariumEngine - Loading existing webcams from database.
2024-01-22 20:34:11,365 - INFO - terrariumEngine - Loaded 0 webcams in 0.02 seconds.
2024-01-22 20:34:11,366 - INFO - terrariumEngine - Loading existing enclosures from database.
2024-01-22 20:34:11,377 - INFO - terrariumEngine - Loaded 0 enclosures in 0.01 seconds.
Traceback (most recent call last):
File "/home/pi/TerrariumPI/terrariumPI.py", line 19, in
Have you followed: https://theyosh.github.io/TerrariumPI/install/ ? I get the feeling you have not installed the Raspberry Lite LEGACY OS version. I needs to a LITE image at least, and the LEGACY is known to work.
You have a newer image, as you have Python 3.9, where I work with 3.7 version.
Again, it looks like the rights are not correct. Again.
git config --global --add safe.directory /home/pi/TerrariumPI
This should not happen when everything is installed as user Pi. Somehow, you have again mixed up the rights... please pay attention to the installation steps... https://theyosh.github.io/TerrariumPI/install/#manual
2023-12-05-raspios-bullseye-armhf-lite.img is the image I have used and followed the instructions, literally copying and pasting the commands in :( im not completely inept
Hmm, seems like the legacy image is upgraded....
That means I have to recheck the installer... because I have not seen those problems with a new installation. But that takes more time, and hope some more information in a few days.
Sorry... did not expect this strange issues...
I can try an earlier version, whihc of the below do you think would work
I guess this one should work:
Update: this is the correct image: https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-05-03/
The 2023-05-03 folder
I will try this one tonight and confirm what happens
I guess this one should work:
Update: this is the correct image: https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-05-03/
The 2023-05-03 folder
This one wouldn't even install git
and the 2023-10-10 folder just gives the same as the latest
Just an update, I have tried this on a zerow2 and a B+ all with the same out come, either git install doesn't work as it can't get the repos for the old versions, or if i do get TerrariumPI installed i get the same issues as before
Hmm, apparently there was a startup issue. So that has been fixed.
I tested with this image: https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-05-03/2023-05-03-raspios-buster-armhf-lite.img.xz You can chose an image from disk with RPI imager tool https://www.raspberrypi.com/software/
Also I have changed the manual installation documentation at bit https://theyosh.github.io/TerrariumPI/install/#manual It involves how to install the git command.
I have tested with a custom username, so user pi
is not needed.
And it is working. Only bluetooth scanning is somehow not working right now. But that could be a hardware issue with my Pi.
So download the old lite image, and follow the manual installation. It works over here now. For now this is on a RPi3
Installation works also on the bullseye (current legacy image) on a Raspberry Pi 3.
Clearly i am inept as, its just giving me the same issue :( Copied and pasted all of the commands from the install page (updated ones)
venv) pi@raspberrypi:~/TerrariumPI $ python terrariumPI.py
Traceback (most recent call last):
File "terrariumPI.py", line 16, in
Re ran all of the other things you mentioned earlier in the thread and just get the same results, will try again tomorrow
I guess still you have run the git clone ...
command as root user. That makes everything owning by root. And that give errors by running as normal user. So the installation has to be done over.
Remove the existing TerrariumPI folder. rm -Rf /home/pi/TerrariumPI
Now make sure that you are the user pi
and not root when running the command git clone --branch main --depth 1 https://github.com/theyosh/TerrariumPI.git
And follow the installation as documented. If you still get the above error, just retry ones with a clean image.
I have done this now twice, and it works. Else I am sorry for now, but I can't fix things I cannot reproduce. Also, this testing costs about an hour for each image. Which is a lot of time...
Also, Pi Zero is at own risk. I do not actively support those. As for a Zero everything has to run as root. So that makes is rather complicated...
Ok no problem
Sent from Outlook for iOShttps://aka.ms/o0ukef
From: TheYOSH @.> Sent: Wednesday, January 24, 2024 9:55:07 PM To: theyosh/TerrariumPI @.> Cc: Gwigga @.>; Author @.> Subject: Re: [theyosh/TerrariumPI] Refused Connection (Issue #884)
Also, Pi Zero is at own risk. I do not actively support those.
— Reply to this email directly, view it on GitHubhttps://github.com/theyosh/TerrariumPI/issues/884#issuecomment-1908978598, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFPKP6HUCOB6DZH6ZMXOVOLYQF7LXAVCNFSM6AAAAABCFVUIRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYHE3TQNJZHA. You are receiving this because you authored the thread.Message ID: @.***>
Also, Pi Zero is at own risk. I do not actively support those.
which ones do you support?
Also, Pi Zero is at own risk. I do not actively support those.
which ones do you support?
Re did it all as root
Just can't login now :D using admin/password lol
Ok, for a Pi Zero that is correct.. so do not change it!! :)
Could you run 1 command for me at the console and paste the outcome here:
cat /proc/cpuinfo
I use that information for detecting a Pi Zero. And I guess yours is a bit different. With that info, I can fix the installer for a Pi Zero2 I hope
Just can't login now :D using admin/password lol
I guess some encryption issue... but if you can first past the output of /proc/cpuinfo I can adjust the installer
processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 1 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 2 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
processor : 3 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 38.40 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4
Hardware : BCM2835 Revision : 902120 Serial : 00000000488b94f9 Model : Raspberry Pi Zero 2 W Rev 1.0
I also don't think it runs unless i logically run TerrariumPI.py as soon as i close the terminal i lost the dashboard
Ok, the installer did correctly detect your Pi Zero. So that is ok
If you run it in debug, you cannot close the terminal. But it should run as a service... but again, I know the Zero has issues. And therefore with a Pi Zero you should have some technical knowledge.
Also search in the closed issues for clues. https://github.com/theyosh/TerrariumPI/issues/823#issuecomment-1693236850
But from my side, without any clear errors, I cannot do any thing.
So I don't think the service is actually starting when the i reboots,
I cannot run TerrariumPI.py unless i am within venv
pi@raspberrypi:~/TerrariumPI $ python terrariumPI.py Traceback (most recent call last): File "terrariumPI.py", line 4, in <module> from gevent import monkey ImportError: No module named gevent
(venv) root@raspberrypi:/home/pi/TerrariumPI# python terrariumPI.py 2024-01-24 22:38:36,703 - INFO - terrariumEngine - Starting up TerrariumPI 4.8.2 on a Raspberry Pi Zero 2 W Rev
If you run it in debug, you cannot close the terminal. But it should run as a service... but again, I know the Zero has issues. And therefore with a Pi Zero you should have some technical knowledge.
Also search in the closed issues for clues. #823 (comment)
But from my side, without any clear errors, I cannot do any thing.
Cool going to Order a Pi4 anyways
Restarted it now and is running disconnected from terminal yay thankyou Kind regards
Robin Morgan
On 24 Jan 2024, at 22:41, RobinM-MB @.***> wrote:
If you run it in debug, you cannot close the terminal. But it should run as a service... but again, I know the Zero has issues. And therefore with a Pi Zero you should have some technical knowledge.
Also search in the closed issues for clues. #823 (comment)https://github.com/theyosh/TerrariumPI/issues/823#issuecomment-1693236850
But from my side, without any clear errors, I cannot do any thing.
Cool going to Order a Pi4 anyways
— Reply to this email directly, view it on GitHubhttps://github.com/theyosh/TerrariumPI/issues/884#issuecomment-1909040678, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFPKP6G7YQMQM37IGL4A4CTYQGE2RAVCNFSM6AAAAABCFVUIRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBZGA2DANRXHA. You are receiving this because you authored the thread.Message ID: @.***>
One last question
How easy is it to add another type of smart plug.
As we are Uk many of the ones configured arnt readily available.
But we do get Tapo P100 which are readily available and have a very easy api
Kind regards
Robin Morgan
On 24 Jan 2024, at 23:11, Rob Morgan @.***> wrote:
Restarted it now and is running disconnected from terminal yay thankyou Kind regards
Robin Morgan
On 24 Jan 2024, at 22:41, RobinM-MB @.***> wrote:
If you run it in debug, you cannot close the terminal. But it should run as a service... but again, I know the Zero has issues. And therefore with a Pi Zero you should have some technical knowledge.
Also search in the closed issues for clues. #823 (comment)https://github.com/theyosh/TerrariumPI/issues/823#issuecomment-1693236850
But from my side, without any clear errors, I cannot do any thing.
Cool going to Order a Pi4 anyways
— Reply to this email directly, view it on GitHubhttps://github.com/theyosh/TerrariumPI/issues/884#issuecomment-1909040678, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFPKP6G7YQMQM37IGL4A4CTYQGE2RAVCNFSM6AAAAABCFVUIRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBZGA2DANRXHA. You are receiving this because you authored the thread.Message ID: @.***>
Don’t worry I will by some of the Meross ones from Amazon
Kind regards
Robin Morgan
From: Rob Morgan Sent: Thursday, January 25, 2024 7:54 AM To: theyosh/TerrariumPI @.> Cc: theyosh/TerrariumPI @.>; Author @.***> Subject: Re: [theyosh/TerrariumPI] Refused Connection (Issue #884)
One last question
How easy is it to add another type of smart plug.
As we are Uk many of the ones configured arnt readily available.
But we do get Tapo P100 which are readily available and have a very easy api
Kind regards
Robin Morgan
On 24 Jan 2024, at 23:11, Rob Morgan @.**@.>> wrote: Restarted it now and is running disconnected from terminal yay thankyou Kind regards
Robin Morgan
On 24 Jan 2024, at 22:41, RobinM-MB @.**@.>> wrote:
If you run it in debug, you cannot close the terminal. But it should run as a service... but again, I know the Zero has issues. And therefore with a Pi Zero you should have some technical knowledge.
Also search in the closed issues for clues. #823 (comment)https://github.com/theyosh/TerrariumPI/issues/823#issuecomment-1693236850
But from my side, without any clear errors, I cannot do any thing.
Cool going to Order a Pi4 anyways
— Reply to this email directly, view it on GitHubhttps://github.com/theyosh/TerrariumPI/issues/884#issuecomment-1909040678, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFPKP6G7YQMQM37IGL4A4CTYQGE2RAVCNFSM6AAAAABCFVUIRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBZGA2DANRXHA. You are receiving this because you authored the thread.Message ID: @.**@.>>
I think the Tapo P100 can be supported. You need to know (I guess) you email and password at TP-Link and the IP of the Tapo P100 plug. So I guess only the IP is something you have to find of your plug. If you know that we can try to add this device.
I will need some testing from your side. So if you can test this for me with your setup at home, please open a new issue for this and I will try to add some support to it.
Perfect I will open a new issue
Kind Regards Robin Morgan | Digital Consultant | RPA Developer 24 Hill Street, St Helier, JE2 4UA 01534 761 464 @.*** | www.masonbreese.com Image
From: TheYOSH @.> Sent: Thursday, January 25, 2024 5:26:31 PM To: theyosh/TerrariumPI @.> Cc: Robin Morgan @.>; Comment @.> Subject: Re: [theyosh/TerrariumPI] Refused Connection (Issue #884)
I think the Tapo P100 can be supported. You need to know (I guess) you email and password at TP-Link and the IP of the Tapo P100 plug. So I guess only the IP is something you have to find of your plug. If you know that we can try to add this device.
I will need some testing from your side. So if you can test this for me with your setup at home, please open a new issue for this and I will try to add some support to it.
— Reply to this email directly, view it on GitHubhttps://github.com/theyosh/TerrariumPI/issues/884#issuecomment-1910667767, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEU3DQPMQJIJHC67AI6E4ETYQKIUPAVCNFSM6AAAAABCFVUIRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQGY3DONZWG4. You are receiving this because you commented.Message ID: @.***>
Al ready created an issue and support for TAPO P 100. https://github.com/theyosh/TerrariumPI/issues/888
Closing this issue as it has been resolved.
I have installed, re-installed, and read almost everything, but still cannot find a definitive answer to the refused connection issue i am facing. I have follow the instructions to a t. I can SSH to the Raspberry pi but cannot get the Dash to load