This topic is a discussion about github issue #983.
What are your thoughts about expanding support for other SBCs, such as banana pi, beagle, etc.?
It would expand the hardware Mycodo could run on but also introduce potential compatibility and diagnostic issues. The main changes would be removing a dependency on RPi.GPIO (this can stay in Pi-only Inputs/Outputs) and switching to using Adafruit-Blinka, which supports multiple SBCs (including the Pi). Just this change alone would require significant refactoring. I would be inclined to take the opportunity and go through a major version bump to be able to make some other significant database schema changes I’ve been wanting to do for a while to reduce the complexity of the system. I’ll leave my thiughts at that, because I’d like to hear what you think.
Even though the idea sounds great, it would require much more work than just working on a single platform. One thing that comes to my mind is that you could let the user select which device they would use and forward it to a related channel (ip/deviceX/live for instance) so that there wouldn’t be dependency confusion.
I’ve already begun making changes that allow Mycodo to be installed on really any Debian-based linux distribution (apt is a dependency). I’ve also started changing how modules (Inputs, Outputs, Functions, etc.) are listed, so they specify if a Raspberry Pi is required (or at least what library is used, such as RPi.GPIO, which is Raspberry Pi-specific but can run on some other SBCs such as the Orange Pi). I haven’t added any Non-Pi board-specific modules since all I really have are Pis to test with.
So, you should be able to install and use Mycodo on any SBC that can install a Debian-based linux system.
I have installed mycodo on an Orange Pi Board (PC Plus H3) running Armbian successfully.
But I haven’t tried to connect any Input/output to it yet.
What I have noted is that the page /info doesn’t work.
Mycodo will run on any Debian-based Linux distribution, which there should be multiple to choose from for most single board computers (SBCs). You may need to figure out how to interface with the pins as outputs, but as far as I2C/UART/Serial goes, this is handled at the Linux kernel level, not in Mycodo, which means it will work out of the box. As for having a custom output to work specifically for a SBC, you may need to read how pins are configured as outputs and set High/Low and from that, modify an existing Output Module to use that method.
I have successfully installed Mycodo on a Libre-computer aml-s905x-cc and its been running for about a week now. I2C seems to work fine but I am having issues using GPIO, even with a GPIO expander. has something to do with libgpiod library.