This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TB development for Home Assistant
#1
Hi forum,
I stumbled on the Hassio development and I'm happy to see that I could realize progress on my design just in few days, but I'm interested to have the GPIO functionality ported into the Hassio.

Unfortunately my knowledge lacks about the way to deal with dockerized installation such as the given by Home Assistant. I've tried to make a virtual environment like they propose, but alas I couldn't get it work on my Archlinuxarm Wink

I'd like to invite whoever has a little capability to try to port the python library into that docker and to let the system make use of that. It isn't a big step, so even no skilled person are interested for such idea, just join with me to try some effort to get geared up on the purpose.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#2
Updates:
I could install home assistant directly from python. Now it's up and running.
Just one more stone on my path, the python version will be deprecate next month by home assistant Cry Cry
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#3
Sadly I cannot help here as I have installed Android on my TB. But I was able to install dockerized hass.io on my Odroid C1 that is running Armbian Bionic with mainline kernel. There is also existing an Armbian Bionic for TB... If you can try this?
Reply
#4
Thank you for your addressing.
I made some step further.
I could install home assistant by python pip. It's running as expected. Then I wanted to secure it and I moved the whole thing to new user, with a good success.
So for that point I'd say it working with most of the commercial IoT that the project is listing. I need to use the GPIO, so there's a limitation, but I think I can override it, as long as python take the local modules overload it is simple to copy the GPIO library in <confg>/custom_component/.
I'm experimenting to see I can use the GPIO like those for RPi. At the moment I haven't noted error, but I need to test on the hardware. I bit early to say that is working.

Another experiment is possible to access over ssh or UART and then from there to manipulate the docker, but I'm very new about docker containers. So I can't imagine how to modify the container and add more functionality. I'd rather prefer to work from the linaro installation and manage in a open manner, better than a docker system.

Who want's to access via the UART, is just to mount the first partition, which is visible also on windows and modify the cmdline.txt file. It just take to add
Code:
console=ttyS2, 115200n8
and then is available over the UART2. Other UARTS are possible, but won't be synchronize with u-boot.

I'm going to try to install on the Armbian soon, specially because of python on the linaro is old. Unfortunately ALarm is not solving about one package that is not compatible in hass.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#5
I'm frustrated on trying something working. About that RPi seems to be working with the GPIOs, without using admin permission.
But the package seems to be frozen about one year now. The case to allow that part of hardware needs an user space interface.

Like the C program gpio has an option to be used by the normal user. The latest version is 2.50, but the forum points to that old one. The latest has a procedure to drop the privileges to the normal user. I can't imaging about the python porting.
So for the use with home assistant, or similar, it's precluded any development, without a concern. BTW the wiringPi, is gone to a demonized version that is accessible from a tcp interface. That will drop the risk to tamper with /dev/mem

I don't have a big skill/knowledge to handle C source, so please I need some help to try a fix.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#6
(07-11-2019, 12:24 AM)Im4Tinker Wrote: I'm frustrated on trying something working. About that RPi seems to be working with the GPIOs, without using admin permission.
But the package seems to be frozen about one year now. The case to allow that part of hardware needs an user space interface.

Like the C program gpio has an option to be used by the normal user. The latest version is 2.50, but the forum points to that old one. The latest has a procedure to drop the privileges to the normal user. I can't imaging about the python porting.
So for the use with home assistant, or similar, it's precluded any development, without a concern. BTW the wiringPi, is gone to a demonized version that is accessible from a tcp interface. That will drop the risk to tamper with /dev/mem

I don't have a big skill/knowledge to handle C source, so please I need some help to try a fix.

Hello Im4Tinker, if you are able to compile your own kernel, consider to integrate the gpiomem driver I made for TB Android. It should work also with all other kernel sources and Linux. Then you would have gpio access without root. This driver is a fork of the RPi gpiomem driver, adapted to rockchip device.
https://github.com/joerg65/gpiomem_tinkerboard
Reply
#7
A part of Armbian for about a year
https://github.com/armbian/build/blob/ma...iver.patch
Armbian. Lightweight Debian Stretch or Ubuntu Bionic for Tinker Board.
Reply
#8
Today I got good things.
Installed ALarm and the latest kernel is working with wifi. They applied the fixes to the dtb. Bluetooth is not yet solved, may there aren't enough details how is working. Developers are trying to guess something.
Then I proceed to install home-assistant, but I had to fix some dependencies manually, because the python installer complained against some different version.

I'm trying to gpiomem, but I don't know how to solve the patch.
Code:
patch -p1 <"kernel diff"
patching file drivers/char/Makefile
patch: **** malformed patch at line 11:
After downloading the entire kernel (1,06 Gb) I placed the 2 files into the kernel directory. But I can't guess how this can be accomplished.
Any clue ?
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#9
Hello Im4Tinker, the patch was made against the Android kernel. You could try to add the lines manually into the files. Or give me the link of the kernel where you have downloaded from and I can generate new patchfile for you.
Reply
#10
The kernel comes from its git, https://git.kernel.org/pub/scm/linux/ker.../linux.git
I understood what is the diiff doing, after all. One diff is to change the /drivers/char/Makefile, and I may get there. The second may not be necessary because is just a doc file, the third it would be to change the dtsi which will remake the dtbs with the added informations. 

I think I might do it, but your guidance may shed me the right light Smile
The result would be just to have the kernel module for the rt8723bs and the modified rk3288-tinker-s.dtb.
The only importance for the moment is that I'm using the latest kernel Tongue
Light blue words might be a link. Have you try to click on them? Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)