• 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
#1
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:
Code:
[FAIL] Starting : pilight failed!
Any idea what's wrong?


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

Code:
--2016-01-17 17:01:46--  http://apt.pilight.org/pilight.key
Resolving apt.pilight.org (apt.pilight.org)... 94.124.143.207
Connecting to apt.pilight.org (apt.pilight.org)|94.124.143.207|: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]

OK
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:
  pilight-webgui
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!
Surprised
 
Reply
#2
Check the output of running pilight in debug mode:
Code:
sudo pilight-daemon -D
 
Reply
#3
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?
 
Reply
#4
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
Code:
>>> os.system("sudo pilight-daemon -V")
pilight-daemon version v7.0-59-g6f3a679
256
>>>
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.
 
Reply
#5
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.
 
Reply
#6
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.
 
Reply
#7
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.
 
Reply
#8
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.
 
Reply
#9
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.
 
Reply
#10
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.
Code:
def getRPItemperature():
    command = "vcgencmd measure_temp"
    output = check_output(command, shell=True)
    CPUtemp = output[5:-3]
    return CPUtemp
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  hardware module issues in nightly apartmedia 17 1,059 04-05-2019, 06:59 PM
Last Post: curlymo
  Update to v8.0.10-nightly-a1279212 Ulrich.Arnold 3 1,187 06-04-2018, 08:31 PM
Last Post: curlymo
  Updates for nightly Ulrich.Arnold 1 530 01-26-2018, 07:31 PM
Last Post: curlymo
  Help: switch a gpio switch with webcontrol on pilight stable segalion 7 2,949 07-31-2016, 03:32 PM
Last Post: playerhot
  how to complete remove nightly terrar 8 5,373 04-03-2016, 07:04 PM
Last Post: mvasi90
  new install fails - dev/nightly gneandr 11 9,163 01-29-2016, 11:30 AM
Last Post: WEBcast
  [v7.0 > v...] Errors with the latest nightly curlymo 20 6,453 07-27-2015, 02:37 PM
Last Post: diman87
  Rest API in nightly Image seems not to work spooniester 2 1,976 06-25-2015, 10:07 AM
Last Post: spooniester
  "... stable main" no such file or directory Liquidstone 2 1,065 06-18-2015, 07:22 PM
Last Post: Liquidstone
  [v6.0 > v7.0] Errors with the latest nightly curlymo 153 36,167 05-23-2015, 10:55 PM
Last Post: koos147

Forum Jump:


Browsing: 1 Guest(s)