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.