Thursday 29 December 2016

In ubuntu (or perhaps more generally in linux), I have found an unpleasant condition when the mouse or the keyboard contends for direction of the cursor in an emacs window. I think it happens when I go meta with the control key. I found a nice package that I put in my .emacs file which seems to ameliorate this -- https://raw.githubusercontent.com/purcell/disable-mouse/master/disable-mouse.el

😛

Monday 19 September 2016

interbike is in town. I found this map amusing -- check out the trail names!
http://www.interbike.com/wp-content/uploads/2016/09/8.pdf

RMLT passes Bootleg canyon past Railroad pass before Boulder City if riding counter-clockwise, and approaching Railroad pass ascending from Boulder City if riding clockwise. Be advised that the road/touring bike won't make the Darwin in these canyons.

So, I rode my ancient 27 inch Fuji to Bootleg Canyon and caught some sights.



Sunday 31 July 2016


Continuing my previous posts on the Analemma, one can calculate the Sun's position during the day here in Las Vegas, NV. This position is typically given by angles -- azimuth, and altitude. The azimuth is clockwise from north, which is conventional for aviators. So the Sun rises in the East, about 90 degrees, and sets in the West about 270 degrees. At the midday zenith is South. Hence, one sees the value for having a southern exposure in terms of getting the day's light. At this time of year, we see that it is near vertical at 70 degrees.

This project is available under GNU GPL at https://github.com/str255/sun-mc
For your location edit the example parameters in equation_of_time.mc.

Wednesday 27 July 2016

duration of the day over year in Las Vegas

Continuing my previous posts on the Analemma, one can calculate the rising and setting times here in Las Vegas, NV. From there, the duration is simply the difference from setting and rising. I am acutely aware of the functioning of our air conditioner because it was 115F -- hot and dry -- today. From the graph, I can see that this month -- July -- may be the most difficult month. Hopefully, August should be cooler. The day's length this month is over 14.5 hours, while August goes to 14 hours. The power did snap off for a few minutes this afternoon. I lost all power, and with it the internet and wifi. It came back soon thereafter. The LIFX lightbulb had some difficulty with the hard stop. By December, we have less than 10 hours sunlight.

Day light savings give the day rise and set lines a jagged edge in March and November. 

This project is available under GNU GPL at https://github.com/str255/sun-mc
For your location edit the example parameters in equation_of_time.mc.

Monday 25 July 2016


Here is an analemma I generated for Las Vegas, NV of the year 2016. There is a lot of literature on this going back thousands of years. The word comes from the Greek analemma -- "prop, support". This is similar usage to the use familiar in mathematics of Lemma which as a supporting proposition. I can argue that the sundial is probably one of the first instruments devised by first man -- a simple stick in the ground whose cast shadow determines the measurement of a day. Further study by the first men, evolved into an understanding of that shadow changing with the seasons. And when the shadow is shortest separated the day from morning (AM) to afternoon (PM). Noon should be 12:00. However, it isn't. The difference is the "equation of time". And declination measures the length of the shadow. " The declination of the Sun, δ☉, is the angle between the rays of the Sun and the plane of the Earth's equator." See https://en.wikipedia.org/wiki/Position_of_the_Sun

This project is available under GNU GPL at https://github.com/str255/sun-mc
For your location edit the example parameters in equation_of_time.mc.

Saturday 23 July 2016

setting up raspberry pi with wireless keyboard and wifi. dongle

I got a wireless keyboard with wireless mouse from Adafruit as well as a wifi dongle. These all worked smoothly with very little configuration difficulties.

To get the wifi dongle to work, just edit /etc/wpa_supplicant/wpa_supplicant.conf with your ssid, psk, and key_management.

The keyboard works right out of the box -- the major difficulty is finding the USB dongle. Follow the instructions to set your keyboard for US layout.https://www.adafruit.com/product/1738

Wednesday 6 July 2016

In which I admit failure, and revert to the RainBird controller

My attempts to reboot the Arduino and it's wifi shield failed. So, I wired the Rainbird controller back. Now everything is running as it was. Things are O.K.


Monday 20 June 2016

Heat wave

The summer heat has arrived. Today it will reach 115F (46C) and the garage is reading 100F (38C) right now. Early this morning we lost power for a brief moment. All the devices that we rely on went out for a brief moment. And so did the Arduino WIFI irrigation controller. When sunrise came, instead of the log reading irrigator on/irrigator off, the controller signalled an error.

I have tried to reset the controller without success. The Arduino board is hot to the touch. I am afraid that the power outage and the high temperature may have done the poor Arduino in.

Not sure what to do.

Friday 10 June 2016

home assistant

Home assistant uses a configuration.yaml script. That's where I put all my switches, light bulbs, etc, and rules. https://community.home-assistant.io

The automation rules for turning my irrigation on/off are based on sunrise:

- alias: 'Rule 1 irrigation turn on at sunrise'
  trigger:
    platform: sun
    event: sunrise
    offset: "00:00:00"
  action:
    service: switch.turn_on
    entity_id: switch.irrigation_front
- alias: 'Rule 2 irrigation turn off 15 after sunrise'
  trigger:
    platform: sun
    event: sunrise
    offset: "00:15:00"
  action:
    service: switch.turn_off
    entity_id: switch.irrigation_front

Declaring the irrigation switch is just a couple of lines:

switch:
  - platform: command_line
    switches:
      irrigation_front:
        oncmd:  /home/foobar/ha-post-Aon.sh irrigatorA on
        offcmd: /home/foobar/ha-post-Aoff.sh irrigatorA off





ha-post-Aon.sh and ha-post-Aoff.sh are bash shell scripts talking to the sparkFun 8266 Arduino shield.

Monday 6 June 2016

I talk to LIFX lightbulbs over a LAN

I wrote code 'lanlifx' for getting information about LIFX devices over the LAN, as well as controlling power to the device. I put this on github https://github.com/str255/lanlifx .


This runs on linux platforms targeted primarily towards raspberry PIs, ubuntu, or debian, but hopefully works on any linux. There are some Python and GO sources for doing much the same thing, and a proprietary LIFX Android app. You have to register your email to use the proprietary app.

Running lanlifx will list all LIFX devices on your local net.


Monday 30 May 2016

wheel of misfortune

the RMLT trail goes near (but does not intersect!) the wheel of misfortune which you can see in google maps Wheel+Of+Misfortune

Tuesday 17 May 2016

raspberry pi wifi and hdmi ethernet channel

Ok, so I broke down and bought a raspberry PI. In an earlier post, I mentioned putting NOOB and Raspbian onto a micro SD card. Cool, now I have Linux.

Then I plugged my TV into the PI with a HDMI cable --> DISPLAY. I had problems with the edges of the display getting cut off. These I solved by using the overscreen values and exiting from the Raspbian config.

Unexpectedly WIFI came to the party for free. Must have sneaked in over the HDMI cable. The TV and the Raspberry PI supports HDMI v1.4 with an HDMI Ethernet Channel. ( hdmi_1_4 ) Not only video and audio travel over the cable, but ethernet as well. So if you have a newer smart TV with wifi or other internet connection, the PI automatically got the wlan0 interface.

Completely unexpected and nice.


Friday 13 May 2016

irrigation relay detail

The red and orange wires are from zone one and two solenoids. The red and orange are bound by the orange cap with a black wire running to the middle relay post. The green wire is for a non-existant zone three. The black wire from the 12VAC is bound with the white common by a gray cap. The red wire from the 12VAC is bound with a black wire to the left relay post with the blue cap.

Thursday 12 May 2016

how many engineers does it take to change a lightbulb?

I bought a LIFX White 800 light bulb at my local Lowes hardware store. It was cheaper than a Philips HUE and did not require a gateway. I wanted a front door entry light -- turn on at sunset, turn off at sunrise. This might help me while I'm fumbling with my house keys at night.

The bulb gets hot, actually it's not the bulb because a LIFX has LEDs not bulbs. It's the heatsink which wicks all the heat. It's designed that way -- rated for 125°C (257°F). So be careful! Wear gloves or mittens when you handle. I found this out after I had to change the light's WIFI settings because I changed the password.

First off I had to hardware reset the bulb, by turning it on/off five times until it started blinking in odd colors. Then, using the Android LIFX app I connected to the LIFX wifi network and reset the password. To do this I had to remove the bulb from the front entry way to a more convenient inside lamp socket. Much easier. However, the bulb is hot. Glad I didn't burn my fingers.

You actually have to log onto the LIFX website with your email address in order to reset the bulb. This is probably so they can keep tabs on you, or maybe install an Orwellian monitor. A lot for changing a lightbulb.


However, now I have an IOT enabled front entryway light that does what I wanted it to do!

Wednesday 11 May 2016

irrigation / home automation Arduino ino code

Here are the legacy RainBird solenoids for the front and rear of the house. The left valve controls water to the rear, while the right value the front. Next to the hole is the main shutoff valve which leads to the street main.  
Here is the new wiring connecting the new internet of things (IOT) controller to the solenoids of my previous day's post and the 12 VAC power supply. I reused the RainBird power supply.


And a closeup of the IOT controller in action. This morning was the first day. The control worked OK -- the valves turned on at sunrise and turned off fifteen minutes later. I placed the Arduino UNO INO source code licensed with the GNU GPL at GITHUB at the link https://github.com/str255/esp8266-irrigation-controller

Tuesday 10 May 2016

irrigation / home automation RainBird renu

Project is to retrofit old RainBird home irrigation system with new IOT cloud based home automation system.

The old RainBird controller is on the right. It still works. The new internet of things (IOT) node is on the left. I am reusing as much of the old system as possible -- the existing wiring, the existing plumbing, valves, solenoids, irrigators. The only change is the using a new IOT node.
The IOT consists of an Arduino UNO controller coupled with a SparkFun WIFI shield. I flashed my irrigation code onto the Arduino.
Here are the old RainBird connections. I am saving them in case I have to revert back to the old control.
Here is another view of the system footprint. In my next post, I will detail the new wiring and whether the new controller works well.

Thursday 14 April 2016

Saturday 9 April 2016

What is the purpose behind about cycling a loop whether clockwise, counterclockwise? Is there merit to thinking about any latent philosophy? Certainly in our health oriented culture, there seems to be no justification needed in expending cycling energy. My brother rides a stationary bike 1-2 hours a day, and feels that is an important ingredient in a healthy successful life. And perhaps that is where the argument/justification should lie -- as needed as eating three healthy meals a day. However, I am interested in inductive effects upon my conciousness. Hopefully, I will have time, energy and interest to explore these effects here. Stay tuned...

Wednesday 23 March 2016

cw with GPS

Really cool website with his clockwise ride loggged with GPS ride GPS

ccw 2008

This counter-clockwise from 2008 is of interest because the circuit had not yet been completed and a strong southerly wind played into the decision to ride CCW... from 2008 Descending rapidly down the water culvert is decidely suboptimal. One has to duck beneath the low overhanging bridges to avoid getting seriously hurt - there are about three of these, and there are several short detours that avoid access gates...which requires split second timing spinning downhill. Going clockwise (CW), one still faces the culvert, however, the pace is a slow slog uphill, and the low overhangs make for great rest stops providing relief from the hot sun. Going with the wind is a great decision, much better to have it on your back as you hit the hills. "overall, a good experience with great weather-wise timing... and probably do it clock-wise, since it seemed like the climb up in Boulder City would be easier than the gradual climbs in the counter-clockwise route. "

Tuesday 22 March 2016

ny times reporter, counter-clockwise 2012

Googling I found this interesting article about RMLT from 2012 2012 Article in NY Times Matt Villano, the writer, decided to cycle the counter-clockwise route and ended up walking and tugging his bike alongside.

CW 2016

This past Sunday, I decided to bicycle the entire River Mountain Loop Trail. This is not a particularly unusual decision as I bike about 13 miles of the trail most days. However, what was unusual was that I awoke with the decision to bike the entire 36 mile trail. Last year, I biked it and I ended up completing it at sunset half dead. Literally, half dead.

The first decision is to circumnavigate the mountains clockwise or counter clockwise. Last year, for want of any intelligence, I chose to bicycle counter-clockwise. This year, after much thought I chose clockwise. The trail is marked with milestones at each half mile. I started at mile six. There are two main passes through the mountains. From mile six, if one traverses clockwise, one descends rapidly downhill through the "three bitches" at Lake Las Vegas. While if one takes the counterclockwise path, one descends rapidly downhill at Railroad Pass. Naively, one would think that since you have to end up in the same place after your cycle, the direction wouldn't make much difference. You would be wrong.

The basic reasoning is that if one chooses the counter clockwise route, one necessarily encounters the impossible climb of the "three bitches". These slopes are impossible. But if this year, I choose the clockwise path, I must make the same ascent. However, I can ascend gradually. Difficult, but do-able.

Or at least that was the plan...