Thingshield replacement for arduino over zigbee now available for hubitat

This looks very interesting.
Will it work with this clone?


I mean this Arduino stuff is Greek to me, not even sure where I got that board from !

That will work just fine.

Thanks Doc. I have just received my module- 2 questions- should I upgrade the firmware or might the board have the latest firmware?
Second, I am using the onboard microUSB and plugging into my win7-64bit machine and the device is not detected. Should windows be able to detect the device without an attached UNO? Guessing I need a driver but couldn't find a windows driver for CC2530
I also tried connecting my CC2531 dongle and that was detected immediately, to rule out any PC issues.

Big thanks for creating this, it opens a whole world of possibilities.

I don't believe so... There is no USB to UART chip on the board that I recall. I believe the microUSB connector is only used for powering the board.

One more thing... depending on what you're trying to accomplish, you may find using this Hubitat Driver that I wrote for these boards a while back useful. It fully exposes all of the I/O as Hubitat Child Devices. It also exposes most, if not all of the device's available settings.

Hi. It should have the latest firmware if you just got it.
USB connector is just for power (when it's not already getting power from arduino).
Enjoy!

Okay,Thanks for the reply guys.
Time to whip out the arduino and start building.

1 Like

@haas @ogiewon

I got my MonaLisa V1.4 running today... all went super smooth :slight_smile:
I'm using the serial to a PC and Dan's Hubitat driver. Everything works!

I do have a question. With my V1.4 board I don't have to worry about updating the firmware, however I would like to learn how while all this is fresh in my mind. The process seems pretty straight forward however I was not able to find a "objcopy.exe" file for windows. Is there a link someone could post?

Also, does the MonaLisa act as a repeater? I saw one post that referenced this capability but nothing in the device notes or in any other post I could find.

Dr Haas, This board was what I was hoping existed for a very long time. It took me a while to even find it. Thank you so much for you work and for sharing it.

Thanks
John

Glad the board is useful to you!

Yes, in the same github repository pointed to in the guide, there is a windows binary.


I haven't tried it, but it should work.

Yes, it is a repeater. Near the start of the guide: "It is a "router", meaning it is meant to be always powered on, and helps to route messages over the zigbee network."
You can verify the board's connections with the awesome lqireq. command.

Thank you for your response and work.
My issue wasn't CCLoader but this section of your explanation:
The
"objcopy --gap.............) I haven't been able to find "object.exe" to perform this step using a windows machine.

image

Oh. Note that the firmware is already provided in bin format. So you don't really need objcopy. But in case you somehow made your own hex file, you could use a windows bin to hex utility for windows like this..
http://hex2bin.sourceforge.net/

1 Like

Hi,

I have your MonaLisa running with Putty and I find it amazingly simple to use Kudos!

Question regarding the Groovy code.

In your "manual" you state that commands to the Mona Lisa should end with a period. However I can't see how that is happening in your groovy example. In my simple testing I see the code without a period is processed correctly but I'll guess adding the period is the correct way to send a command, even though it may work without.

Should I modify my groovy to add the period or is it indeed optional?

Thanks

John

Yes, commands should end in a period.
The line in the groovy code doing so is
mystr=mystr.padRight(16,".")

1 Like

Procedure to flash the MonaLisa cc2530 board using Windows and a NodeMCU V1.0 board.

(All the information below is the work of others before me. My only contribution is collecting it and applying it specifically to the Mona Lisa.)

While learning the MonaLisa board from Dr Haas I wanted to be able to flash the cc2530 board using a NodeMCU. My goal was driven by.

  1. I don’t own an Arduino UNO
  2. I feel much better flashing a 3.3V device with another 3.3V device. No 5V signals to be concerned about.

First let’s look at the process overall.

Simply stated the NodeMCU is programmed to be a simple programmer module. It will be used to program the MonaLisa with the firmware sent by the Windows computer running CCloader.exe.

There are three parts to the process.

  1. A windows computer (linux will use nearly the same steps) with two programs installed.
    a. Arduino IDE
    b. CCloader.exe

The computer will first use the Arduino IDE to load the CCloader.ino onto the NodeMCU board.
Then it will be used in a CMD window to run the CCloader.exe program

  1. The NodeMCU will receive data from the CCloader program and send the commands to the MonaLisa to flash the new code.

  2. The MonaLisa board: The program target.

CCloader.ino modification to use the NodeMCU

The original CCloader.ino code needs to be modified to enable the correct pins of the NodeMCU. In the Arduino editor replace the UNO pin numbers (around line 92) with:

// Debug control pins & the indicate LED
#define NodeMCU

#ifdef NodeMCU
// define pins for NodeMCU
   int DD = 14;
   int DC = 4;
   int RESET = 5;
   int LED = 2;
#else
// define pins for UNO
   int DD = 6;
   int DC = 5;
   int RESET = 4;
   int LED = 13;
#endif

Now program the NodeMCU with the modified CCloader.ino

Connections:

Windows computer to NodeMCU: use a standard USB cable.

NodeMCU to MonaLisa:

MonaLisa
image


Flashing the MonaLisa:

Be sure to close the Arduino IDE else the port will be unavailable to CCloader.exe

With the Windows computer connected to the NodeMCU and the NodeMCU connected to the MonaLisa.

In one directory put the CCloader.exe and the MonaLisa firmware found in the original thread:
(BTW this is an awesome device !)

Create a text file with the following command line in it: (optional)

CCloader.exe <port#> <firmwarefilename.bin> 0

  • The port# is the same port# the Arduino used to communicate with the NodeMCU board.
  • For some reason I found it did not like me typing the firmwarefilename but worked when I copy and pasted the filename from windows explorer to the text file.
  • The 0 (zero) tells CCloader to expect a UNO (even though we have a NodeMCU)

From that directory open a CMD window:

  • Copy the command line from the text file to the CMD window (right click paste not Ctrl V)
  • Press enter.

You should see something like:

C:\work>CCloader.exe 7 SampleLight_v1.2_butt3reset_ieee_lqi.bin 0
Copyright (c) 2013 RedBearLab.com
CCloader.exe version 0.5
Comport : COM7
Bin file: SampleLight_v1.2_butt3reset_ieee_lqi.bin
Device  : Default (e.g. UNO)

Comport open!
<Baud:115200> <data:8> <parity:none> <stopbit:1> <DTR:off> <RTS:off>

File open!
Block total: 512

Enable transmission...
Request sent already!

plus many more lines of text as each block is uploaded.

Completed !

3 Likes

Update on my Haas Thingshield replacement.

I now have my first use of the MonaLisa board and firmware deployed and working. It monitors my alarm and reports to Hubitat. I had originally implemented this with Hubduino and it was working well, however I much prefer Zigbee over WiFi. Perhaps its a personality disorder of mine :slight_smile:

So again I thank Dr Haas for his creativity and willingness to share. And I hope knowing people are actually using his device brings him satisfaction.

1 Like

@JohnRob - Glad to hear MonaLisa is working well for you. Quick question - are you simply using the onboard GPIO of the MonaLisa, or are you augmenting it with an Arduino for additional GPIO pins?

My arduino (NodeMCU) "listens in" on the messages from the alarm to the keypads. They are simple ASCII phrases. I convert them to something < 15 char and use the MonaLisa passthru capability to send them to the Hubitat. This application does not use any of the cc2530 capabilities other than the Zigbee radio and serial input.

Philosophically I decided not to allow communication (aka control) to the alarm panel, only reading the messages. And with a little obfuscation even those are useless to anyone "listening in"

The arduino code handles slowing down the keypad messages which occur at a 10 second rate. And handles any error messages or warnings like AC LOSS.

1 Like

Very nice.
I used one myself the other day. I attached it to an arduino and have it able to wake up my computer (acting as a virtual keyboard that can send key presses/releases). Then if I'm not home, I can wake it up remotely, and then get in via Chrome remote desktop.

2 Likes

Is it possible with your firmware to put the cc2530 to sleep?

John

No. It is a "router" profile, which means it expects to always be awake and helps to route others' zigbee messages, just like the original ThingShield. It is not like meant for low power operations. It uses about 20mA, depending on what it's doing.

1 Like