Mac LCD

Information for using small character LCDs such as the HD44780 with Mac OS X, LCDproc and Growl. And other Apple and Mac USB stuff.

Friday, February 23, 2018

ESP32 first timer

I have been messing around with a Wemos Lolin32 ESP32 module that I recently bought on ebay for a few bucks. I'm not totally sure what I am going to do with it yet, but it looks awesome for easy IoT home automation. I have had some early successes after some difficulty so I wanted to share my methods and results on Mac OS x.

Unfortunately, the Lolin32 module I bought was not pre-loaded with the AT command interpreter that seems to be standard. I ended up with 2 different ESP32 boards from separate ebay sellers which seem to be pre-loaded with only a simple test program. The manufacturer of both of them seems to be "TTGO". Anyway, it is definitely something to be aware of if you don't want to be doing a lot of programming and flashing just to get the AT command interpreter for an internet modem. Fortunately, Espressif Systems, the company that manufactures the ESP32, has done an excellent job of providing development tools and open sourced software for the chip. It is nice to see great macOS support from this company. Most Chinese manufacturers seem to focus on Windows only and maybe Linux.

Things you need to install for building and testing the AT command terminal:

If you have the CJMCU FT232H (or FTDI UM232H(-B), or Adafruit FT232H breakout), like I am using on my Apple II Disk emulator, connect it to the ESP32 module like this (we don't really need CTS/RTS yet, though):

ESP32 signalESP32 GPIO# (Lolin32 labels)FT232H (CJMCU labels)
RX16AD0
TX17AD1
RTS14AD2
CTS15AD3

Follow the instructions for flashing the AT command firmware. Basically: git clone --recursive https://github.com/espressif/esp32-at.git $ cd esp32-at $ make menuconfig In the menu that appears, set:

  • Serial flasher config
    • Default serial port to:
    • /dev/cu.SLAB_USBtoUART
$ make $ make factory_bin $ make erase_flash $ make flash

Along the way, you may get errors about some python modules that are missing. To resolve these, just install the listed package...
$ sudo pip install pyyaml xlrd
... and re-run the command with the error.

The first time I ran everything, I was getting brown-out errors in the debug console. I changed USB cables and did not have any further power problems.

The biggest issue I had was actually communicating with the AT command terminal using the "screen" command in macOS. No matter what I typed, the ESP32 would echo, but not respond. The basic problem had to do with line endings. Using miniterm.py rather than screen solved the problem, but a adding bindkey "\015" stuff "\015\012" to the ~/.screenrc file also worked. I couldn't get the stty screen commands like onlret or onlcr to work correctly.

Or, you can configure the ESP32 to use <CR> line ending, like it should have:

$ make menuconfig
  • Component config
    • AT
      • enable: AT command terminator support.
      • set :AT command terminator. to:
      • 0x0D

Once everything is connected and built, you can connect to the device with:
$ screen /dev/cu.usbserial 115200,cs8,-parenb,-cstopb
or:
$ miniterm.py /dev/cu.usbserial 115200
Of course, you may need to add a numeric extension after "cu.usbserial", depending in what is in your /dev/ folder.

Quick ESP32 AT Trouble-Shooting Guide
IssueLikely CauseSolution
Garbage characters received from ESP32Incorrect Baud rateset terminal baud rate to 115200, or the same rate specified in make menuconfig.
Typed characters do not appear in terminalIncorrect RX/TX connectionsverify that wires to ESP32 UART1 are not crossed and have continuity
Typed characters appear in terminal, but no response from ESP32Incorrect line endings from terminalUse miniterm.py, or modify ESP32 settings with make menuconfig, or modify screen bindkey settings in ~/.screenrc
Typed characters appear in terminal, but still no response from ESP32ESP32 is hung from previous incorrect line endingsReset ESP32

So, after all of that I am to the standard default set-up that most people get already installed.

Labels:

Tuesday, December 5, 2017

How about some Home Automation?

So, I totally ran out of steam on my RetroChallenge 2017/10 project. Tons of IRL stuff took over all of my attention. One of those things was buying a new house. That is sure to shift my attention away from RetroComputing for a while, so I thought I would blog my adventure with home automation. Starting from the beginning...

Home Automation Goals

  • secure
  • relatively inexpensive
  • high WAF (easy to use and stable)
  • iPhone Home app (HomeKit) compatible
  • good integration with various technologies
  • stay out of the cloud
  • Bonus: integration with DSC alarm and Alexa
  • Bonus: run on a Mac
I don't mind a complicated set-up, as long is everything is stable enough that my wife doesn't get annoyed at things not working. In general, home automation subjects seem well-documented on the internet, and I can hopefully program around any total road blocks I have. Since I have an older Amazon Dot around here, and I have experience programming a DSC alarm system on my old house, support for those is an added bonus.

Initial Research

While Apple's HomeKit looks very slick, it, of course, uses a Apple's own protocol, and the devices seem fairly expensive. I would like to use some cheaper alternatives, if possible. Insteon seems like a very solid choice, but their products are not cheap either. And the Insteon Hub Pro HomeKit-Enabled is not getting good reviews. I'll leave the home automation protocol comparisons to others, and I may wait a bit to choose a final solution for my in-wall dimmers and such.
With my hesitancy to commit to a standard other than Apple's Hope app, and the need to have good integration with other technologies, I will need a very flexible solution. openHAB seems to fit the bill nicely. It has support for Alexa, bindings to interact with HomeKit, DSC alarm systems, and pretty much anything else you could want.

433Mhz Wireless

Since Insteon and Homekit accessories are fairly expensive, and I haven't committed to a standard yet, I was eager to see products that supported many of the cheap wireless outlets and accessories. These 433Mhz devices aren't secure, but I will only be using them for testing and low priority items.
Hook is a great example of a product that integrates Alexa and these cheap outlets. But, Hook uses the cloud and I don't see much support for it under openHAB.
The Sonoff RF Bridge is a similar product which is VERY cheap on eBay. It looks great, except it also uses the cloud. What is cool about it is that you can flash it with new firmware to make it use MQTT and make it very openHAB compatible. But, I'm not sure I will have the patience for all of that. They are so cheap, I bought one anyway to try out.
RfLink Gateway is another nice piece of software, but again, too much flashing and hardware hacking for now.
Finally, I found the Broadlink RM Pro which is essentially a WiFi enabled IR/RF universal remote. It is basically an inexpensive Logitech Harmony Hub (which is also supported by openHAB, and would make a great alternative). It has some early openHAB support and will work with 433Mhz RF or infrared remotes. As a bonus, it already works with Alexa. They are also inexpensive. I just bought one on eBay, and I'm eager to try it out. Hopefully, I can contribute to this binding being fully featured and supported in openHAB.


Alarm System

My new house does not have an alarm system installed. I installed a DSC alarm system kit on my old house and found it to be very reliable. It was nice to see openHAB has good support for the DSC Ethernet module. I saw an excellent deal for a kit on eBay and just bought one. The kit is the "DSC KIT64219SE". It is basically a hybrid wired/wireless DSC alarm system from their PowerSeries. The price was way too good of a deal to pass up, even though escrow has not yet closed on the house! I will need to buy a lot more sensors, detectors and an ethernet interface to complete the install though.

Running total:

ProductDescriptioncostqtytot
DSC KIT64-219SEHybrid Security System163.531$163.53
Broadlink RM03 ProWiFi IR/RF universal remote33.811$33.81
Sonoff RF Bridge 433WiFi 433Mhz RF Bridge (needs re-flash)10.391$10.39
Grand Total$207.73


















Labels: , , ,

Friday, June 14, 2013

New Blog for Retro Computing

I moved my Apple II and Retro Challenge content here:
Apple Crapple

If you linked from Hackaday.com, the post you are looking for is here:
http://apple-crapple.blogspot.com/2013/01/karateka-and-schematic.html

If you are looking for my RetroChallenge 2013WW content, it is here:
Apple Crapple/RetroChallenge_2013WW

I will keep updating this site with Mac and LCD specific stuff.

Labels:

Sunday, February 17, 2013

iMon_Helper Open Source

The iMon_Helper is now open source and is available at SourceForge.

Labels: ,

Saturday, February 2, 2013

iMon Helper utility updated

iMon_Helper has been updated to provide (slow) remote control support without needing Growl. In addition, I compiled it to be a Universal Binary. View the included README file for details.

Download the latest version now!

I am hoping to get this project up on SourceForge to encourage further development.

Labels: ,

Sunday, January 8, 2012

iMon Helper utility available

I just completed a new helper utility that will allow a standard LCDproc install to communicate with your iMon display. No more compiling special Mac OS X iMon drivers for LCDproc!

iMon_Helper is intended as a go-between to allow your Mac OS X installation of LCDProc to communicate with your iMon display. Because it is installed a separate binary, you will not need special Mac OS X specific compilations of LCDproc or the iMon driver to take advantage of the features of your iMon display. This will allow you to keep updated with the latest features of the iMon LCDproc driver.

Download the latest version now!

Unfortunately, I have not tested it on the newest Mac OS X or in 64 bit. Leave a comment if you have any problems.

Cox web hosting also recently ended their service, so the previous downloads I have posted are no longer available. I will try to get a version of GrowLCDproc up ASAP.

Tuesday, March 8, 2011

Receiving HID remote codes!

So I tried taking another look at getting remote codes from my iMon Soundgraph (0x0038) LCD. I am receiving the remote codes finally! I need to do some more work cleaning up the code and I think I can get something released!

Labels:

Monday, December 21, 2009

iMon LCDproc Compiler Script Update

See the original iMon LCDproc Compiler Script post for installation details.

Many new features have been added:

Auto Discovery

The driver will now auto-discover your iMon device with no need to edit the LCD.conf file. You can still specify specific product and vendor ids if you wish.

Remotes

The new driver works with newer iMon HID devices (with "HID" printed on the back), to allow Mac OS X to open the device and let you use your remote control as a mouse. Several Mac OS X drivers are available to extend the use HID devices and will now work with the remote buttons. If you had an older version of the iMon installer script that installed the LCDprocUSBShield.kext, you will need to reboot after you run the install script to gain full control of your remote.

Older iMon devices that use the iMon Pad remote, but do not use HID, such as the 0xffdc VFD, can also use the remote with the help of a few programs:

  1. GrowLCDproc 1.4.1, 1.3.11 or newer must be running and connected to lcdproc.
  2. Remote Buddy must be running with the "Script Remote" enabled in the "Hardware" area.

The imon lcdproc driver will send remote control button presses to GrowLCDproc, which in turn, sends commands to Remote Buddy via AppleScript. Remote Buddy is not a free product, but it is so professionally written with so many excellent features that it is worth the money. Remote Buddy has many options to control all of your essential Mac OS X programs. There is also a free 30 day download available.

Improved features with 0x0038 SoundGraph LCD

New features have been added that improve the stability of the SoundGraph LCD and allow users to control what the LCD will display after LCDproc shuts down.

Good Luck!

Labels:

Friday, December 11, 2009

GrowLCdproc 1.4.1 Available

Growl Claw

GrowLCDproc 1.4.1 is now available for download.

GrowLCDproc 1.4.1 is compiled for 64-bit Leopard. It also includes a feature to display the current date and time when no other notifications are visible. It is largely untested and may have some minor bugs in the configuration screen. It appears to work otherwise.

See it in action.

Take a look at the documentation.

Download the latest version now.

Update:

GrowLCDproc 1.3.11 is now available for GrowLCDproc users using Pre-Leopard Operating Systems. It has all of the features of 1.4.1, but works with Mac OS X 10.4.

Update:

GrowLCDproc 1.4.1 fixes an error in GrowLCDproc 1.4.0 that would cause the display to not load on some systems.

Labels: ,

Monday, October 26, 2009

iMon based VFD and remote on ebay

CoolerMaster Multimedia Pack

This seems like a good deal:

Cooler Master RC-260-OSB1 Multimedia Value Pack w/VFD M. Less than $15 shipped.

I just bought my next project!

Update 4-NOV-2009

This device lists as: Product ID: 0xffdc Vendor ID: 0x15c2 and works with the iMon LCDproc Compiler Script. Just change the /usr/local/etc/LCDd.conf file to include the proper USB Product id.

I was also able to get the remote working with some additional code, applescript and the very impressive Remote Buddy

Labels: