Thingshield replacement for arduino over zigbee now available for hubitat

I guess it's the MonaLisa board (one word, for better googlibility).

1 Like

Having fun!
MonaLisa board is working great. Can send a string from the device page to the board and see it with the Arduino.

Figured out how to send a string from the Arduino to the board (needs to have a "." at the end of the string). I can also see the string in the Hub's logs.

Questions
How do I write text/string to the MonaLisa from the rule machine?
How do I read the test/string in the rule machine?

Dan
I see this commented the following out of your driver
//def gettext(){ // read some attribute string from the device
// if (txtEnable) log.info "gettext"
// //zigbee.readAttribute(0x000, 0x0006) // gets the last thing the device tried to send to us
// zigbee.readAttribute(0x000, 0x0010) // gets the last command the device heard us send
//}
Will it work if I remove the comments?

Thanks all for your help

If you're using my driver, you can easily just call a custom command ('sendCommand') from within Rule Machine and pass in the string you want to send (just remember to keep the length to no more that 14-16 characters (I am not sure the exact max length.)

Currently, there is no simple way using my driver to get data back from the Arduino/MonaLisa into RuleMachine. I trimmed out a lot of @haas' custom attributes and commands to make the MonaLisa more standards compliant with Hubitat's Capabilities. My personal end-goal is to allow MonaLisa to be used with HubDuino.

What are you exactly trying to do with Rule Machine and MonaLisa? If you describe your use-case, I am sure we can help with some simple tweaks to expose the data to Rule Machine as standard Hubitat Capabilities or custom attributes.

Dan - thanks for your help.

Took a few tries because rule machine and I don't get along at all.
So I had to select a switch to send a text string to? Go figure.....................
Including a screen shot for the next guy.

What I am trying to do?

Indoor Air Quality Device.
I have a SCD30 CO2, Temp, Humidity sensor that used the I2C bus.
Its connected to an Arduino that has a MonaLisa shield on it.
I would like to send strings to the hub like CO200657 (657PPM CO2), H374 (37.4% RH), etc.
The RM would then parse the info and set variables that could be displayed on a dashboard or acted on by RM.

If that doesn't work i could have the Arduino feed the data as voltages to the MonaLisa. I think I'd loose a lot of resolution that way.

Once I get this first device working I could see a lot of custom or off the wall devices I could create.

Sounds great. Please post it publicly as an example for others once you get it working! The arduino sketch plus hubitat code/steps.

Typically, one would select the "Actuator" capability within the RM Custom Action settings. This usually returns devices that can be commanded to do something. I made sure to include the "Actuator" capability in my driver.

I would recommend you simply extend my Parent Driver to 'Parse()' the strings from the Arduino that you send. Then, create child device(s) (as necessary) and update their attributes. This way RM and Dashboards will see these devices the same way any other device is seen in the system.

Thanks Dan!

Added a Temp 6 child device and can send a string 6_0032 from the Arduino and see 32 degrees on a dashboard tile!

It took me a while to realize that the MonaLisa sends a package to the Hub and then the Hub passes it to the driver to do all the work updating the children back in the Hub.

Not the architecture I expected from my PLC days.

Next up is to start a new topic to find out what types of child devices there are.
Can't find any documentation and the list over at:
https://docs.hubitat.com/index.php?title=Driver_Capability_List
Doesn't seem up to date.

Has anybody ever thought of making a Zigbee-LAN bridge with something like this?

I'm setting up some home automation at our family holiday home, which has a couple of areas that are probably going to be a bit too far for Zigbee to reach. I already have LAN cables between each location, so I was thinking about using the LAN as a way to extend the Zigbee reach, with the use of some kind of bridge. Could this be done with a Monalisa board connected to something like a LAN-connected Arduino and some custom code?

My fallback would be to just install additional Hubitat hubs, but the idea of a little Zigbee bridge sounded cool to me :grin:

The MonaLisa is designed to be part of a Zigbee network, as an endpoint device, not a Zigbee controller. So, it really does not make much sense to have it in an distant building where it cannot connect to the main Zigbee controller.

However, you could use my HubDuino platform to add Arduino/ESP8266/ESP32 devices in the distant building(s), and have those devices communicate over ETHERNET directly to your Hubitat Hub. While it would not add 'Zigbee' to the distant building(s), you could still get temperature, humidity, illuminance, motion... data from those locations very easily. Those sensors would be directly attached to the Arduino. If you're trying to control Zigbee bulbs, smart locks, light switches, etc..., then this is not really going to be a solution either.

For $75, I think multiple Hubitat Hubs are what you're after. It really would provide the most flexibility, especially when paired with @srwhite's awesome HubConnect App.

I'll probably have to go that route, but it's only that cheap and easy/quick to get a hub IF I lived in the US (or maybe Europe. But I'm in neither) :wink:

What would happen if the MonaLisa and other Zigbee devices were initially paired to the hub/controller, before being moved away? Will they continue to send/receive commands, or will they realize that they can't communicate with the controller, and going into some kind of failed state? Because, what I was thinking was that, if they still blindly send out their commands (eg a "motion active") command, and if the MonaLisa can interecept and interpret the commands, then it could pass them onto the hub via TCP.

Unfortunately, this won't work as MonaLisa would have to be a Zigbee Controller, not an endpoint, in order for this to work. Once MonaLisa moves out of range of the Hubitat Zigbee mesh, it will go into a panic mode trying to find a way to connect to the zigbee mesh network again.

It's an interesting idea, however I don't believe it is very feasible. Also, even if MonaLisa acts as a Zigbee repeater, the data from other endpoint devices would not be visible to the Arduino. That magic would all happen within the Zigbee stack, I believe.

1 Like

Might be worth trying to use a MonaLisa or two as zigbee repeaters. In theory they should reach 100m each, or more with external antennas, so unless your house is realllly big, it could work. Two in a line should extend 200m.

2 Likes

That was one other thing I wasn't sure about; Whether or not the Zigbee messages being passed along are visible or transparent to the device passing them along.

Anyway... Sounds like it's not gonna work :slight_smile: Thanks for taking the time to discuss it!

I guess this will be the first thing I try, once I have some boards in-hand :slight_smile:

I didn't realize Zigbee's range was quite that big. Theoretically, the 3 buildings are within that range of each other, but there's a fair bit of dense vegetation in-between. It would be ideal if it turns out I don't even need a repeater in-between.

How easy would it be to add an antenna to a MonaLisa?

It's very easy. It has a standard IPEX antenna connector, to which you plug a small IPEX to SMA adapter, and then a standard 2.4 GHz SMA antenna, like on a wifi router. Oh, and you have to move one resistor on the board, which by doing so disables the internal pcb antenna and enables the external one.

There are some instructions and links for antennas to buy in the guide...

Here's an excerpt...

2 Likes

Awesome. Thanks! Sorry for not RTFM before asking :see_no_evil:

I am just reading up to see if I want to go down this path and had a question about the moving the resistor for the external antennae. Is the move just a physical change like a jumper or does it require some additional skill like soldering?

It is soldering, but it's very easy. It is a "0 Ohm resistor", which is really just a tiny wire. So you could instead just make a little solder bridge between the two pads.

Thanks for the info. Even the easiest soldering would be new ground for me, but I doubt I would need an external antennae for my project anyway. All in all this looks like a phenomenal option for the DIY people that can't find a device that meets their special needs.

1 Like

I'd like to thank everyone who helped with this project!
Especially @ogiewon, @haas, and @markus.
It was a bit more than I expected but with the help of the community it happened.

MonaLisa is working great.

Arduino Uno R3,
I2C bus with SCD30 CO2, Temp, RH, and a Lux sensor,
MonaLisa
2 X 16 LCD

I'll post code when I get it cleaned up a bit.

5 Likes