balena-io-experimental / balena-ir-remote

[WIP] A simple application for controlling your AC with a RaspberryPi ( or a balenaFin, if you wanna go fancy or even cellular :P )
14 stars 2 forks source link

recent balenaOS versions do not support lirc-rpi #2

Open curcuz opened 4 years ago

curcuz commented 4 years ago

lirc-rpi got deprecated since kernel 4.19 so deploying this project to recent balenaOS versions will result in a broken app. I need to update the configuration and the business logic to gpio-ir

jellyfish-bot commented 4 years ago

[curcuz] This issue has attached support thread https://jel.ly.fish/#/3ba0eae2-40cc-4770-bbbf-9fdfa104e7ef

nk-gears commented 4 years ago

Thanks for the note. I am waiting to experiment. Please let me know if you want me to do some changes and i can send you a PR as well.

curcuz commented 4 years ago

hey @nk-gears I will try to get to this on Friday, afaict it should not be a ton of work, stay tuned!

nk-gears commented 4 years ago

@curcuz Thank you Appreciated.

nk-gears commented 4 years ago

@curcuz any update on this?

curcuz commented 4 years ago

@nk-gears I have a WIP PR up ( #3 ) with the server part done, you can test it with any HTTP client from simple curl to fancy PostMan :) next week I will work on the frontend GUI - I'm pretty excited about this as now we can allow the user to basically design their own virtual remote :)

grahammcculloch commented 4 years ago

@curcuz I've been testing out your WIP PR. It looks great in theory. I get a valid response from the 'list saved commands' endpoint. But when I try and save a new command I get the following response:

Command failed: ir-ctl -r/data/swing -d /dev/lirc1 -1
/dev/lirc1: cannot open: No such file or directory

I've configured the dtoverlay as per the README and checked that my config.txt file on the boot partition does indeed have the following set:

dtoverlay=lirc-rpi
dtoverlay=gpio-ir,gpio_pin=23
dtoverlay=gpio-ir-tx,gpio_pin=24

What exactly creates /dev/lirc1 and do you have any pointers as to why its not there when running the ir-ctl command?

curcuz commented 4 years ago

hey @grahammcculloch /dev/lirc1 should be "created" by dtoverlay=gpio-ir,gpio_pin=23 - what devices do you see in /dev with namespace lirc ?

grahammcculloch commented 4 years ago

@curcuz here's my /dev:

root@f4f6926:~# ls /dev   
autofs           loop7               ram4       tty19  tty46      vchiq
block            mapper              ram5       tty2   tty47      vcio
bus              mem                 ram6       tty20  tty48      vcs
cachefiles       memory_bandwidth    ram7       tty21  tty49      vcs1
char             mmcblk0             ram8       tty22  tty5       vcs2
console          mmcblk0p1           ram9       tty23  tty50      vcs3
cpu_dma_latency  mmcblk0p2           random     tty24  tty51      vcs4
cuse             mmcblk0p3           raw        tty25  tty52      vcs5
disk             mmcblk0p4           rfkill     tty26  tty53      vcs6
fd               mmcblk0p5           serial0    tty27  tty54      vcsa
full             mmcblk0p6           serial1    tty28  tty55      vcsa1
fuse             mqueue              shm        tty29  tty56      vcsa2
gpiochip0        net                 snd        tty3   tty57      vcsa3
gpiochip1        network_latency     spidev0.0  tty30  tty58      vcsa4
gpiochip2        network_throughput  spidev0.1  tty31  tty59      vcsa5
gpiomem          null                stderr     tty32  tty6       vcsa6
hwrng            port                stdin      tty33  tty60      vcsu
i2c-1            ppp                 stdout     tty34  tty61      vcsu1
initctl          ptmx                tty        tty35  tty62      vcsu2
input            pts                 tty0       tty36  tty63      vcsu3
kmsg             ram0                tty1       tty37  tty7       vcsu4
log              ram1                tty10      tty38  tty8       vcsu5
loop-control     ram10               tty11      tty39  tty9       vcsu6
loop0            ram11               tty12      tty4   ttyAMA0    vga_arbiter       
loop1            ram12               tty13      tty40  ttyS0      vhci
loop2            ram13               tty14      tty41  ttyprintk  watchdog
loop3            ram14               tty15      tty42  uhid       watchdog0
loop4            ram15               tty16      tty43  uinput     zero
loop5            ram2                tty17      tty44  urandom
loop6            ram3                tty18      tty45  vc-mem

No sign of any lirc devices!

curcuz commented 4 years ago

@grahammcculloch it looks like driver wasn't loaded - what OS (and version) are you running?

curcuz commented 4 years ago

also does dmesg | grep lirc produce any interesting output?

grahammcculloch commented 4 years ago

@curcuz thanks for your questions. In response:

$ cat /etc/os-release
ID="balena-os"
NAME="balenaOS"
VERSION="2.47.0+rev1"
VERSION_ID="2.47.0+rev1"
PRETTY_NAME="balenaOS 2.47.0+rev1"
MACHINE="raspberrypi4-64"
VARIANT="Development"
VARIANT_ID="dev"
META_BALENA_VERSION="2.47.0"
RESIN_BOARD_REV="a08e3d7"
META_RESIN_REV="8b48eee"
SLUG="raspberrypi4-64"

And dmesg | grep lirc returns nothing.