ST_Anything Servo Fakeout

I'm getting 'playfully creative' with some of my automations, and needed to control a servo with one of my ESP8266's... triggered by another ESP8266's motion sensor...both of which are using the INCREDIBLY AWESOME ST_Anything DH's. Gotta fake it out...Once the device is created in HE as a Child Servo, just change it's type to a Child Dimmer Switch. It will pass the dimmer's 'Set Level' command as a simple degree command and thus rotate the servo. It will now show up in the RM and take whatever actions you send to it dependent on the trigger. "If motion ACTIVE on ESP8266#1, Change dimmer (or servo as it actually is) to 90 on ESP8266#2(Open trashcan), If INACTIVE on ESP8266#1 delay 10 seconds and change dimmer(or servo as it actually is) to 0 on ESP8266#2(Close trashcan)".... Coolio!! :sunglasses:

2 Likes

Trashcan? Really? Could you take a picture of the servo installation? Nice!

I have a long weekend so will hopefully have some goodness to share sooner than later. Will keep you posted!

Since RM can handle a device with just a Switch Level Capability (like my child servo driver), there really is no reason to change the driver type. Unless I am missing something? I just verified that my Child Servo devices show up fine in RM as dimmers.

I just noticed the same...I knew I had only changed one of the child servos to a dimmer but they were both listed in there. So I guess that's that...reverse deconstructed Friday night giddy experimenting got me a cool result in an a$$backwards way. Is classic Me! Haaaaaaaaaaaaa

1 Like

Good deal. The one downside of using my dimmer switch driver is that you’ll have On and Off commands that won’t actually do anything. It might be confusing.

Glad to hear you’re having fun!

Yeah, the only drawback to not having on and off is that you can't set the servo to 0 degrees. Because, when you set a dimmer to level 0, it turns it off. When I set my servos to level 0, all it does is turn the device off and doesn't actually move the servo. So, I have to use level 1. Not a big deal for me, since they are just blinds (who can tell the difference between 0 and 1) but it was slightly confusing at first to figure out why it wouldn't change to 0. So, for anyone using the servo library from Hubduino, be aware of that. :slight_smile:
BTW Dan, got all my blinds moved over to your servo library and WOW, so much better. Without all the waits in the sketch they move so much faster and smoother. I did however have to beef up the power supply for one of my servos. It actually requires 6-7v. With the waits in the other code I was using it was getting by but with the Hubduino servo library it need all the volts it could get. But they close much better now. I did have to implement a sound alert before the blinds adjust automatically now though. They move so fast they were startling me. :stuck_out_tongue: Thanks!!

1 Like