• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Raspberry PI, gpio-ir-tx and pilight not starting
#1
Hello, I am using pilight on my Raspberry Pi 3 with a 433 MHz receiver connected to GPIO18 in order to read the values from a Temperature Sensor. Everything works great and I am very happy with it.
On the same PI i had connected an Infrared Transmitter on the GPIO24 in order to turn on/off an old light bulb controlled via InfraRed. It did work good until I installed pilight and commented the /boot/config.txt line
Code:
dtoverlay=lirc-rpi,gpio_out_pin=24

When this line is active, the pilight Daemon does not start and I get the error:

Code:
pilight-receive: NOTICE: no pilight ssdp connections found


and in the /var/log/pilight.log there is:

Code:
[Apr 23 14:09:03:568672] pilight-daemon: INFO: daemon listening to port: 5000
[Apr 23 14:09:03:573014] pilight-daemon: ERROR: wiringX failed to write to /sys/class/gpio/gpio18/edge for gpio edge (Device or resource busy)
[Apr 23 14:09:03:578409] pilight-daemon: ERROR: unable to register interrupt for pin 1
[Apr 23 14:09:03:578461] pilight-daemon: ERROR: could not initialize 433gpio hardware module
[Apr 23 14:09:03:573512] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 48080


It's weird because I read that pilight should be even able to control Lirc

Do you have any idea of what I'm doing wrong?
Thank you very much in advance!
 
Reply
#2
Lirc uses BCM pin numbering, pilight follows the Raspberry Pi pin numbering.
[Image: ?u=https%3A%2F%2Fi1.wp.com%2Fcdn.makezin...ns.png&f=1]
As you can see here, BCM pin 24 is the same as wiringX 1 which translates to P1 pin GPIO 18.
 
Reply
#3
Thank you for your answer, but I tried to write on /boot/config.txt


Code:
dtoverlay=lirc-rpi,gpio_in_pin=23,gpio_out_pin=22


which should be the wiringX 3 if I understand your table correctly.
Then i reboot and i get again the error:

Code:
[Apr 24 06:55:09:626766] pilight-daemon: ERROR: wiringX failed to write to /sys/class/gpio/gpio18/edge for gpio edge (Device or resource busy)
[Apr 24 06:55:09:631229] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 42718
[Apr 24 06:55:09:633448] pilight-daemon: ERROR: unable to register interrupt for pin 1
[Apr 24 06:55:09:633567] pilight-daemon: ERROR: could not initialize 433gpio hardware module

EDIT:

In my config.json i had to set the sender for the 433MHz hardware to -1 (because I only need the receiver):

Code:
{
        "devices": {},
        "rules": {},
        "gui": {},
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "standalone": 0,
                "port": 5000,
                "webserver-enable": 0,
                "webserver-root": "/usr/local/share/pilight/webgui",
                "webserver-http-port": 5001,
                "webserver-https-port": 5002,
                "webserver-cache": 1,
                "whitelist": "",
                "gpio-platform": "raspberrypi3"
        },
        "hardware": {
                "433gpio": {
                        "sender": -1,
                        "receiver": 1
                }
        },
        "registry": {
                "webserver": {
                        "ssl": {
                                "certificate": {
                                        "location": "/etc/pilight/pilight.pem"
                                }
                        }
                },
                "pilight": {
                        "version": {
                                "current": "8.1.4"
                        }
                }
        }
}

Then it worked! Thank you for the hint!
 
Reply
#4
I'm using this kind of setup myself.
Code:
dtoverlay=lirc-rpi,debug,gpio_in_pin=27

Code:
        "hardware": {
                "433gpio": {
                        "sender": 0,
                        "receiver": 1
                }
        },
 
Reply
#5
Hello, I have a Raspberry Pi 3 with Raspbian and I just reconfigured the file /boot/config.txt with the following option

dtoverlay=gpio-ir-tx,gpio_in_pin=23,gpio_out_pin=22

because I had a problem with lirc not running with the classic configuration dtoverlay=lirc-rpi

With this option lirc works perfectly but pilight doesn't start anymore, I get the following error:

[Jun 11 11:04:59:182909] pilight-daemon: INFO: version v8.1.4
[Jun 11 11:04:59:286162] pilight-daemon: INFO: no pilight daemon found, daemonizing
[ Jun 11 11:07:43:85138] pilight-daemon: INFO: daemon listening to port: 5000
[ Jun 11 11:07:43:93629] pilight-daemon: ERROR: The Broadcom 2836 failed to write to /sys/class/gpio/export for gpio exporting (Device or resource busy)
[ Jun 11 11:07:43:92523] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 60766
[Jun 11 11:07:43:103109] pilight-daemon: ERROR: unable to register interrupt for pin 1
[Jun 11 11:07:43:103298] pilight-daemon: ERROR: could not initialize 433gpio hardware module


If I roll back to dtoverlay=lirc-rpi I have pilight working but Lirc not.. Do you have an Idea of what is going on and how to correct it?
 
Reply
#6
Why are you asking the same question twice?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
Tongue pilight 8.1.5-1-gc0a175e0 Chrashes fleisch 4 20 1 hour ago
Last Post: curlymo
  pilight for Raspbian Buster (raspberry pi 4) ? starob 29 1,332 07-15-2019, 08:45 PM
Last Post: curlymo
  pilight-receive Filteroption not working Alex 2 311 07-14-2019, 08:35 AM
Last Post: Alex
  pilight usb nano format conversion ettman8 2 199 07-14-2019, 08:32 AM
Last Post: curlymo
  pilight7_oregon on Raspberry pi3 Tueftler1983 0 153 07-04-2019, 01:49 PM
Last Post: Tueftler1983
  pilight 8.1.4 crashes after some hours Ulrich.Arnold 47 1,762 06-29-2019, 08:58 PM
Last Post: curlymo
  pilight fails starting on boot Alex 5 424 06-09-2019, 06:02 PM
Last Post: curlymo
  GPIO input -> starting a rule scootermacro 1 116 06-09-2019, 07:40 AM
Last Post: curlymo
  Google Assistant coupled to pilight hansrijn2 4 861 05-29-2019, 06:54 PM
Last Post: curlymo
  pilight-send does not stop (terminate) va13 3 422 05-15-2019, 06:06 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)