Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pierric/fishfeeder
my little automatic fish feeder
https://github.com/pierric/fishfeeder
Last synced: 16 days ago
JSON representation
my little automatic fish feeder
- Host: GitHub
- URL: https://github.com/pierric/fishfeeder
- Owner: pierric
- License: bsd-3-clause
- Created: 2024-04-05T14:07:33.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-11T20:32:43.000Z (8 months ago)
- Last Synced: 2024-11-08T07:57:37.929Z (2 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 3D Model
https://www.thingiverse.com/thing:736693# Hardware
- Rockpi 4 SE, or any board that has an I2C interfaces)
- PWM Servo driver board 16 Channel, using only one channel though
- SG90 Servo 360 degree# Software
Controlling the Servo
- PCA9685.py: driver code for the PWM board.
- main.py: code that drives the servo once.
- crontab: the cron job specification that schedules the main.py to run every 6 hoursDeploying as an Add-on for Home Assistant OS
- Dockerfile
- config.yaml**Note**, in the run and crontab, absolute paths are used in order to avoid troubles as an cron job. Edit them if necessary.
**Note**, the address for the I2C bus can be detected using the mraa-i2c tool.
**Note**, I2C bus may not be enabled by default (as Rockpi 4 SE), you need some tricks for kernel device tree overlay to start it.
# Enabling i2c-7 on Rockpi 4 SE
According to the [page](https://wiki.radxa.com/Rock4/hardware/gpio), pins 5 and 7 are the I2C-7 of the RK3399 chip. Linux distributions usually set I2C-7 disabled by default. It is necessary to enable it first in a device tree overlay.Source code (filename as rockchip-custom.dts) for the overlay.
```
/dts-v1/;/ {
compatible = "rockchip,rk3399";
fragment@0 {
target-path = "/i2c@ff160000";
__overlay__ {
status = "okay";
};
};
};
```Compile it.
```
dtc -O dtb -o rockchip-custom.dtbo -b 0 -@ rockchip-custom.dts
```On the Home Assistant OS, copy `rockchip-custom.dtbo` to `/mnt/boot/overlays/` and update the file `/mnt/boot/haos-config.txt`.
```
overlays=rk3399-disable-wifi-interrupts rockchip-custom
```Reboot the OS. Aften that, i2c-7 is enabled.
```
# cat /proc/device-tree/i2c@ff160000/status
okay# ls /dev/i2c-*
/dev/i2c-0 /dev/i2c-1 /dev/i2c-3 /dev/i2c-4 /dev/i2c-7
```# Add-on for Home Assistant OS
Reference: [Add-ons](https://developers.home-assistant.io/docs/add-ons/tutorial/)In the SSH (the add-on SSH). Clone the repo to `/root/addons`. Then the *Fishfeeder* can be then found in the local add-ons. Click *Install* and *Start*. That's it.