DoESLiverpool / somebody-should

A place to document practices on the wiki and collect issues/suggestions/to-do items for the physical space at DoES Liverpool
31 stars 11 forks source link

Update packages on doorbots #426

Closed johnmckerrell closed 7 years ago

johnmckerrell commented 7 years ago

We should update the packages on the doorbots, might even help them to be more resilient. I've done doorbot1, it took ages but seems to be working now. Simply needs:

sudo apt-get update
sudo apt-get dist-upgrade
johnmckerrell commented 7 years ago

Actually there's a further step to go from wheezy -> jessie as we need to do so I'll try that on doorbot1 on Thursday:

http://raspberrypi.stackexchange.com/questions/27858/upgrade-to-raspbian-jessie

I have a backup of doorbot1's SD card from before any of these upgrades, might do another one before this upgrade to jessie.

johnmckerrell commented 7 years ago

I ran this but then got called home. Just checked and it's still ongoing (it keeps asking to confirm when overwriting files) so just warning that I might not get to finish this.

johnmckerrell commented 7 years ago

And it seems it ran out of disk space. No longer on the network, I'm hoping because someone's fixing it. Simplest way to create space if it's actually booting may be sudo apt-get clean

johnmckerrell commented 7 years ago

I've uploaded the backup, it includes private data so I won't make the URL public. Ping me if you need to use it.

amcewen commented 7 years ago

Didn't have chance to do anything with the Pi, but it was actually still functioning okay when I left ~15 mins ago so the door should still be functioning. Will have a poke at it tomorrow or over the weekend (unless someone else gets to it first)

johnmckerrell commented 7 years ago

Great, I guess it's just fallen off the internet again, ho hum.

On 19 Jan 2017, at 22:12, Adrian McEwen notifications@github.com wrote:

Didn't have chance to do anything with the Pi, but it was actually still functioning okay when I left ~15 mins ago so the door should still be functioning. Will have a poke at it tomorrow or over the weekend (unless someone else gets to it first)

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/DoESLiverpool/somebody-should/issues/426#issuecomment-273915173, or mute the thread https://github.com/notifications/unsubscribe-auth/AABqa4dajmovN_WG5nmZddnKl4yCfpRfks5rT9_CgaJpZM4Ll7YD.

amcewen commented 7 years ago

Yeah, it had fallen off the Internet. Sadly a reboot completely failed, presumably because there are 0 bytes free on the SD card...

I'm going to swap the SD card for one from the Ultimaker 2 (as that's a 16GB, and we aren't going to need that much space for gcode files). Can you ping me with the backup details?

amcewen commented 7 years ago

Doorbot1 has been restored from backup. I'll try the upgrade sometime over the weekend when I'm in

amcewen commented 7 years ago

I've done the dist-upgrade as well now, so doorbot1 is up to date.

johnmckerrell commented 7 years ago

As discussed I think we should wait for a while, maybe 7 days, to see if this has improved the uptime. If not then there's no rush to do it on the other devices.

amcewen commented 7 years ago

It hasn't improved the uptime, and it's also not finished :-( Rebooted doorbot1 today to get it back on the network, which worked, but neither the welcome screen nor the logcards came up. From a quick poke around it seems to be issues with gems, presumably because the version of ruby has changed. So doorbot1 is currently broken

johnmckerrell commented 7 years ago

I got log cards working again yesterday by reinstalling bundler (with sudo gem install bundler IIRC), I guess the /usr/local/bin/bundle was pointing at the old gems, reinstalling fixed that. Screen still not working, probably just going to wait for @amcewen 's new build.

amcewen commented 7 years ago

Doorbot1 has now been migrated to the ansible provisioning system (see https://github.com/DoESLiverpool/doorbot-setup/issues/18#issuecomment-277037555). The initial burning an image to SD and setting up ssh keys takes ~15 minutes, and the remaining provisioning system takes just over an hour (without any user interaction, assuming everything goes to plan).

amcewen commented 7 years ago

Doorbot1 seems to be running okay, but the screen blanks out after a while :-( There should be stuff in /home/pi/.config/lxsession/LXDE-pi/autostart (and /etc/xdg/lxsession/LXDE-pi/autostart) to turn off the blanking, but neither seem to be having the desired effect.

amcewen commented 7 years ago

I've built the new ansible-based Pi image for doorbot2 too, but the RFID reader wasn't working when I deployed it to the Pi on the workshop door. I tried switching RFID reader, in case it was the wiring to that causing the problem, but it didn't make any difference.

For now, I've swapped in a Pi3 of mine (to go with the RFID reader of mine) and that's working. Could be a problem with running on an old Model A, but at least there's a bit of time to investigate.

(Actually, @johnmckerrell, can I swap in one of those spare Pi2s? That'll let us add the i2s DAC board to get ringtones on the kitchen door too then - the i2s interface isn't on the shorter pin set of the original Pis)

johnmckerrell commented 7 years ago

Feel free, on the windowsill next to my desk.

-- Sent from my mobile phone hence brevity and errors

On 2 Feb 2017, at 23:22, Adrian McEwen notifications@github.com wrote:

I've built the new ansible-based Pi image for doorbot2 too, but the RFID reader wasn't working when I deployed it to the Pi on the workshop door. I tried switching RFID reader, in case it was the wiring to that causing the problem, but it didn't make any difference.

For now, I've swapped in a Pi3 of mine (to go with the RFID reader of mine) and that's working. Could be a problem with running on an old Model A, but at least there's a bit of time to investigate.

(Actually, @johnmckerrell, can I swap in one of those spare Pi2s? That'll let us add the i2s DAC board to get ringtones on the kitchen door too then - the i2s interface isn't on the shorter pin set of the original Pis)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

amcewen commented 7 years ago

I've fixed the problem with it running on a Pi 1 (https://github.com/DoESLiverpool/simple_sl030_rfid_reader/commit/fcf316cc107ea21be91caa533f89ba7a87778fcc) and deployed the code onto Doorbot3. It doesn't have any of the Kindle integration on it, but that's not in the original scripts either. I've got a copy of the old Doorbot3 SD card if anyone wants to tease bits of the Kindle integration from it (when someone gets round to looking at #137)

For Doorbot2 we need to check the wiring on the old RFID reader which is on my desk, put it back into use if it's okay, swap the Pi3 for one of @johnmckerrell's Pi2s, add a soundcard and speaker (and reinstate /etc/asound.conf, which I'd moved so the scripts didn't hang on playing sound out of non-existent hardware). I've got a soundcard and speaker to use, so give me a shout if you want to do it before I get time to.

amcewen commented 7 years ago

Checked the wiring for the old RFID reader, and it doesn't seem to be working, so we cut an extra spacer for the RFID cover at #makernight this evening. Currently glued up and drying next to Gerald's PC.

Also tried the Pi2, but for some reason that wasn't working with the software on the SD card currently in the Pi3 in use on the doorbot. I'll have a play with the software on a separate SD card on the Pi2 and see if I can sort it out, rather than mess with the currently-working setup on the doorbot itself.

amcewen commented 7 years ago

I've rebuilt an image for doorbot2 and that works fine with a Pi2. I've now installed the Pi2, along with the i2s DAC/amp, so we've now got ringtones/welcome messages on doorbot2.

The RFID reader needs yet another spacer - I've cut one and the glue is drying on it now...

amcewen commented 7 years ago

RFID reader cover now installed - https://www.instagram.com/p/BQuqMLego0-/ - so I think we're done with this.