Hubduino, Tasmota or just plain old arduino ide custom code

Background.....

So my first esp program I did was a dry dog food feeder. Was originally created so I could on the odd time operate it remotely.

Why I went custom.. Rather than commercial. Well it was a hobby, and more so I could feed it with more food for a large dog and allowing me to customise it to my liking

I know basic arduino ide, and previously used arduino ide and blynk to get it all linked to the cloud.

But now looking at moving it to hubitat as not using blynk anymore.

So servo motor control, two buttons, variables, and resetting variables each day.

In order of what I think is easiest (and works OK seeing I'm not relying on precise timings).

Options......

Tasmota using buttons only, and do all the other parts in hubitat (angle, limits etc). Assuming sending the angle to tasmota is not too much of a challenge. Otherwise I could just fix that angle motion in tasmota rules as the values won't change.

Hubduino with multiple buttons and edit the code in arduino ide so a certain button triggers the servo motor angles part. Using hubitat to do the rest of the rules eg the limits, the multiple serve dispense number etc.

Tasmota and use tasmota rules (never used rules before) with all rules in tasmota. So only buttons to trigger things is in hubitat.

Or look at removing my blynk code and working out other ways to communicate to hubitat...

More detail........

The device is basically a paddle wheel turned by a servo motor and 2 buttons.

The servo motor goes from 0 degrees say 60 degrees, holds a second or so. Returns to 0 and holds until next command.

One button/pedal is for the dog to push with his paw, but it has a limit on how many pushes a day.

The other button is for us to dispense the dry food. Single push distributes one lot of dog food. Holding it makes it distribute multiple amounts, defined by a variable that can be changed.

The easiest it seems would be tasmota on esp. Set that up as a servo motor (pwm). Only the motor hooked up to esp device.

Then for buttons use a xiaomi zignee button I have around.

Rule machine does all the work. Trigger rule based on zigbee button press. Send the angle to tasmota device. Send the return angle of 0, say 1 second later (time is not critical so this approach works here).. All variables and limits are done as variables in rule machine..

Easy..
But expensive due to zigbee buttons..

Cheaper if I implement the buttons into esp tasmota device. The still use rule machine for everything else..

I think hubduino is too much effort for something that isn't relying on precise timing. Even more so arduino ide programing and integrating into hubitat

Ok so I have started with tasmota on an esp8266 and used pwm on d1. I http post the console command to the local ip of the device from rule machine. The http post can include variables so I can define the angle as a variable on a dashboard and in rules..

At the moment I'm using a xiaomi wall switch battery operated one, more for simplicity. I'll hook two switches up to esp device when I can get around to it and add them to tasmota.

Was pretty easy this way.

Ok change of plans. Have edited a Hubduino sketch and moved to that. Seems it was pretty easy to edit a sketch to include 2 outputs to drive LEDs, 2 switches and 1 servo pwm.

Haven't done the electronics part but all devices are showing in hubitat.

I used hubduino for my servo blinds but that was a matter of using a particular sketch and just removing lines. This time I had to add.. But it turns out pretty easy to modify.

For now I'll leave all rules in hubitat, but I'm sure it'll be easy to do any more time critical things in arduino ide. Which Im more familiar with than tasmota rules.. And is very flexible.

So I'm back to Hubduino instead of tasmota for my esp devices for anything that is not a commercial power plug.. I had both setup from a coding side.. Just felt hubduino was a good direction for this and other projects with esp8266 where anything where I feel I may need to do more complex coding in future developments.

So commercial power plugs will stay on tasmota as that's more straight forward and doesn't need any changes.. Hubduino for anything else on a wemos mini (or nodemcu) I feel may need some coding on the device for time sensitive actions.

Talk about a full circle.. In case anyone is reading and cares :smirk:

2 Likes