Building a smart houseplant monitor (and waterer)

@tomamam , sorry for the lag here. I just booted my project up with a fresh build and it looks like the dashboard and mqtt blocks are not playing nice. I’m going to go see what kind of updates have been made and maybe I’m missing something to update in the main build. Will check back in soon.

1 Like

@tomamam Sorry for another late response here, but I got it working again :stuck_out_tongue:

I don’t think you’re a part of my Fleet (where everyone will get the automated update). You might want to pull the latest from the repo, and repush to your application/devices. Let me know if you need any help!

1 Like

If you are seeing a compilation error please try the following steps to
[plantsaver] successfully install cryptography:
[plantsaver] 1) Upgrade to the latest pip and try again. This will fix errors for most
[plantsaver] users. See: This page has moved - pip documentation v21.3.1
[plantsaver] 2) Read Installation — Cryptography 36.0.0.dev1 documentation for specific
[plantsaver] instructions for your platform.
[plantsaver] 3) Check our frequently asked questions for more information:
[plantsaver] Frequently asked questions — Cryptography 36.0.0.dev1 documentation
[plantsaver] 4) Ensure you have a recent Rust toolchain installed:
[plantsaver] Installation — Cryptography 36.0.0.dev1 documentation
[plantsaver] Python: 3.7.12
[plantsaver] platform: Linux-5.4.0-72-generic-armv6l-with-debian-10.11
[plantsaver] pip: n/a
[plantsaver] setuptools: 58.3.0
[plantsaver] setuptools_rust: 0.12.1
[plantsaver] =============================DEBUG ASSISTANCE=============================
[plantsaver] error: can’t find Rust compiler
[plantsaver] 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.
[plantsaver] To update pip, run:
[plantsaver] pip install --upgrade pip
[plantsaver] and then retry package installation.
[plantsaver] 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://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
[plantsaver] This package requires Rust >=1.41.0.
[plantsaver] ----------------------------------------
[plantsaver] ERROR: Failed building wheel for cryptography
[plantsaver] ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
[plantsaver] WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
[plantsaver] You should consider upgrading via the ‘/usr/local/bin/python3.7 -m pip install --upgrade pip’ command.
[plantsaver]
[plantsaver] Removing intermediate container cd5c835cfdc6
[plantsaver] The command ‘/bin/sh -c pip3 install --upgrade pip setuptools wheel smbus2 RPi.GPIO balena-sdk automationhat paho-mqtt’ returned a non-zero code: 1

Have you guys encountered this error during build?

@andrewnhem I remember you mentioned you needed to have a look at the plantsaver project again - was this a known issue?

Thanks @chrisys and @olorenz – I’ll take a look.

@olorenz : Thanks for trying the project out. I just reinstalled it onto a Pi 4 and it worked. May I please ask what your setup is? Which Raspberry Pi model are you using?

Hi Andrew,
I haven’t deployed it on physical device yet as I can’t get past deployment to the fleet

@olorenz Thanks for the additional context here. I was looking at it from my open fleet perspective. I’ll take a look at the standalone version now. Updates soon!

@olorenz : I just reinstalled the project on a new fleet via the latest on the GitHub repo, used the latest balenaCLI, and via balena push, it works (I’m using a Pi4, hooked up to my test rig for the project). I wasn’t able to replicate that installation error that you posted previously.

I’d like to try and replicate your situation so that I can try and figure out what’s going on. Are you also using balenaCLI? Or are you using the Deploy with balena button?

Hi Andrew,

Thank you for your effort. I tried both and seem to be getting the same outcome for some reason. Happy to give you access to my account if you want to take a look.

@chrisys I seem to be unable to build a release when trying to create a fleet or push it to an existing one. It just seems to time out and never builds.
Any ideas?

Hey there @fozman2 this is quite an old project now and so may not work at all but can you share how you’re attempting to deploy and share any logs that you get? Also what device type are you trying to use?

Are there any plans to maintain it?

I’m deploying to a Pi Zero 2W

I’ve attached the build logs, and the error when it tries to build the plantsaver image:
balena-plant-saver_release-log_plantsaver-0.2.8.txt (12.5 KB)
Error: The command '/bin/sh -c python3 -m pip install --no-cache-dir --trusted-host pypi.python.org Adafruit_DHT==1.4.0 --install-option="--force-pi2"' returned a non-zero code: 2

I’m working on a fork to see if I can resolve some of the issues by updating the docker file for plantsaver.

As best I can tell, the issue is because in /plantsaver/Dockerfile.template
--install-options is used on line 15 and forces pip to use setuptools’s install command, which is deprecated.

It’s recommended to use --config-setting="--build-option=--<FLAG>" but that also does not work. It triggers this error

DEPRECATION: Config settings are ignored for project Adafruit_DHT==1.4.0 from https://files.pythonhosted.org/packages/ff/24/b999708edffbc3d30763acdf07dc7a1666a1542795f3d2b80d6ef2590c0c/Adafruit_DHT-1.4.0.tar.gz. pip 24.0 will enforce this behaviour change. A possible replacement is to use --use-pep517 or add a pyproject.toml file to the project.

I believe the problem is rooted in the deprecated Adafruit_DHT library. It relies on setuptools to install dependencies.
The best solution appears to be using the current adafruit-circuitpython-dht library instead, which I’m currently testing.

@chrisys I submitted a pull request to migrate to an update library. Is there a process to have that looked at?

Thanks for trying this out. Let me rebuild my project and see if things are working as they should.