Friday, February 10, 2017

Kevin's Weather Clock

I've been wanted to get a Raspberry Pi 3 for a few months now and over Christmas I got a starter kit. Of course this gave me the impetus to do something with it. Coming up with a basic first project was the tricky part. First, I thought about a few complicated things and then decided that a clock would be a good first project. After thinking more about it, maybe a clock that showed the current weather would be a good first project.

So I did some research and decided on the following parts.
  • Raspberry Pi 3 Starter kit (32GB, 2.5A powersupply)
  • Official RPi 7" touchscreen
  • Eleduino Bamboo Touchscreen case 
  • Rii K12BT Bluetooth keyboard (optional)
Putting the unit together was pretty easy, I have done a lot of computer building over the years and this was only difficult because the parts are small.


I decided that for the software side I wanted to use NodeJS. I hadn't done much with it at the time so I made a simple website and did most of the data retrieval using client side javascript. In fact the node server was only really serving the pages and not doing any processing on them.


I liked this design but felt the current temp was not as easy to read as I wanted it, and it was not a very 'nodejs' project.

So I decided to take on a v2 of this project. This time using electron, nodejs, reactjs, and mobx. These are some technologies I had become familiar with at work and wanted to use them for a personal project. The clock, map, current, and forecast elements are all react components now and there is a mobx store that has the weather data in in. So when the weather data is updated all the react components respond and are automatically updated. Electron makes the whole project feel more like an 'app' and that is why I used it.


I have some more ideas on what I might do with it. But for right now, I am happy how it all turned out.

The code can be found at: https://github.com/kdekorte/kwc in the v2 branch. And to make it work you will need a Weather Underground developer key (free) and to put that and your city and state in the config.js file at the root of the project. The run 'npm install' once and then 'npm run kiosk' to run it full screen or 'npm run start' to run it on your desktop. Kiosk mode is specifically designed for the dimensions of the RPi touchscreen, so if it looks bad on another screen that is why.


Sunday, July 06, 2014

At the 6 month point

So I have been using my Mac for about 6 or 7 months now and I am still happy with the purchase, so that is a good sign.

But what are somethings that Linux does better?

So far the main thing I have found is that Spaces on the Mac is similar but not near as useful as virtual desktops on Linux. When I am using my Linux machine I use virtual desktops constantly, but when I am using the Mac I don't. Not sure why, but so far it has yet to stick, maybe it is because there is not a panel widget to dock widget to make it easy to switch between them.

Another thing I miss is the package management, sure Apple has the store, but there are several apps that I use that are not in the store and so I have to end up manually updating them. It is very annoying when I want to open a program and the first thing it does is to tell me there is an update to it. Reminds me of using Windows and booting up to 5 apps that need updating. This problem needs to be solved. Maybe Apple or Someone else needs to come up with an "open" store that is searched by the System Update process. Kinda like how there are alternate package repos to Debian and Fedora. Apple needs to provide hooks into system update to make that happen, so I don't see it, but it sure would be nice.

Finally, I still think that the Finder could use some work. Nautilus has always been a good file manager and I think Finder could learn a few more things from it. There are still some things I don't do "the Mac way" and so that is probably what I am running into. Renaming a file is still not intuitive, pressing Enter should open the file, not rename it and there is no option menu item for rename.



Wednesday, June 18, 2014

Dreaming of a new Thunderbolt Display

Dear Apple,

Since I have purchased my Macbook Pro 13" (late 2013), I have been hoping to get an Apple Thunderbolt display. Unfortunately, the one that is available is pretty much out of date. So while I am still hoping that Apple will come out with a new one, I thought I would put on my "dream display" hat and write down those thoughts.

Because Thunderbolt 2 is kinda like a cabled version of PCIe 2.0 in 4x mode. Not quite the bandwidth that most people associate with video cards, but enough to run a decent card, my thought was why can't someone put a video card inside of a Thunderbolt display. After all we have the MXM standard which allows the video cards in some laptops to be upgraded. This way when I am docked at the home or office, I have a secondary card that may have some additional OpenGL muscle over the card in the laptop, while still allowing me to have a power saving video card in the laptop itself. I typically use my laptop in clamshell mode when it is docked so I don't use the laptop display in that case. If MXM is not an option how about the option to use the video card from the new Mac Pro in here.

The resolution of the display should be 4Kish and at least a 16:10 aspect ratio. I think 16:9 is a little "short" for me.

As for ports on the back of the display

Input:
1x Thunderbolt 2 in that allows a single connection to the computer

Output:
1x Thunderbolt 2 (again for connecting additional devices)
1x DisplayPort 1.2 (so I can daisy chain a second display if needed)
1x Mic, built in mic in the display would be nice as well
1x Speakers, the monitor should have speakers as well
1x 1Gb Ethernet
1x WebCam with light when it is active
4x USB 3.0 ports on the back
1x USB 3.0 on front or side

And make it less than $1000, if possible...

Sincerely,

Kevin

Saturday, November 16, 2013

Moving to Macintosh

I'm been using Linux as my primary operating system for more than 13 years, and on and off before then. However, some of the recent changes in the way the desktops are being designed and other factors got me thinking. If the Gnome Desktop is looking more and more like OSX, maybe I should look at OSX. So after 6 months of research, using the equipment in stores, and trying things out I decided that I would get a Mac as my next computer. I also think I was ready for a change in my personal computing.

So when the new Macbook Pro's were released in October I figured it was time to make the move. I ended up getting a MacBook Pro 13 with a 2.8Ghz i7, 16GB of RAM, and the 512GB SSD (yes, I am now broke for awhile). The hardware that Apple makes is really excellent, and I figured if I really hated OSX, I could always put Linux on the machine. So I have used the machine for a couple of weeks now. And I have to say that while I am not fond of a few things (the menu bar at the top and Spaces just don't work that well compared to virtual desktops), I am finding that I can just use the computer and I am getting used to these changes. It is also nice that when buying hardware and software, I now do not have to spend a few hours researching if it will work in Linux. I can usually just look at the box and know.

I am also having to get used to paying for software again. I have to admit that being able to install OpenOffice on the Mac was a big reason to consider it. I'm not sure I could fork out another $500 in software for the Mac, so that cost of buying into the Mac is pretty low after purchasing the hardware.

I also have to admit that this is one of the fastest machines I have ever used for day to day activities. Even faster than some of the massive servers I have used less than 3 years ago. I think the SSD is a big part of that as the CPU clock speed is not all that different.

Does this mean I have given up on Linux as an operating system, definitely not. I still use it as my primary OS on my work laptop (RHEL 6.3) and I think as a server OS there is nothing better at the moment. I will probably always have a Linux box somewhere in the house, unlike Windows 8. Also a side note here is that Windows 8 is probably one of the main reasons that I started looking at Mac. I know that I don't use Windows personally, but others in my house do and after having a loaner machine here it made us all think that Windows 8 was not for us, at least on the desktop.

So what does this mean, it means that I need to find someone to take over some of my Linux projects. Over the last year I have not had much time for them anyway due to my work schedule (I travel a lot more now). And it is time the projects had someone focusing on them.

Saturday, October 19, 2013

Preliminary gnome-mplayer and wayland testing

On my Fedora 19 machine wayland is available and so I thought it would examine what might be needed to make gnome-mplayer run in this configuration. GTK 3 will support wayland, but what I am not finding is a way to embed mplayer into a GTK window. The current code uses the GTKSocket and passes the XID of that window to mplayer for embedding. I am also not completely sure that the GTKPlug/Socket API is going to work on Wayland. According to the GTK 3 manual I see this note

The GtkPlug and GtkSocket widgets are only available when GTK+ is compiled for the X11 platform and GDK_WINDOWING_X11 is defined. They can only be used on a GdkX11Display. To use GtkPlug and GtkSocket, you need to include the gtk/gtkx.h header.

So the current method of embedding mplayer may be a no go on Wayland/GTK3.

However, I believe I may have a workaround for all this. I think if we compile gnome-mplayer in GTK2 mode and then use XWayland everything should "just work". It is also possible there will be a way that XWayland is launched for applications that are linked to Xlibs or we may just need to but a wrapper script around gnome-mplayer to ensure it is launched properly even in GTK3 mode. Not the cleanest solution, but better than nothing. Once Fedora 20 is released and Wayland and XWayland are available I will do some more testing and see what needs to happen.

Tuesday, October 30, 2012

gnome-mplayer 1.0.7 released


Announcing the release of gnome-mplayer 1.0.7

Due to a change in the logging of the application gmtk 1.0.7 is *required* for gnome-mplayer and gecko-mediaplayer

Notable changes:

gnome-mplayer now has MPRIS2 support, so as support is added to the applications gnome-mplayer should be able to be controlled from several panel applications. I have requested this support from several applications but as of yet support has yet to appear.

Added Anamorphic 2.39:1 as a preset screen ratio

Prevent crash message on shutdown.

GTK compatible logging system

Fix problem when controlling the playback of audio only files

Rework playlist handling in gecko-mediaplayer so that website playlists are handled in a sane manner and caching is done correctly.

And the normal stuff:
Several bug fixes
Additional keyboard shortcuts and fixes


Files:

http://gmtk.googlecode.com/files/gmtk-1.0.7.tar.gz

http://gnome-mplayer.googlecode.com/files/gnome-mplayer-1.0.7.tar.gz

http://gecko-mediaplayer.googlecode.com/files/gecko-mediaplayer-1.0.7.tar.gz

Enjoy!

Friday, August 10, 2012

Using a keyboard and mouse with the Kindle Fire

After installing CM9, with the 3.x kernel, on my Kindle Fire, I read about people connecting keyboards, mice and other USB devices to the Kindle Fire. In order to do this a USB cable referred to as a OTG cable is needed. I happened to order this one, but there were many options. After I got the cable, I plugged a USB 2.0 powered hub into the OTG cable which was then plugged into the Kindle Fire. A powered hub is essential as the Fire does not put out enough voltage to power most external devices. Also, on the Kindle Fire, you will want to install the applications "StickMount" and "File Expert" from the Google Play store.

Now for the big test. The first thing I did was plug in a USB mouse into the powered USB 2.0 hub.  Much to my surprise a mouse cursor appeared on the screen and I was able to move the mouse around and click a few things. I was wondering if the mouse cursor would appear as the Kindle Fire is a touch screen device. Both the touch screen and the mouse worked at the same time, so nothing was lost. So far so good. I then plugged in my USB keyboard and then I opened a browser window and was able to type in the url on the physical keyboard. So now things are looking pretty promising. The next step was to plug in a USB flash drive. Within a second StickMount popped up a prompt asking me to allow it SuperUser access and then informing me that the USB device had been mounted in /sdcard/usbStorage/sda1. I then used File Expert to navigate to that directory and view the files on the flash drive. Everything seemed to be there and I was able to open and interact with files just like files found on the Kindle internal storage. Perhaps with the right USB flash drive, very low power requirements, the USB hub would not be needed and then you would have a solution to the limited space on the Fire. One of my sticks, a 4GB one, almost worked, but the 32GB one definitely would not.

Now for the things that didn't work. I tried to plug in my 1TB External USB harddrive and while the OS knew something was there, I do not believe the file system drivers were present. I also did not have much luck with my USB Bluetooth adapter. Also while these devices where plugged in I could not charge the Kindle Fire, so I was limited on how long the device would run. This adapter from Amazon may allow you to work around that issue.

So all in all the Fire with the OTG cable, a powered USB 2.0 hub, a USB keyboard and mouse can actually function as a basic computer. Now I would not recommend this setup for full time usage, but if you want something for some basic work that requires a lot of typing on the cheap, this would be one option. I also see no reason why this setup would not work with other Android devices. So if you decide to try this, I would appreciate some feedback.