Access GPIOs on Asus Tinker Board S

Hey guys,

I got a new tinker board S today to install and run my hass.io

Although everything went fine and very fast, i cant figure out how to use the GPIOs of the tinkerboard under hassio.

I have searched the forums but i cant find anything, which can mean two things, it’s either not implemented yet or it’s something very simple that im missing.

I have checked out the components page and it seems like other boards’ gpios are supported. Is there some other board that would be similar to Asus?

I also noticed that this fellow here has solved it but i cant figure out how or if it’s even applicable to hass.io.

Could anyone provide me with some help, info or pointers?

Thanks in advance,

K.

I’m working to get tinker board mimic the RPi, as Asus projected. But at certain point there are problem regarding the permissions to access the GPIO, as it might happen to the RPi.
The latest development, wiringPi, allows to access the GPIO by the program gpio. The program is also available for tinker, but there’s no development, yet, that is working on HA.

I’ve a skeletal implementation, which allows to write and read from the GPIO.

1 Like

That sounds very promising. I wish I had the skills to contribute!

Here’s the component’s drivers.
Just make the custom_components folder (if needed) and drop it there. Make sure that you got the gpio program somewhere within your path, because the driver expects it.
I still to get the preparation phase to set. For the moment it will take that the user will run a small shell script to set the pin on the wanted mode.
For example I’m actually using 4 GPIO as output. The physical number are use so the preparation command is:

for i in 22 24 26 27; do gpio -1 mode $i out; done

Which means that I have connected the 22,24,26 and 27 pin.

I would like to control gpio pin 17 for controlling a cooling fan for tinkerboard. The electrical part is done and just now i saw that i can´t do it with tinkerboard. I just need to make a switch of pin 17 to control the 3.3v. Could you advise me how to do it in homeassistant?

I made the custom_component folder and copied the asus_gpio folder in it. What do you mean with this: " Make sure that you got the gpio program somewhere within your path, because the driver expects it." ?

I gave up on the tinkerboard, i installed HA on an old laptop and i’ve been using ESP32 chips with ESPhome for all my GPIO needs.
So, im afraid i can’t help you out, hope you solve it though :slight_smile:

I have a RPi 4 waiting for the SSD boot for hassos. Luckily V5 has these options and it is in development and i hope that i don´t have to wait for too long for the stable release. But until then i am going to use tinkerboard for it.

In my custom_components folder i have asus_gpio folder and i also did but the gpio program at this location but i still get this error:

                          Platform error switch.asus_gpio - cannot import name 'asus_gpio' from 'homeassistant.components' (/usr/src/homeassistant/homeassistant/components/__init__.py)

I made a topic at WTH about this and i need every vote to get it done. So please vote for it.