• 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
Problems after upgrade with switching on and off multiple lamps consecutively
#11
(03-15-2019, 12:11 PM)curlymo Wrote: It's as easy as:
Code:
apt-get install pilight=7.0 pilight-webgui=7.0

I asked earlier why you aren't using the socket API? If you do, does the problem still exist?

I tried in vain to understand the documentation. After that, I asked you about the Socket API. Do you have a minimal example of how can I use the socket API with openhab or a shell script? I have no idea about using the socket API  and it seams no realy simple to find an example via google.

I would really prefer to use the newest version of pilight, but it's very stressful to invest a lot time to fix something that has worked well before.

How can I replace an pilight-send command with something the uses the socket API.
 
Reply
#12
You can find examples in various languages here:
https://github.com/pilight/pilight/tree/master/clients
 
Reply
#13
Now I downgraded pilight to V7.0. I use the old config.json


Code:
{
    "devices": {},
    "rules": {},
    "gui": {},
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/",
        "webserver-http-port": 5001,
        "webserver-cache": 1
    },
    "hardware": {
        "433gpio": {
            "sender": 3,
            "receiver": 4
        }
    },
    "registry": {
        "pilight": {
            "firmware": {
                "version": 3,
                "lpf": 80,
                "hpf": 16000
            },
            "version": {
                "current": "7.0"
            }
        }
    }
}

After starting the service I got the following status

Code:
mario@raspberrypi3:/etc/pilight $ sudo service pilight status
* pilight.service - LSB: Starts pilight-daemon
   Loaded: loaded (/etc/init.d/pilight; generated; vendor preset: enabled)
   Active: active (exited) since Sat 2019-03-16 13:55:12 CET; 35s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7251 ExecStop=/etc/init.d/pilight stop (code=exited, status=0/SUCCESS)
  Process: 7304 ExecStart=/etc/init.d/pilight start (code=exited, status=0/SUCCESS)
 Main PID: 1934 (code=exited, status=0/SUCCESS)
      CPU: 109ms

M▒r 16 13:55:12 raspberrypi3 systemd[1]: Starting LSB: Starts pilight-daemon...
M▒r 16 13:55:12 raspberrypi3 pilight[7304]: Starting : pilight.
M▒r 16 13:55:12 raspberrypi3 systemd[1]: Started LSB: Starts pilight-daemon.

Everything seems to be fine. But nothing works. Do you have an idea why?

Log:

Code:
[Mar 16 12:55:12:268830] pilight-daemon: INFO: version v7.0
[Mar 16 12:55:12:379936] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Mar 16 12:55:12:380310] pilight-daemon: INFO: daemon listening to port: 46215
[Mar 16 12:55:12:382342] pilight-daemon: ERROR: hardware not supported
[Mar 16 12:55:12:382539] pilight-daemon: ERROR: could not initialize 433gpio hardware module
 
Reply
#14
You miss the gpio-platform setting.
 
Reply
#15
(03-16-2019, 04:25 PM)curlymo Wrote: You miss the gpio-platform setting.

I didn't need this setting with the old configuration (Jessie and pilight 7.0). I tried it this way anyway...


Code:
{
        "devices": {},
        "rules": {},
        "gui": {},
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "webserver-enable": 0,
                "webserver-root": "/usr/local/share/pilight/",
                "webserver-http-port": 5001,
                "webserver-cache": 1,
                "gpio-platform": "raspberrypi3"
        },
        "hardware": {
                "433gpio": {
                        "sender": 3,
                        "receiver": 4
                }
        },
        "registry": {
                "pilight": {
                        "firmware": {
                                "version": 3,
                                "lpf": 80,
                                "hpf": 16000
                        },
                        "version": {
                                "current": "7.0"
                        }
                }
        }
}


and I got this error message

Code:
==> pilight.err <==
[Mar 17 09:20:33:140456] pilight-daemon: ERROR: config setting "gpio-platform" is invalid
 
Reply
#16
Ah, i remember. Something changed on the Raspberry Pi side after pilight 7 was released which made it impossible to properly detect the raspberry pi as the running platform. Those issues were all fixed in pilight 8 and beyond, and that's why the gpio-platform parameter was introduced.

You can see that in those commits included in pilight 8:
https://github.com/pilight/pilight/commi...e572d7+314

Conclusion, pilight 7 doesn't work anymore on some Raspberry Pi versions. I would suggest trying pilight 8.

Better option is to further debugging this issue and getting it fixed the best way possible.
 
Reply
#17
I didn't change the hardware. I only brought the Raspberry OS including the kernel from Jessie to Stretch. With Jessie and pilight 7.0 everything worked fine.

Do you see a possibility bring V7.0 running with my current configuration? Maybe it's possible to expand pilight 7.0 with gpio-platform parameter or something like that? What in detail is the problem with the new Raspberry OS?

For me it's also okay to debug the issue with the current version. Do you have an idea, why I need a 5 second sleep between each call of pilight-send? What can I do, to support the "bug" finding?
 
Reply
#18
You need to revert back to jessie (with the jessie kernel) to get pilight 7 to work again. The RPi foundation changed stuff in the kernel making the automatic hardware detection unreliable. Not much i can change. Fixing older versions is not something i'm going to do. I don't have time for that.

What you can do is what i said before, try if the issue persists when using the socket API.
 
Reply
#19
(03-17-2019, 02:19 PM)curlymo Wrote: You need to revert back to jessie (with the jessie kernel) to get pilight 7 to work again. The RPi foundation changed stuff in the kernel making the automatic hardware detection unreliable. Not much i can change. Fixing older versions is not something i'm going to do. I don't have time for that.

What you can do is what i said before, try if the issue persists when using the socket API.

Switching back to Jessie isn't really an option, because I need the newest kernel for using piVCCU.

Maybe it's possible for you to fix this issue in the current pilight version? What is the reason for, pilight needs a lot of time between several consecutively switching operations?

The reason for the current problem is the gpio platform configuration? Maybe I can try to patch the 7.0 version of pilight (hardcoded platform type) by myself? Or do you think it's to complicated?   

Do you have an c example for a socket API client?

Edit: Apparently I'm not the only one with such a problem.
 
Reply
#20
pilight-send and pilight-control are the C examples.

To debug this, I first want to make sure pilight is the actual issue and not something else. The problem is that it's often something else and I wasted my limited spare time finding a unicorn.

To fix pilight 7 you need to make it use libwiringx instead of having that library hardwired into the source.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
Information Switching speed? rajd 4 307 12-17-2018, 09:07 AM
Last Post: rajd
  Daemon problems: no apparant sudo access Surowa 3 470 08-14-2018, 06:21 AM
Last Post: curlymo
Thumbs Up Newbie problems, usbnano connection and rsl366 pukington 1 392 02-14-2018, 07:36 PM
Last Post: pukington
  Elro 800 issues after upgrade to 8.0.9 TomiB 2 480 01-29-2018, 10:12 PM
Last Post: TomiB
  Multiple screens/shutters Ulrich.Arnold 5 723 01-29-2018, 09:17 PM
Last Post: curlymo
  Upgrade to jessie+pilight+kernel failed witty 10 1,563 01-04-2018, 12:27 PM
Last Post: witty
  SSDP Problems stritzi 1 729 11-14-2017, 01:18 PM
Last Post: curlymo
  multiple uuid's, what's the syntax? hansrijn2 3 686 10-31-2017, 12:26 PM
Last Post: curlymo
  multiple 433mhz senders koos147 9 1,776 10-05-2017, 09:12 PM
Last Post: koos147
  Problems with pilight 7.0, Pi 3 IncepTer 1 1,082 08-30-2017, 09:36 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)