• 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 modify values
I want to use the pilight-control program to change values on weather stations. The pilight manual says I should be able to modify values of a device:

Quote:pilight-control is a tool to control a device configured in a pilight daemon configuration. It supports switching the state and/or modifying other values (such as dimlevel, temperature, or humidity) of the device.

When I run
pilight-control -d Tempsens2 -v temperature=20
I would expect the temperature value of my weather station named Tempsens2 to be set to 20, but I get this error message as if I used the pilight-control program incorrectly:
Usage: pilight-control -d device -s state

When checking in the source code I see that the command line option "state" is mandatory, but a weather station does not have a state I can set:

if(device == NULL || state == NULL ||
       strlen(device) == 0 || strlen(state) == 0) {
        printf("Usage: %s -d device -s state\n", progname);
        goto close;

How is this "modifying other values" supposed to work? Or did I just find a bug?
Does it work when you remove that check in the source?
(09-17-2019, 09:01 PM)curlymo Wrote: Does it work when you remove that check in the source?

Don't know. Would have to look into compiling this binary first....

I can test it if someone can send me the binary.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Bug: double free or corruption in pilight-send blackzombie 12 101 10-07-2019, 08:15 PM
Last Post: blackzombie
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 131 08-13-2019, 05:43 PM
Last Post: curlymo
  pilight Nano USB interface curlymo 228 97,057 07-10-2019, 06:14 PM
Last Post: curlymo
  problems compiling pilight on Odroid C2 WitchDoctor 101 9,705 03-14-2019, 09:01 PM
Last Post: curlymo
  pilight 8 what chages for custom protocols? polo 11 2,889 02-15-2019, 06:22 PM
Last Post: polo
  pilight-debug shows nothing minhdomanh 3 539 10-18-2018, 07:01 AM
Last Post: felfert
  pilight-send and pilight-daemon DieterK 0 554 06-20-2018, 12:44 AM
Last Post: DieterK
  Lights not switched on or off by rules in pilight 8.1.0 rorie 22 2,485 06-12-2018, 03:56 PM
Last Post: curlymo
  check API in pilight 8 stratege-0815 4 1,393 02-11-2018, 09:34 AM
Last Post: stratege-0815
  pilight-receive terminates zackdvd 8 1,651 12-30-2017, 09:07 PM
Last Post: curlymo

Forum Jump:

Browsing: 1 Guest(s)