What's missing is the ability to drive relays and LED's. My thinking is to include such things as optional "add-ons". So a "relay pack" could be designed for lawn sprinklers. I'm currently working on a phone dialer (see above), and I'm considering other ad-on modules like a Bluetooth PC interface. But I've gotten ahead of myself.
One of the biggest advantages over the X10 Book is the ability to read in configuration files that are put on the SD card. So far there are 4:
- TIMEDATE.TXT - enter the time and date on a single line, put the card in the Nex10, restart, and the time and date are set. (Then the file is deleted from the card.)
- SETUP.TXT - this file is loaded into the external EEPROM and deleted after loading. It has several sections where you can define;
Messages - like names of the weekdays, full moon names, etc.
Reminders - yearly reminders like birthdays, scheduled salary reviews, etc.
X10 Events - timers to send X10 commands at certain times.
X10 Profiles - Friendly names for House / Unit codes so instead of "A-5" "Desk Lamp" is displayed. Other parameters in each Profile control beep type, display and logging options.
X10 Macros - (work in progress) "IF A-5 ON - Send G-2 and G-3 OFF" is a simple example. They should be pretty powerful - stay tuned. - PARAMS.TXT - This file contains user defined parameters such as the date and time format, the house code for the remote temp sensor, high / low temp alarms, various delay times, etc.I've pretty much replaced all "hard coded" settings with these parameters.
- FONTS.TXT - Since we're using an LED display, a set of fonts must be defined. All characters from ASCII 32 to 127 are included. Additionally about 20 or so "sprites" like the moon phases are defined. This file is loaded to the ATmega644P EEPROM instead of the external EEPROM. It is deleted after it is read in.
So what's it do? We'll you should have some idea from the above, but here's the list in all it's gory detail . . .
Clock Features:
- Time - set by writing it to a file on the SD card, automatically adjusts for DST. The clock has a battery backup.
- Day of the week is displayed with a user defined message for each day.
- The current phase of the moon is displayed as an animated sprite. The number of days to the next full moon, and name of the full moon, is displayed as a scrolling message.
- The times for sunrise and sunset are displayed.
- Yearly reminders will display a day in advance and on the day.
X10 Features:
- All X10 signals that come across the powerline are displayed and optionally logged. If a "profile" was set up for the house and unit code, a friendly name will display - i.e. "Desk Lamp". The profile also has options for 3 levels of "beep", no display, and no logging.
- Logs are written to the SD card as a text file readable by a PC. A new log file is automatically created each month.
- The current status of all 255 devices is kept. The status table can be written to the SD card or cleared using the TV remote. The table will be used for one type of "macro" command.
- A TV remote may be used to manually send X10 commands.
- X10 commands can be set up to be automatically sent at certain times during the day.
- X10 Macros are defined in a section of the setup file. Current types supported are; "if cmnd-then cmnds" (up to 5 thens), "if cmnd and time > x or < y then cmnd, if cmnd - display time, temp, etc. I am working on more types like "if temperature".
- Nex10 will receive the temperature from a remote wireless sensor on a dedicated House Code. (See this.) The time and temperature is logged to a separate file on the SD card. The current temperature and the low and high temperature for the day is displayed in the display loop.
- Alarms may be set to provide an audible warning if, for example, the the garage door has not closed in a certain time.
- There's a good chance I forgot something.
Most of the time, the device is just listening for X10 commands coming from the PSC05. Once every 5 minutes or so, it goes into it's display routine and shows all the things listed above under clock features. The display routine can also be activated via the remote, or from a macro.
Credit and thanks to Bill Westfield, Andrew Hedges, and Bill Ho for the ht1632 code that writes to the Sure matrix, Bill Greiman for the fantastic SD card library fat16lib, B. Hagman for a slick non-blocking Tone library, and Mike Rice for a great little sunrise / sunset time calc. library.
No comments:
Post a Comment