Custom sensor with arduino

Hi all!

I was looking for a hub with more features than just the HUE one and I've found this one. I'm really impressed and I'm seriously thinking to buy one in the next days.
Anyway, before buying it and spending countless hours to try, I would like to know if the following idea is possible and have some suggestions about how to do it.

So, here we are: I'm thinking to build a custom touch sensor to put and the top plate of my kitchen that, after being activated, could be used to perform some actions (on/off lights, kitchen extractor, maybe something else). I would like to build it using Arduino and a daughter ZigBee/zWave board.
The workflow would be:

  • activate the sensor
  • touch some parts of the sensitive surface
  • the Arduino board reacts to the event
  • the Arduino board sends a command (a string, it looks, if I use the Mona Lisa board) to the hub with its daughter board
  • the hub handles the command applying the rules I've set for it

Actually I don't know what would be better between:

  • any cheap xBee card (I don't find the link anymore...)
  • the Mona Lisa board (it looks really cool, and I also think it fits good to my project)
  • a zWave board (would it be better than any ZigBee one?)

Any suggestion is appreciated: code samples, boards, sensors, prototypes.

Thanks!

For information, I would like to replicate something similar to the Touch Surface of Loxone.

I'd look at the Hubduino project here in the community... because it's a better starting point, probably.

The topic for Hubduino is long, and so you can start closer to the end to get a flavor for the activities... then jump to the first message and read about how-to.

1 Like

id second the hubduino project. I have a handful of esp8266 devices deployed around the house with various sensors using hubduino to communicate with hubitat. They work well, and report fast. also very configurable and most needs are already built into the hubduino project.

The decision you will need to make is if you prefer to use zigbee/zwave instead of wifi communications that hubduino uses.

The nice thing about wifi devices, is they dont rely on a strong/large mesh and reliable repeaters. as long as wifi signal is there, they can communicate effectively which makes them good for detached garages/shops or sheds/etc.

The downside would be a chatty wifi network if you have many of these and do not segment your wifi.

@mbarone Thank you!
What do you meant with chatty? That the devices would have problems to connect?
With Segmenting do you mean have 2 different networks in the same house? If yes, luckily I've already it.

@csteele Thanks! It is really helpful and interesting.
The topic is really looooooong. But, it looks the simplest, fastest and cheapest solution. I've totally ignored it!

Just to be sure, I can modify the original sketch, once I know it works, adding the management of my extra hardware for the touch.
But, as I've seen from this compared to Mona Lisa, here the arduino builds the child devices. That means, if later I would like to modify the behaviour, I've to change the arduino code. Instead, in the Mona Lisa option I just change the code in the hub, while the arduino remains the same.
Am I correct about this interpretation?

segmented can mean a few things but generally separate ssid or completely separated wifi hardware/vlans. a way to keep traffic separated depending on device use/priority.

These devices have no issue connecting, are pretty reliable and are generally pretty fast to come back on reboot/etc.

By chatty, these devices (depending on how many sensors you have connected to each esp/arduino device) can send updates rather quickly to the hub on any sensor reading change. These are small amounts of data, but can be a high frequency which can slow down lesser powered wifi networks. if you have the option for multiple ssid, then you most likely have a powerful enough router to not notice (unless you make a bunch of these), but just keep this in mind if you notice wifi slows down on other devices if you go this route.

This is one of the arguments to (try to) keep all hubitat devices on zigbee or zwave, to help your LAN/wifi from getting saturated by all these misc devices sending many frequent but small packets. It will depend on your lan/wifi hardware and how you have configured it, so this will vary network to network. Like i said, im running 4 or 5 of the esp8266 with 4-8 sensors per device and have had minimal impact on my lan/wifi.

regarding your other question about the child devices and updating arduino code...
based on how you setup your arduino code, the child devices will automatically be created when updates are sent to hubitat from your arduino device. if you want to change sensors or what pins they connect to on your arduino, then you would update the sketch and push to the arduino, then it would create new child devices if needed. Any old child devices that are no longer used can be manually removed on the hubitat side.

if you want to change the polling delay or how any sensor reports, this is configured in the sketch, not on the hubitat side. This is laid out pretty well in the documentation linked in the hubduino thread.

any specific questions should be put in the main thread. the creator "ogiewon" is very responsive and super helpful when trying non-standard things with this project.

Thank you very much!
I'll ask in the main thread, but at least now I'll have a better idea of how I can do this.