Thingshield replacement for arduino over zigbee now available for hubitat

Code is on GitHub

Be nice, this is my first try with Groovy and Java. First Arduino sketch too.
I've only done a bit of programing in in the last 8 years!


Children are in the master folder
Hope it helps.
Matt

3 Likes

I just got a nice little extension working. I've used a couple cheap (~$10) E32 LoRa UART modules to send serial commands to/from the MonaLisa over LoRa (which then of course go to/from the smart hub). So you can send a command from a distant (3km in theory!) LoRa node, to a LoRa node hooked up to the MonaLisa, which then gets relayed to the hub. And you can send a command from the hub to MonaLisa, which is passed to the connected LoRa node, which then gets relayed to the distant LoRa node.
I've added some more detailed instructions in the MonaLisa documention guide towards the bottom. The only mildly challenging part is that you have to hook one LoRa module up to an arduino first and run a sketch once, to set the baud rate of the module from 9600 (default) to 38400 (used by the MonaLisa).

6 Likes

Damn Andy, the project takes another twist.
Outdoor weather station to hub with that data displayed on the indoor station. Just ordered some.

1 Like

Andy @hass, I have a question.
I'm having trouble pairing two MonaLisas to my hub at the same time.
Individually I've paired and unpaired the devises numerous times.
I've noticed that they both have the same Zigbee id and Device Network id when they are paired.
Initializing Zigbee Device 00124B001D39EC6F, 6BB6
Any Ideas?
Matt

Hmmm. That could be that they have the same "IEEE address". I might have accidentally given them the same one, by overwriting the factory one, during flash programming?
For now, can you try changing the zigbee device ID (to 00124B001D39EC61 or something) on the hubitat device page for the connected one, and then try adding the second one? The connected device seems to work fine if I change the zigbee device ID.
I have no trouble connecting two to my system simultaneously, but they have different zigbee device id's.

Changed the Zigbee Id to ...EC61. did not change the Device Network Id.
It see the second board now and tries to initialize.
I see Initializing Zigbee Device 00124B001D39EC6F, 6BB6 in the log
Still wants the Device Network id 6BB6 and is hanging at the initialization.

Fortunately I have two more MonaLisa's coming. I think they arrive today!
Hopefully they'll have different IEEE address.

Did you try holding down the reset button for a couple seconds (or on old boards connect Din1 to GND) when Plugging in the board?

I'm running V1.2 boards w/button.
Have to press button to pair.

Odd. Try removing both boards from hubitat, so it has forgotten about them. Then add the first, holding down the button while plugging it in, then change the ID to... EC61. Then add the second, holding down the button while plugging it in.

This will/should not work. It's like a MAC address; it needs to be unique per network node. It would need to be set on the MonaLisa side. I'm not sure if it will work short term, but expect it to cause problems at the lower levels of the network stack and result in wonkiness.

Wouldn't want a wonky Lisa!
Let me check the address on the incoming batch of MonaLisa's and if its OK I'll send back any that need a new address.
Matt

OK, I updated the firmware so now it pulls the IEEE Zigbee address for each MonaLisa from the TI read-only address stored in memory and unique to each cc2530 chip.
Fortunately, it's pretty to flash the new firmware to your MonaLisa. You just need an arduino (and a Windows or Linux computer). I added instructions at the bottom of the "guide". Please consider giving it a shot. Otherwise, I'm happy to take back your board and send it back to you with updated firmware.

I’ll give it a try tomorrow. Will use a windoz machine.
Two quick questions, Does the CCLoader take the firmware and add it to the Arduino script? Just not clear on how the firmware is being transferred.
The board I’m updating doesn’t have headers, Does the Mona Lisa need more than power and the 4, 5, 6 pins?
Matt

Ok cool.
Ccloader has a win/linux program that talks via serial (via the arduino usb connection) to the arduino. It sends bytes of firmware to the arduino, and the Ccloader arduino sketch then transfers those bytes to the MonaLisa.
No, it just needs arduino pins 4, 5, 6, which need to get connected to the debug holes on MonaLisa.
There's detail at the bottom of the guide...

Sorry, I’m being dense but your instructions say to mount the MonaLisa as a shield.
What I meant before was, do I need to power the Lisa as well as the three debug pins?

OK, tried it.
Powered the Lisa.
Put the sketch on the Arduino then close the IDE (it ties up the port).
Windows run CCLoader from command line with exe, com#, bin file, and Arduino type

C:>E:\Matt\Documents\Arduino\CCLoader.exe 5 SampleLight_v1.2_butt3reset_ieee.bin 0
Copyright (c) 2013 RedBearLab.com
E:\Matt\Documents\Arduino\CCLoader.exe version 0.5
Comport : COM5
Bin file: SampleLight_v1.2_butt3reset_ieee.bin
Device : Default (e.g. UNO)

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

The file doesn't exist or is occupied!
Comport closed!

Sadness.........................

Is the bin file in E:\Matt\Documents\Arduino\ directory?

Bin file is in the ...\Arduino directory as well as the CCLoader.exe

I think it looks in the "current directory". So you want to cd to E:\Matt\Documents\Arduino\ first, then run CCLoader.exe 5 SampleLight_v1.2_butt3reset_ieee.bin 0

Uploading Happiness.......