Notifications
Clear all

Endless Raspbian Linux 10 updates  


VE1DX
(@ve1dx)
Estimable Member
Joined: 1 year ago
Posts: 136
Topic starter  

How often do forum members update your Raspberry Pi O/S?  It seems like Debian-based Raspbian Buster 10 has a dozen a week!  Worse than Windows, and that's saying something! ?  A lot are trivial, but if they are kernel or eprom related, they require a reboot.  I know it's a relatively new release, but Linux ought to be more stable than that, in my view.  I run a CentOS system that only needs updates every 6-8 weeks.  It's the mature version of RedHat, so that makes sense, but surely Raspbian must be settling down after 6 months at level 10. 

Applying updates always is a balance between stability and security, and my "production" weather website is running on a Pi 4.  It's a pain to have to reboot it every week or two.  Seems to me the uptime ought to be 4-8 weeks, not 4-8 days!  Sigh. Maybe I ought to forget it and apply them a couple of times a year.  ?

Paul VE1DX


Quote
ZeFerby
(@zeferby)
Reputable Member
Joined: 1 year ago
Posts: 380
 
Posted by: @ve1dx

It's a pain to have to reboot it every week or two. 

For mi Octopi I only update when I feel like it...It is not reachable from outside the local LAN, so I don't apply each and every update at once.

Eric


ReplyQuote
VE1DX
(@ve1dx)
Estimable Member
Joined: 1 year ago
Posts: 136
Topic starter  

@zeferby

Actually not a bad solution.  I now want to try that with one that's unexposed to the Internet hackers and see how long I could keep it going.  If it were on a UPS, I bet the uptime could be years.  I recall we had a SUN Solaris system in the mid-1990s going for over a year. 

The only reason to update a stable system is security updates if you are not adding things to it that need some feature contained in an upgrade package.  We get 2-3 power outages a year here, so I'd need a small UPS to do that.  I think one could get one that supplies a few amps at a reasonably low price. Exciting experiment to try!

Paul VE1DX


ReplyQuote
ZeFerby
(@zeferby)
Reputable Member
Joined: 1 year ago
Posts: 380
 
Posted by: @ve1dx

If it were on a UPS, I bet the uptime could be years.

Barring memory leaks ? ...given the number of packages we usually rely on, it may well be an issue for some of them.

Eric


ReplyQuote
VE1DX
(@ve1dx)
Estimable Member
Joined: 1 year ago
Posts: 136
Topic starter  

https://raspi-ups.appspot.com/en/hardware.jsp

Screen Shot 2020 02 18 at 10.40.57 AM

I wonder if this is just a make-work project.  It would be interesting to see if a Pi could be kept going for 1-2 years if it were just on a LAN.

Paul VE1DX


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 389
 

I have a Pi 2 to which I have a z-wave controller board attached and it also runs a mqtt broker all running on raspian jessie.  As all works OK and I don't want anything to break, especially the z-wave software of some vintage I have not updated it for years and don't intend to either.   Its been up and running for years, and always comes right back up from the relatively frequent power cuts I have been experiencing.  

For my other pi's I do periodic updates and upgrades as and when the whim takes me and theres always a bunch of stuff that gets updated.  The analogy to updating Windows is a bit misleading as most of the updates on Linux are to do with the host of libraries that are included in the distribution and a Windows update does not update all the programs you may have installed.  I cant remember the last time a raspian update needed a reboot (linux version updates excepted of course) and theres no need to do an update just for the sake of it.  It is recommended to bring everything up to date before adding new software and I usually do this, as well as at other times just for the hell of it, but if its all working theres no need to fix it.

 

 


ReplyQuote
VE1DX
(@ve1dx)
Estimable Member
Joined: 1 year ago
Posts: 136
Topic starter  

@byron

That's neat!  I had to Google Z-wave to find out what it was, and it sure sounds like a secure, stable way to automate/control things.  I gather it's more or less Amazon Echo and Google Home on steroids with no one collecting your private data.  Did you write most of the software yourself?  It looks like a whole new aspect of computing/electronics I've never explored.  How long have you been doing this?  I'd be interested in a short description of your setup if you have the time.

Posted by: @byron

most of the updates on Linux are to do with the host of libraries

That's true for the most part, but if I see the word "kernel" in the packages, I do a reboot.  If you don't, it has to keep using the old kernel.  The only way I'm aware of to ensure a Linux kernel update is used is to reboot.  I think there might be programs and workarounds to "slide" the new kernel in without rebooting, but I was told doing so is analogous to paving a highway with the traffic running back and forth.  I don't know if that's a good comparison, but it's how I think of it.  Also, reboots now and then fix memory leaks and other strange behaviour that occurs over time on a busy system.  My post above was to ponder if it made sense to try to extend a mostly idle Pi's uptime as long as possible.

In my view, Windows and Microsoft have evolved into an entity that takes too much control of your system, and it's never quite clear what their updates do.  I keep one system going because there are a couple of programs that I need that only run on Windows.  However, it's turned off most of the time.  I don't like mystery software without release notes taking control of my computer, but it's a necessary evil occasionally!  That said, Windows is used by the majority of computer users worldwide, so their business model works. ? 

Paul VE1DX


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 389
 

@ve1dx

The z-wave controller board I use is the original version of the raZberry board.  A link to a more recent and probably more advanced versions is http://razberry.zwave.me.  It comes with software to control the board and it has an API so you can use it from Python programs running on the RPi.

It was my first go at home automation some while ago and it still controls some lights and power sockets and a solitary radiator valve.  However I have since decided to use wifi for the home automation network especially as the mesh wifi routers have evolved.  I also extended my wifi reach with some routers at the end of long stretches of ethernet cable I put in when I had power cables put in to some outbuildings and some external wifi access points.   I'm currently experimenting with sonoff wifi switches with Tasmota Firmware for mains power switching.  I don't allow the likes of google or alexa on my wifi, nor do I allow any external access via the internet to control anything in the house.  I may do this later, but I endeavour to have enough algorithms in my control programs not to need remote access. (and I'm still endeavouring ? )

 

 

 


ReplyQuote
VE1DX
(@ve1dx)
Estimable Member
Joined: 1 year ago
Posts: 136
Topic starter  
Posted by: @byron

The z-wave controller board I use is the original version of the raZberry board.  A link to a more recent and probably more advanced versions is http://razberry.zwave.me. /a>  It comes with software to control the board and it has an API so you can use it from Python programs running on the RPi.

I just read the info on the link you provided, @byron, and it's impressive.  Your setup sounds good and I like the idea of doing it yourself.  You know what the software and hardware are doing because you configured it and wrote the code.  Having some other person, large corporation or government monkeying around with one's appliances and data is never a good idea.  We preach this to those who are less computer savvy, and we get the same old refrain: "If you have nothing to hide, what does it matter?"  It might not matter now, but who's to say if that will be the case in a few years.

That's slick being able to even control devices and have access from buildings on your property as well.  All and all an impressive project.  I have so many things on the go right now I don't know when I can get at this, but it makes more sense than trying to keep a Raspberry Pi going (doing nothing) indefinitely just because it seems possible.  How good is your Python?  Or more to the point, could someone like me with a strong 3GL background (FORTRAN, Pascal, various assembly plus some fairly extensive C) get up to speed?  I can do basic stuff in Python, but I've only dabbled in it. 

If I may ask, are you a professional Python programmer or a hobbyist when it comes to that language?  How hard is it to interface the API to Python coding necessary to more or less replicate your device and appliance control?

I agree with keeping Amazon, Alexa, Apple and even Microsoft at bay as long as practical.  The world is changing and we might end up having to join the collective, but not yet!  ? 

Paul VE1DX


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 389
 
Posted by: @ve1dx

How good is your Python?  Or more to the point, could someone like me with a strong 3GL background (FORTRAN, Pascal, various assembly plus some fairly extensive C) get up to speed?  I can do basic stuff in Python, but I've only dabbled in it. 

As you have learned programming in the past, including assembly and C you will very soon get up to speed with Python.  I did C programming way back in the seventies for a few years, and had a few years programming in Visual Basic in the eighties or maybe it was the early nineties as a contractor for a couple of years, but for most of my working life I was not a hands on programmer.  When I retired in my early sixties I started mucking about with electronics, arduinos and Rpi's.  I learnt Python as I had the Rpi and its my favourite language to use.   To get up to speed see some of the Corey Schafer youtube videos.  His python beginner series will soon have you at a comfortable level and he does many more advanced videos as well.

The z-wave API is a web based API and to use it from python you can use the requests library (Corey Schafer has a few videos on its use).  But of course you can use the API from C if you prefer to go that way.

The z-way API provided with the raZberry z-wave board is very easy to use whether via C or python.

 


ReplyQuote
VE1DX
(@ve1dx)
Estimable Member
Joined: 1 year ago
Posts: 136
Topic starter  
Posted by: @byron

To get up to speed see some of the Corey Schafer youtube videos.  His python beginner series will soon have you at a comfortable level and he does many more advanced videos as well.

The z-wave API is a web based API and to use it from python you can use the requests library (Corey Schafer has a few videos on its use).  But of course you can use the API from C if you prefer to go that way.

The z-way API provided with the raZberry z-wave board is very easy to use whether via C or python.

 

Thanks for the tips, @byron.  I shall have a look at the videos you referenced.  I think becoming fluent in Python is a must today if one wants to be serious about programming.  At least that's the way the industry seems to be going.  There are still pockets of FORTRAN around because it's a huge job to convert it to another language, but I'm pretty sure all new stuff is being written in Python and C++, and perhaps in Java.  I haven't been involved in the software industry for a number of years and things change fast.  We have to keep up or we won't be able to use the new technology.

I have to get rid of some slush (we had about 5-8 cm of snow overnight and now it's raining.)  If I leave it, it'll freeze into concrete as the temperature is predicted to fall to -10 C tonight.  You can see much of my back yard in the photo on my website in my signature if you are interested in the mess we have!  Again, thank you for the Z-wave and Python information.  ? 

Paul VE1DX


ReplyQuote
Hunter O'Gold
(@hunterogold)
Eminent Member
Joined: 11 months ago
Posts: 23
 

For a robot, you won't need to update frequently, or maybe not ever. It's a choice.

I update Linux on my pi (3B+) about once a week. I am using a downgraded Ubuntu (disabled Mate GUI) mainly because I intend to use the pi4j (library) to program the intelligence in my robot.

The simplest solution is probably correct.


ReplyQuote
VE1DX
(@ve1dx)
Estimable Member
Joined: 1 year ago
Posts: 136
Topic starter  
Posted by: @hunterogold

I update Linux on my pi (3B+) about once a week.

I agree and do the same on all systems exposed to the Internet.  Anything on the LAN with no visibility to the outside world is a "whenever", if at all.  Most of my career was devoted to being a system administrator for large corporate networks, and no systems were allowed on those networks unless they were patched up to date and running anti-virus software (the Windows systems especially.)  I had to put out a few "virus fires" because a couple of users figured out how to disable the anti-virus software.  Why? They claimed it slowed their systems down.  Reformatting their disks, re-installing their operating systems and recovering their data from backups was the consequence of their attempts to recover a 1-2% speed loss! ? 

The answer to this question is "it depends."  If it's inside the LAN, on a stand-alone robot who cares?  If they are open to the Internet, I believe the updates are necessary, even though they are a nuisance.

Paul VE1DX


ReplyQuote
jBo
 jBo
(@jbo)
Active Member
Joined: 2 months ago
Posts: 14
 

@ve1dx

Paul, Byron,

Good comments on understanding and controlling our own home hardware. I've installed about a dozen Sonoff switches, and love it, but only after understanding what's going on. I looked at open source options, then flashed the devices with Tasmota firmware. As well as being independent from robot overlords, the strictly local approach paid off right away. After installing and testing the switches (using Home Assistant, also open source), I got to impress my wife when I gave her the interface. About a week after that, we had a sustained outage of our Internet service from <your favorite ISP here>. Imagine my embarrassment after I had "improved" our house yet couldn't turn the lights on or off!  😭  Local is better.

Regarding the experience of a programming with a long, strong background in 3rd generation languages (3GL), that is exactly me, too, so you're in good company. With me it was FORTRAN, Pascal, various assembly plus some fairly extensive PL/I, a little C. Then it was 25+ years in a procedural language in an integrated database development environment, non-SQL and non-HTML based. After retiring, I wanted to get back to my own "programming roots."

So what's changed? And can I still do it? Well, for starters, back in the day, if I needed code I wrote the code. Oh, I might ask my technical lead, don't we already have this code, if he had the time, and he would either say no, that's why I assigned it to you. Or, he would give me a blank look, as if searching . . . something. Needless to say, we had no Internet then, nor DuckDuckGo to search. So little in the way of convenient libraries, APIs, RESTful Web hooks and so on; and if there were, it was hard to find them. So, I wrote integer multiply routines for chips less powerful than Arduino, EBCDIC to ASCII conversion, other endless conversions, byte swapping. I wrote two text editors, and a simple graphing routine for plotting data over time.

What's the point? Nowadays, I write as little as possible. My thought is that somebody out there has already done XYZ, so I should put reasonable effort into finding and evaluating their code. In terms of me exploring and making useful things out of Arduino, sensors and Raspberry Pis, my best approach is to find good pieces and glue them together in order to realize my ideas.

For Python specifically, the transition hasn't been too hard. That is, nothing I've seen blows my mind or confounds me utterly, like, say, reading 3 lines of Haskell. The syntax of Python is rather nice, I think, and makes it overall more likely to catch coding errors earlier rather than later. Your mileage may vary, but I just remind myself, more colons, fewer semicolons. 😊 

Thanks,

John


ReplyQuote