Difference between revisions of "MDRS:HAL Development Log"
Line 1: | Line 1: | ||
− | [[File:HAL.png|none|thumb|238x238px|HAL]] | + | [[File:HAL-Base.png|none|thumb|238x238px|HAL]] |
+ | |||
==Development Log of the MDRS Habitat Activity Lexica (HAL)== | ==Development Log of the MDRS Habitat Activity Lexica (HAL)== |
Revision as of 11:40, 16 October 2018
Contents
Development Log of the MDRS Habitat Activity Lexica (HAL)
Developers: James Burk, Ryan Watson, Matt Hopson (MarsChat)
Operating System
Ryan Watson: I have a beta Raspberry Pi image that I've posted up on S3 and I want to invite you to download, write to your SD card and give it a try. It has a very sparse selection of apps:
- Chromium (Can be changed to Firefox, defaults to Chromium so left it alone for now)
- VLC
- Libreoffice (Default in the base image)
- OMX
Users
Default pi user still in effect as admin. Likely disable but not delete, due to potential future needs of having that standard user.
There are two baked in users, an administrative user for possible future tasks and a workstation user:
- U: `admin` / PW: `get_to_mars` - U: `mdrs` / PW: `get_to_mars`
Current Issue List
10/13:
- Hostname should be "hal"
- when installing software, it asks for pi or root password (our accounts not listed). Since I didn't know either of them, I had to reset using sudo passwd pi with admin account.
Earlier
- need to fix sudoers, still is expecting the default `pi` user
- command to disable: sudo passwd --lock pi
- Add Mars related wallpaper by default
- Fixup timezone, initial / ongoing time sync via ntp. Currently defaults to UTC
- Password is currently set during the image build / provision. Can / should be more dynamic
- Dual displays with HDMI output as primary
- add "display_default_lcd=0" to /boot/config.txt
Install walk-thru
The end goal is to write the boot image file to an SD card, configured to boot a Raspberry Pi. There are several possible workflows possible using OSX, Linux or Windows. I will detail a Windows based workflow below and add others as necessary.
Windows 10
1) Download artifact from S3
The zip file artifact is currently located at https://s3.amazonaws.com/watson-builds/image_2018-10-03-razpi-modz-v.5.2.zip and downloadable via browser or other tool.
2) Install image writer utility
I found via the Raspberry Pi forums a utility called etcher written and hosted by resin.io, an IoT company. The utility is straightforward and easy to use. There is no need to extract the img file from the downloaded zip file. This utility can accept the compressed file and write to an SD card.
Download: https://etcher.io/
3) Insert SD card
Before starting Etcher it is helpful to insert the SD card then start the application.
4) When the application is open navigate to the download location and select the still compressed .zip file
5) The SD card should already be selected, if not choose the correct target SD card drive.
6) Flash!
Etcher will begin to write the image to the card. In testing this typically takes about 15 minutes. During the process Windows will notify that the drive has been ejected, or that the card needs to be formatted before use etc. Cancel or dismiss these messages and let Etcher continue. After the write is complete it will verify the write and then software eject the SD card (unmount it from the computer). You can now remove the SD card and place into the RaspberryPi.
Setting up Python/Kivy
Will be using the Kivy package to output to the RPi Touchscreen. We need to be using latest Python 2 (not 3) for this.
1. Download & Configure/Make Python2
wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz sudo tar xzf Python-2.7.15.tgz cd Python-2.7.15 sudo ./configure --enable-optimizations sudo make -j -l 4 sudo make install python -V
2. Create virtualenv named "halenv"
virtualenv ~/halenv source halenv/bin/activate
3. Update PIP
pip install --upgrade pip
4. Install Cython
pip install Cython
5. Install Kivy
7. Test that it works.
Note: to output Kivy apps to the RPi touchscreen, use:
export VC_DISPLAY=4 call (["export VC_DISPLAY=4"], shell=True)
Weather API
Exact API calls to return JSON - cache it and only call 1x per hour.
Current conditions http://api.openweathermap.org/data/2.5/weather?id=5540148&APPID=cd14c2a1a96fc217b8b23c10d60abada
Forecast http://api.openweathermap.org/data/2.5/forecast?id=5540148&APPID=cd14c2a1a96fc217b8b23c10d60abada
Description of JSON (under heading: "Weather parameters in API respond")
Bandwidth Monitor / Wifi at Hab
Bandwidth Monitor
Use Kivy Bar Graph
Show stats on:
- Plan Allowance (MB per day)
- Allowance Remaining (MB)
- Allowance Remaining (%)
- Time until Allowance Refill
Wifi Password
You will be able to connect with HughesNet wireless within the Hab using either:
SID: Science pw: ScienceDog or SID: MarsHab pw: SpaceDog
Check under the router itself.