• 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
pilight7 from Stable --> Nightly
My installation/upgrade from v.7 Stable to Nightly doesn't report an error, but starting with 'service pilight start' fails. Also 'sudo' doesn't help! It says:
[FAIL] Starting : pilight failed!
Any idea what's wrong?

Here some listings/logs:
cat /etc/apt/sources.list.d/pilight.list has:
deb http://apt.pilight.org/ stable main
deb http://apt.pilight.org/ nightly main

--2016-01-17 17:01:46--  http://apt.pilight.org/pilight.key
Resolving apt.pilight.org (apt.pilight.org)...
Connecting to apt.pilight.org (apt.pilight.org)||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1711 (1.7K) [application/pgp-keys]
Saving to: `STDOUT'

100%[==============================================================================>] 1,711       --.-K/s   in 0s      

2016-01-17 17:01:46 (17.9 MB/s) - written to stdout [1711/1711]

Hit http://apt.pilight.org stable Release.gpg
Hit http://raspberrypi.collabora.com wheezy Release.gpg                                                                
Get:1 http://apt.pilight.org nightly Release.gpg [473 B]                                                              
Hit http://mirrordirector.raspbian.org wheezy Release.gpg                                        
Hit http://archive.raspberrypi.org wheezy Release.gpg                
Hit http://raspberrypi.collabora.com wheezy Release                  
Hit http://mirrordirector.raspbian.org wheezy Release
Hit http://apt.pilight.org stable Release      
Hit http://archive.raspberrypi.org wheezy Release
Get:2 http://apt.pilight.org nightly Release [3128 B]
Hit http://raspberrypi.collabora.com wheezy/rpi armhf Packages
Hit http://mirrordirector.raspbian.org wheezy/main armhf Packages    
Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages  
Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages                    
Hit http://apt.pilight.org stable/main armhf Packages                                    
Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages                          
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en                            
Ign http://apt.pilight.org stable/main Translation-en                                    
Hit http://archive.raspberrypi.org wheezy/main armhf Packages                              
Get:3 http://apt.pilight.org nightly/main armhf Packages [17.4 kB]                        
Ign http://archive.raspberrypi.org wheezy/main Translation-en                                                  
Ign http://apt.pilight.org nightly/main Translation-en                                                        
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en                    
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en  
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Fetched 21.0 kB in 16s (1281 B/s)                                                                                      
Reading package lists... Done
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
Suggested packages:
  php5-cgi pilight-firmware
The following packages will be upgraded:
  pilight pilight-webgui
2 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
Need to get 0 B/6745 kB of archives.
After this operation, 83.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_TIME = "de_DE.UTF-8",
        LC_MONETARY = "de_DE.UTF-8",
        LC_ADDRESS = "de_DE.UTF-8",
        LC_TELEPHONE = "de_DE.UTF-8",
        LC_NAME = "de_DE.UTF-8",
        LC_MEASUREMENT = "de_DE.UTF-8",
        LC_IDENTIFICATION = "de_DE.UTF-8",
        LC_NUMERIC = "de_DE.UTF-8",
        LC_PAPER = "de_DE.UTF-8",
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 81339 files and directories currently installed.)
Preparing to replace pilight-webgui 7.0 (using .../pilight-webgui_7.3_armhf.deb) ...
Unpacking replacement pilight-webgui ...
Preparing to replace pilight 7.0 (using .../pilight_7.0.59-g6f3a679_armhf.deb) ...
Unpacking replacement pilight ...
Setting up pilight-webgui (7.3) ...
Setting up pilight (7.0.59-g6f3a679) ...

Just to add, also a "clean" deinstall of pilight doesn't help!
Check the output of running pilight in debug mode:
sudo pilight-daemon -D
Sorry, I had to install back to Stable and reinstalling the Nightly ... surprise surprise ... it works!

Don't ask why, think I took the same steps ... but?
One step further.

After installing the development version I need to check the version number.
At the console it's done with sudo pilight-daemon -V, but I need to call it from a python script.
Calling like this on the python console
>>> os.system("sudo pilight-daemon -V")
pilight-daemon version v7.0-59-g6f3a679
shows the version, but how to get that version string? Can only get the '256' which isn't relevant here.

Or is there a better, maybe REST call to get that version string.
Any idea?

After installing Nightly only I get the same -V response
pilight-daemon version v7.0-59-g6f3a679

So how to identify if the stable, nightly, development version is in use?
I need a clear differentiator here.
Any idea ?

Because some API's are different for the piliight versions, add-on development has to identify that installation type to work correctly!

Quote:So how to identify if the stable, nightly, development version is in use?
A clear differentiator is required here.
If a development version and a nightly version have the same version string, they are also the same code running, and will therefore use the same API.

You need to find the commits with which changes in the API were introduced and compare that to the version string that you get from pilight. Then you will know which API version to use.
Thanks, sorry, it only helps partially ...

(01-19-2016, 12:43 PM)pilino1234 Wrote: If a development version and a nightly version have the same version string, they are also the same code running, and will therefore use the same API.
Sounds good, if the string part extensions indicating for a nightly or dev are the same, that's one point. And to differentiate between nightly and dev in case they are different, which of them has a "higher" string detail .. in the hope they iterate up with "change" date.
Is there such a logic?

Quote:You need to find the commits with which changes in the API were introduced and compare that to the version string that you get from pilight. Then you will know which API version to use.
Understand, with an add-on --- like piSchedule -- I should know the version and it's API changes. Only with that detail the add-on can switch between api version during runtime. Think about the /send? (v7.0 and below) and /control? (nightly?/dev!) change.
Users expect to run newest version of piSchedule ontop of pilight dev. With knowing the version I can use the one or the other, without I need to have different piSchedule versions which doesn't makes sense.

Hope you understand the background and can point to a runtime solution here.
The minor version number gets bumped by 1 every commit, see the manual: https://manual.pilight.org/en/faq#pf1
I believe the example should clarify what I meant, especially the last paragraph on the first page.
Ok, that's clear and states how the string would be with the call pilight-daemon -V at the console. Well known Angel.
But scroll back to post #4 and see the code box. Finally that's the problem here.

And yes, it's phyton code, but I'm not able to get the string .. only the number .. as said that's irrelevant!

If you can tell me how to catch that string (!) using bash, I hope that helps.
Try using subprocess to spawn child processes from python scripts, rather than os.popen (which is deprecated). IIRC, it puts all the output of the command into a given variable, which you can then process.
The return value of os.system is "the exit status of the process encoded in the format specified for wait()" according to the docs (https://docs.python.org/3/library/os.html#os.system), so that's not really what you are looking for.

This is what you need: https://docs.python.org/3/library/subpro...onstructor

Edit: Actually, what you need is subprocess.check_output(command), which will give you the output of the command.
def getRPItemperature():
    command = "vcgencmd measure_temp"
    output = check_output(command, shell=True)
    CPUtemp = output[5:-3]
    return CPUtemp

Possibly Related Threads...
Thread Author Replies Views Last Post
  Nightly versions less than 8.1.5-59 missing? felfert 5 940 07-13-2021, 09:38 PM
Last Post: Emiks5
Lightbulb working MQTT in version v8.1.5-nightly-1af4c284 fleisch 1 686 12-28-2020, 05:04 PM
Last Post: psbest
  apt.pilight.org/dists/stable/main/binary 301 Moved Permanently Rschnauzer 6 861 11-23-2020, 01:49 PM
Last Post: Rschnauzer
  stable/nightly Release is no longer signed DSLeX 1 981 05-14-2020, 01:09 PM
Last Post: peteratoce
  MQTT cannot be disabled on nightly image ayeyebrazov 5 1,045 05-01-2020, 03:11 PM
Last Post: ayeyebrazov
  apt.pilight.org stable Release' is not signed. thomasol 2 1,955 01-23-2020, 11:34 PM
Last Post: thomasol
  hardware module issues in nightly apartmedia 17 5,083 04-05-2019, 06:59 PM
Last Post: curlymo
  Update to v8.0.10-nightly-a1279212 Ulrich.Arnold 3 2,321 06-04-2018, 08:31 PM
Last Post: curlymo
  Updates for nightly Ulrich.Arnold 1 1,349 01-26-2018, 07:31 PM
Last Post: curlymo
  Help: switch a gpio switch with webcontrol on pilight stable segalion 7 4,536 07-31-2016, 03:32 PM
Last Post: playerhot

Forum Jump:

Browsing: 1 Guest(s)