I’m a Smartthings / Hubitat guy, but thought this might interest you all. I made a little $20 zigbee board called the MonaLisa that can interface between simple serial commands and zigbee, much like the old ThingShield. It can be used as an arduino shield, or with anything else that talks serial, or just by itself (it has 2 digital inputs, 4 digital outputs, and 4 analog inputs of its own). Now it even supports mapping of the zigbee mesh.
Have a look!
Is there any difference between using this and a simple CC2530 connected to a esp01 ?
Well, it IS a cc2530, but it’s on a nice board to break out the digital inputs, outputs (with LEDs), and analog inputs. It’s an arduino shield.
Plus, “it’s all in the software”, as they say! This lets you easily send strings back and forth with the hub, has the ability to poll inputs, and even advanced things like mesh mapping.
And it works out of the box, for those who don’t find a cc2530 + esp so simple.
@AndyH, i have a Conbee II coordinator based network with common zigbee sensors (Xiaomi, Innr, SmartThings). ZHA on HA. Also have a CC2530 router.
Can i use the MonaLisa to build my own zigbee sensor?
I don’t know if MonaLisa is specific to Hubitat/SmartThings
Thanks!
It should work fine. You’d just have to figure out how exactly to send and receive commands from it. By looking at the Smartthings/Hubitat driver code, you should be able to see what’s needed.
Hi,
Would the battery version accept different voltages (ex. 2 NiMh → ~2.4V, or 3 NiMH → ~3.9V, or 2 alcalines ~3V, …)?
The usb version could be battery powered, or would it need a bit of tweeking? (I saw 1 of your comments where some part of the circuit had to be disconnected, no?)
I’ll try to buy from ebay, but unfortunately looks like you can’t order both usb and battery powered in the same shipping (shipping fee is due once for usb ones, and once again for battery powered ones).
Just buy two of one kind on ebay and I’ll put one of each in the box.
It’ll run off any batteries giving more than 1V or so. There’s a boost circuit included now.
I see you bought 4. You want 2 usb and 2 battery?
Yes, thanks, 2 of each (I’ve normally put a comment in the order).
Excellent that the battery input accepts different voltages.
Hopefully I’ll manage to make this work, I’m quite new to this kind of things, but happy to learn…
Has anyone gotten this up and running on Home Assistant via ZHA or zigbee2mqtt? On the ZHA front, it looks like maybe clusters (zha-quirks · PyPI) are intended to enable reading from the sensor outputs this provides? Otherwise maybe a custom ZHA device handler needs to be written? https://github.com/zigpy/zha-device-handlers
For reference, when adding this to ZHA this is all I’m seeing (on/off toggle) and no entities for other sensor data:
@AndyH It seems like ZHA can send cluster commands that should line up with your specifications in the google doc for how to request and receive data. However when I send a cluster command it appears to send but when I request to ‘get’ the value I don’t get anything back.
Any ideas? I looked at your smart things code and it seems to essentially be doing the same thing — just writing to and reading from these cluster values/commands. Maybe I’m sending the wrong values or my values need to be hex encoded like you’re doing in the smart things code? (https://github.com/drandyhaas/SmartThingsPublic/blob/7da483f703399d0e0ececed507a6f9ab21385688/devicetypes/drandyhaas/haasti-zigbee-switch.src/haasti-zigbee-switch.groovy#L206)
I think you’re on the right track. But you have to send just the right way.
It needs to be 16 bytes of hex data, with the final byte being “.”. And it’s little endian.
I’ll have to try again, but I did try to communicate from ZHA in a similar way, and as far as I remember it worked.
And about on/off toggle only, it’s indeed the only standard zigbee information.
Would have been good if by ex. at least all digital input/outputs where by default associated as zigbee switches, or similar.
I didn’t not have time to investigate more for writing quirks, hopefully this should be doable (but I’m new to it, so have to learn…)
One concern I have is that you can associate a quirk to a given device signature, but looks like here the signature received from the monalisa is too generic (the chip model name I think).
Would have been better to at least have a more specific name (like “monalisa_xxxx”).
Can this id be changed simply by configuring the monalisa (without needing a firmware update)?
Ideally you should be able to put a private id, or even one you can share, specific to a given configuration (ex. water detector, switches, …) , and then the quirk written for it can be shared.
Else I can’t see how we could have a quirk working for several different usages of the monalisa, and so it cannot be integrated in ZHA default quirks (?)
As I understand the Texas instruments license, the source code is free to download from them, but not ok to redistribute.
You also need a license ($5k) for the compiler to compile it. But pm me if you’d like to discuss more, or see my modifications to their code.