• 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
pilight-control
#1
Hello,

First of all - pilight is great!

I am a new forum user and have a strange problem and I did not find something similar in he forum.

I have a Raspberry Pi Model B Plus Rev 1.2 configured like this:


Code:
        "gpio-platform": "raspberrypi1b+",


Code:
    "settings": {
        "port": 5000,
        "standalone": 0,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "log-level": 6,
        "whitelist": "xxx.xxx.xx.*",
        "stats-enable": 1,
        "watchdog-enable": 1,
        "gpio-platform": "raspberrypi1b+",
        "loopback": 0,
        "ntp-servers": [ "eu.pool.ntp.org", "uk.pool.ntp.org" ]
    },



It is running with

pilight-daemon version v8.1.4

as a client on a Raspberry Pi 3 Model B Plus Rev 1.3 configured like this:

 
Code:
       "gpio-platform": "raspberrypi3"


Code:
    "settings": {
        "port": 5000,
        "standalone": 0,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "log-level": 6,
        "whitelist": "192.168.38.*",
        "stats-enable": 1,
        "watchdog-enable": 1,
        "gpio-platform": "raspberrypi1b+",
        "loopback": 0,
        "ntp-servers": [ "eu.pool.ntp.org", "uk.pool.ntp.org" ]
    },

The Raspberry 3 is also running with pilight-daemon version v8.1.4.


Furthermore I have configured relays like this on the master:


Code:
        "Relais-1": {
            "uuid": "0000-b8-27-eb-06929c",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 2
            }],
            "state": "off"
        },


On the GUI the relays respond.
If switch them per command line they switch too.

BUT I receive the following errors:


Code:
[code]pi@raspi1:~ $ sudo pilight-control -d Relais-1 -s on
[May 05 18:24:05:766594] pilight-control: ERROR: /usr/local/lib/pilight/storage/json/settings.lua:405: config data table not properly initialized
[May 05 18:24:05:769001] pilight-control: ERROR: relay: no gpio-platform configured
[May 05 18:24:05:770857] pilight-control: ERROR: config device #6, invalid
[/code]

I tried to check wiringX with the following command:



Code:
sudo wiringx-blink raspberrypi1b+ 2
Writing to GPIO 2: High
Writing to GPIO 2: Low
Writing to GPIO 2: High
Writing to GPIO 2: Low


==> it works!

1.) Is the GPIO platform configured or not?

2. ) What can I do to eliminate the ERRORs?

3.) Furthermore I'd like to learn more about the device settings for "GPIO" and "Relay", I did not find them in the setting section of the pilight documentation.

It would be great if somebody could give me a hint what is wrong.

Thomas
 
Reply
#2
I'm not sure if the adhoc feature is properly implemented in the latest versions. I haven't tested that feature myself. Can you let me know if there are previous version that do work properly?
 
Reply
#3
(05-05-2020, 08:58 PM)curlymo Wrote: I'm not sure if the adhoc feature is properly implemented in the latest versions. I haven't tested that feature myself. Can you let me know if there are previous version that do work properly?

Hello curlymo,

no unfortunately not - I have not tried it with previous versions.

Is there somewhere some documentation about Relay or GPIO?
I tried to find it but i did not find a documentation like for the protocols with all the options.
I just found bits and pieces like under the "Structure" heading of the "Configuration - Devices" page.

Have a nice evening!
 
Reply
#4
If we focus on the first question. Do the relays work when using both pilight instances in a standalone manner.
 
Reply
#5
(05-05-2020, 09:59 PM)curlymo Wrote: If we focus on the first question. Do the relays work when using both pilight instances in a standalone manner.

Hello Curlymo,

Sorry for my late answer - I thought I have already answered ... strange.

However, I have made a config file for the 1b+ to run it in standalone mode with the relays only:

Code:
{
    "devices": {
        "Relais-1": {
            "uuid": "0000-b8-27-eb-06929c",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 2
            }],
            "state": "off"
        },
        "Relais-2": {
            "uuid": "0000-b8-27-eb-06929c",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 3
            }],
            "state": "off"
        },
        "Relais-3": {
            "uuid": "0000-b8-27-eb-06929c",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 4
            }],
            "state": "off"
        },
        "Relais-4": {
            "uuid": "0000-b8-27-eb-06929c",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 5
            }],
            "state": "off"
        }
    },
    "rules": {},
    "gui": {
        "Relais-1": {
            "name": "Relais-1",
            "group": [ "Aussen" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Relais-2": {
            "name": "Relais-2",
            "group": [ "Aussen" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Relais-3": {
            "name": "Relais-3",
            "group": [ "Aussen" ],
            "media": [ "all" ],
            "readonly": 0
        },
        "Relais-4": {
            "name": "Relais-4",
            "group": [ "Aussen" ],
            "media": [ "all" ],
            "readonly": 0
        }
    },
    "settings": {
        "port": 5000,
        "standalone": 1,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "log-level": 6,
        "whitelist": "xxx.xxx.xx.*",
        "stats-enable": 1,
        "watchdog-enable": 1,
        "gpio-platform": "raspberrypi1b+",
        "loopback": 0,
        "webgui-websockets": 1,
        "webserver-cache": 1,
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/webgui",
        "webserver-http-port": 5001,
        "webserver-https-port": 5002,
        "ntp-servers": [ "eu.pool.ntp.org", "uk.pool.ntp.org" ]
    },
    "hardware": {
        "433gpio": {
            "sender": -1,
            "receiver": -1
        }
    },
    "registry": {
        "webserver": {
            "ssl": {
                "certificate": {
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        },
        "pilight": {
            "version": {
                "current": "8.1.4"
            }
        }
    }
}

The result is a web interface, which allows switching of the relays.


If I use pilight-control commands  I receive:

Code:
pi@raspi1:~ $ sudo pilight-control -d Relais-1 -s on
[May 24 09:54:22:861017] pilight-control: NOTICE: no pilight ssdp connections found
pi@raspi1:~ $ sudo pilight-control -d Relais-1 -s off
[May 24 09:55:01:621001] pilight-control: NOTICE: no pilight ssdp connections found

The wiringx-blink command works (conformed by LED function).
Code:
pi@raspi1:~ $ sudo wiringx-blink raspberrypi1b+ 2
Writing to GPIO 2: High
Writing to GPIO 2: Low
Writing to GPIO 2: High

For me the hardware seems to work, but the pilight-control does not.

What do you think?

Best regards,
Thomas


Attached Files Thumbnail(s)
   
 
Reply
#6
It's clear right? pilight-control can't find the daemon. Either specify the server/port when using pilight-control of set the standalone directive to 0.
 
Reply
#7
(05-24-2020, 12:10 PM)curlymo Wrote: It's clear right? pilight-control can't find the daemon. Either specify the server/port when using pilight-control of set the standalone directive to 0.

Hello curlymo!

Thanks for the quick reply.

I specified server/port and the errors disappeared.


Code:
pi@raspi1:~ $ sudo service pilight stop
pi@raspi1:~ $ sudo service pilight start
pi@raspi1:~ $ sudo pilight-control -S xxx.xxx.xx.xx -P 5001 -d Relais-1 -s on
pi@raspi1:~ $ sudo pilight-control -S xxx.xxx.xx.xx -P 5001 -d Relais-1 -s off
pi@raspi1:~ $


BUT - the relays do not switch.
Switching via web interface still works.

I tried it with standalone 1/0 which makes no difference.

If I have set the standalone option to 0 the pilight-control command without server/port doesn't work


Code:
pi@raspi1:~ $ sudo pilight-control -d Relais-1 -s off
[May 24 12:40:12:431756] pilight-control: ERROR: /usr/local/lib/pilight/storage/json/settings.lua:405: config data table not properly initialized
[May 24 12:40:12:434143] pilight-control: ERROR: relay: no gpio-platform configured
[May 24 12:40:12:435885] pilight-control: ERROR: config device #1, invalid

Best regards!

Thomas
 
Reply
#8
Again, the error is clear. Configure an appropriate the gpio-platform.
 
Reply
#9
(05-24-2020, 05:17 PM)curlymo Wrote: Again, the error is clear. Configure an appropriate the gpio-platform.

Hello again,

I thought it is condigured with


Code:
        "gpio-platform": "raspberrypi1b+",

in the config.json.

Is there anything else to do?

Best regards,

Thomas
 
Reply
#10
Did you set it on the pilight-control side as well?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight switch node in node-red framp 0 86 06-24-2020, 10:01 PM
Last Post: framp
  Control Rules by Web GUI scootermacro 1 147 05-10-2020, 09:30 AM
Last Post: curlymo
  API Requests by HTTP from other devices fore use in pilight scootermacro 2 283 05-10-2020, 08:19 AM
Last Post: scootermacro
  pilight-send seems successful but doesn't actually send RF signal ayeyebrazov 37 2,646 03-31-2020, 01:02 PM
Last Post: curlymo
  pilight 8.1.5 not working on Raspberry pi after reboot beejayf 4 685 03-08-2020, 12:14 AM
Last Post: beejayf
  pilight cpu usage possibly associated with noticeable sluggishness? hepcat72 4 714 01-28-2020, 08:02 PM
Last Post: hepcat72
  apt.pilight.org stable Release' is not signed. thomasol 2 797 01-23-2020, 11:34 PM
Last Post: thomasol
  pilight and SIGNALduino cc1101 Caleus 0 550 01-19-2020, 09:13 AM
Last Post: Caleus
  filter stopped working after update to pilight 8.1.5 zlin50 19 1,737 01-03-2020, 02:15 PM
Last Post: curlymo
Question [Solved] Openweathermap with pilight 7.0-40 doesn't work Seebueb 2 685 01-01-2020, 06:45 PM
Last Post: Seebueb

Forum Jump:


Browsing: 1 Guest(s)