Kivy Reef: A touchscreen interface for reef-pi - Announcements and Discussion thread

  • Thread starter Thread starter NXE
  • Start date Start date
  • Tagged users None
Ok so weird story, I went ahead and retried it now and t hings are working. Another thing was that the other day I was having trouble being able to see the options to change color and range for the graphs in reef-pi and that is now working again too, so my guess is that there was an issue with reef-pi not with kivy.
Great, glad it's working for you now.
 
Will this work with Robo-tank?
 
I noticed that on the install instructions it says "Note that kivy-reef will need to be started from a local console (not via ssh) or a systemd service."
I have tried a few times to create a system service to start this on boot but it fails every time.
I even tried running the service after boot but I get the same errors.
Any tips to get this working?

kivy-reef.service - Start Kivy-Reef
Loaded: loaded (/lib/systemd/system/kivy-reef.service; disabled; vendor pr>
Active: failed (Result: exit-code) since Fri 2022-04-29 00:16:28 BST; 9s a>
Process: 682 ExecStart=/usr/bin/python3 /home/pi/kivy-reef/main.py (code=ex>
Main PID: 682 (code=exited, status=1/FAILURE)
CPU: 310ms
Apr 29 00:16:28 raspberrypi systemd[1]: Started Start Kivy-Reef.
Apr 29 00:16:28 raspberrypi python3[682]: Traceback (most recent call last):
Apr 29 00:16:28 raspberrypi python3[682]: File "/home/pi/kivy-reef/main.py", >
Apr 29 00:16:28 raspberrypi python3[682]: import kivy
Apr 29 00:16:28 raspberrypi python3[682]: ModuleNotFoundError: No module named >
Apr 29 00:16:28 raspberrypi systemd[1]: kivy-reef.service: Main process exited,>
Apr 29 00:16:28 raspberrypi systemd[1]: kivy-reef.service: Failed with result '>


 
Hello looking for some additional assistance. I installed Kivy-reef directly on my reef-pi because I was not able to get the systemd service working but when I start it I get an error. But I only get the error when the config is pointed to itself (http://127.0.0.1) When I point it to another location, working or not it runs.
Error output as follows:
(kivy_venv) pi@ReefTank:~ $ python3 /home/pi/kivy-reef/main.py
[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_22-04-29_13.txt
[INFO ] [Kivy ] v2.1.0
[INFO ] [Kivy ] Installed at "/home/pi/kivy_venv/lib/python3.9/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110]
[INFO ] [Python ] Interpreter at "/home/pi/kivy_venv/bin/python3"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 189 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2(['text_pango'] ignored)
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 Mesa 20.3.5'>
[INFO ] [GL ] OpenGL vendor <b'Broadcom'>
[INFO ] [GL ] OpenGL renderer <b'VC4 V3D 2.1'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <2048>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [GL ] NPOT texture support is available
Traceback (most recent call last):
File "/home/pi/kivy-reef/main.py", line 157, in <module>
ReefpiApp().run()
File "/home/pi/kivy_venv/lib/python3.9/site-packages/kivy/app.py", line 954, in run
self._run_prepare()
File "/home/pi/kivy_venv/lib/python3.9/site-packages/kivy/app.py", line 924, in _run_prepare
root = self.build()
File "/home/pi/kivy-reef/main.py", line 146, in build
if not self.connect():
File "/home/pi/kivy-reef/main.py", line 137, in connect
self.build_widgets()
File "/home/pi/kivy-reef/main.py", line 124, in build_widgets
self.ph_dict = PhDict(self.connection)
File "/home/pi/kivy-reef/sensors.py", line 53, in __init__
super(PhDict, self).__init__(c)
File "/home/pi/kivy-reef/entity.py", line 92, in __init__
self.populateDict() # Populate the dictionary by creating entity objects
File "/home/pi/kivy-reef/entity.py", line 152, in populateDict
new_item = self.createItem(attributes, self.connection)
File "/home/pi/kivy-reef/sensors.py", line 56, in createItem
new_item = PhWidget(attributes.get('id'), attributes.get('name'), c)
File "/home/pi/kivy-reef/sensors.py", line 45, in __init__
self.update()
File "/home/pi/kivy-reef/entity.py", line 32, in update
new_value = round(self.___get_last_reading(), 2)
TypeError: type NoneType doesn't define __round__ method
 
Hi @NXE or anyone else, can we get a step-by-step on how to install this? It looks awesome. But I am a complete noob.

best and thx
 
Hi @drnibz @Wolfw28 , apologies for the delayed response – I have not had much time for Kivy Reef lately. Installation instructions are provided on the github page: https://github.com/natbird/kivy-reef#instructions

You will need to download and extract the Kivy Reef files (https://github.com/natbird/kivy-reef/archive/refs/heads/main.zip) and install the necessary dependencies, then run Kivy Reef and edit the configuration file.

I do intend to bundle Kivy Reef into a package for easier installation at some point, but don't have time at the moment unfortunately.
 
I really like the look of this.

I've just installed a 7" Waveshare touchscreen on my Robo-Tank/Reef-Pi running 6.0. I have also set it up to run in kiosk mode so as to not to have the GUI stuff competing for screen space. BUT, the on-screen buttons are a bit too small for my fat fingers - a problem this Kivy-Reef interface seems to resolve.

I have had a look at this page https://github.com/natbird/kivy-reef#instructions

Is the setup as straightforward as following the guides in the order listed?

I have been running Reef-Pi for quite a few years now, but am useless with the software / Linux side of it. I'm OK with the hardware side though.
 
@NXE is this compatible ReefPi 6.0?
Hi @DanTheReefer – yes, KivyReef is compatible with reefpi 6.0. But let me know if you run into any issues.

I really like the look of this.

I've just installed a 7" Waveshare touchscreen on my Robo-Tank/Reef-Pi running 6.0. I have also set it up to run in kiosk mode so as to not to have the GUI stuff competing for screen space. BUT, the on-screen buttons are a bit too small for my fat fingers - a problem this Kivy-Reef interface seems to resolve.

I have had a look at this page https://github.com/natbird/kivy-reef#instructions

Is the setup as straightforward as following the guides in the order listed?

I have been running Reef-Pi for quite a few years now, but am useless with the software / Linux side of it. I'm OK with the hardware side though.

Hi @Des Westcott – It is not as straightforward as I would like, but the basic steps are:
1. Download the code from GitHub (either run 'git clone https://github.com/natbird/kivy-reef.git' or download as a zip from the website and extract).
2. In the folder in which kivyreef was cloned/extracted, run 'pip install -r requirements.txt' (you may need to use pip3 install -r requirements.txt depending on your distribution).
3. Once all of the dependencies are installed, run 'python3 main.py' from the same folder. This will start kivyreef.
4. The first time kivyreef is run it creates a file called 'kivyreef.ini' which stores the program settings. If you are running kivyreef on the same machine as reefpi and have not changed the username/password for reefpi, the default settings should be fine.
5. To autostart kivyreef, you can follow the link in this post: https://www.reef2reef.com/threads/k...nts-and-discussion-thread.865824/post-9487165

Let me know if you have any issues and I will do my best to assist.

I am working on a new version of kivyreef that will also work on Android phones/tablets and hopefully make the installation process more straightforward, but progress is very slow unfortunately as my spare time is limited these days.
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top