[Release] HubDuino v1.1.4 - Hubitat to Arduino / ESP8266 / ESP32 / ThingShield Integration (ST_Anything)



Oh. I didn't notice that on the list. I will have to take a closer look. Thanks!


Is it possible to send Serial.write commands for the switch device? I've built many of the traditional pin high, low relays, but I have this ESP-01 12v Relay module that operates via serial. Anyone have any ideas or should I just write this one off? The commands are something like this:
Serial.write("\xa0\x01\x01\xa2"); // CLOSE RELAY
Serial.write("\xa0\x01"); // OPEN RELAY
I played around a little with the EX_Switch file at the most basic of levels but no dice.
Please let me know what you think.


It is possible, however ST_Anything is actually full of Serial.write calls for the Arduino IDE Serial Monitor window.

You would need to suppress all of those calls throughout the libraries to prevent random strings from being sent to your ESP01 based relay module.

Another option would be to reprogram your ESP01 relay module to run ST_Anything directly on the ESP01. No extra controller needed.


Yeah...I've been running them as SOC's for a little while now for other device types, with the ST_Anything code. The relay I mentioned is just a 'one-off'.
I did come up with a cool little pin layout for the ESP-01's. Only need to connect 4 pins to operate a single device connected to GPIO0. Check it out.


You could 3d print a custom enclosure to reduce the size by 50%.

Nice job!


Thanks! I have tons of fun building these little 'doo-dads'. I'm hoping Santa might drop a nice RepRap down the chimney this year. :):grin:


I have a creality cr10s, I love it. Huge build volume great prints. If you watch gearbest or lightinthebox you can pick it up as low as $340 US.


I'll have to check that out. And...I've never even heard of Lightinthebox. Always going to banggood and the like. Thanks Again!


@brianspranger You just HAD to show me a new site. Placed my first order already. Thanks Buddy!! Haaaa


Seems like a pretty handy little addon to the esp01.

I think the DHT11 isn't as accurate as the other one, but for most projects I think it would be adequate.


You would be correct on the accuracy...I just dig the small footprint. I use DS18B20's for all the important stuff, like our Bearded Dragon's vivarium controller, which now runs on Hubitat as well with the ST_Anything devices. He does have a DHT in there but just for humidity.


Very nice!
I keep a saltwater reef aquarium for 5 years and DIY'd almost everything. So I can relate!


Hey Dan,
One thing I've wanted to do for a while now is to add a current sensor for my washer/dryer. I know that you use the Aeotec gen 5 Energy Monitor but that device is SUPER expensive and kinda becoming harder to come by. I wondered if you had any experience with these in your ESP8266 experience.

Like I said, I'm not trying to get fancy with calculating the amount of energy used or anything like that. Just a simple "is this thing on" is all I was hoping to get. And I am really hoping to do it for less that the $100 for the Aeotec. Thanks a bunch!!


Have you tried to just use it as a PS_Voltage Device?


I've not yet. I've held off on putting the pin and ordering one since I read all these horror stories about people blowing up their boards cause they had the wrong sensor with the wrong number of loops for what they wanted to measure and it's all so confusing.
You have to read that through the analog channel which I know is limited to only 1v (not 3.3) so I know i have to be careful of that. Is there any other pitfalls or gotchas with the Voltage device? What type of polling interval would you recommend?
I'm also getting a DHT22 to play around with for automatic control of the fan in my bathroom. I've been looking over your example sketch on that one too, but I think I've got that one figured out.


While the ESP8266 chip can only handle 1 volt, many of the NodeMCU boards allow up to 3.3V to be applied to the analog input pin. Try applying 1 volt to your analog pin to see what value a simple sketch reads. If it reads about 1/3 of full scale (usually 0 to 1024) then your board has an onboard voltage divider which makes it safe to apply up to 3.3 volts.

You do need to make sure that your CT’s include a burden resistor to make sure they output a voltage, not a current (unless you want to build a circuit that includes a burden resistor.) Even with a burden resistor built-in, you may need a voltage divider circuit to scale the voltage to a maximum of 3.3v.

I would probably scan the pin every 30 seconds for simple laundry monitoring.


Thanks for that.

On another note, I have had the following situation happen twice in the last two days. A hub lockup has cause me to have to reboot it. When the hub comes back up, none of my Hubduino devices connect to the hub until I reboot them. Is there something I am not doing correctly or something that I should do when I reboot the hub to get them to connect? I just thought that maybe hitting the "Configure" button in the parent devices would do it but I didn't think of that that before i went around and manually power cycled them, so I wanted to check if you think that might fix it.


You could try to issue a REFRESH command, as the CONFIGURE command doesn’t really do anything these days, IIRC.

As for having to restart your HubDuino devices after a hub restart... I have never had to do that. Are you sure you’re giving you hub enough time after the restart for it to start performing normally again? I am pretty sure you’re running webCoRE, which causes the hub to take a while to get back up and running as all of that groovy code has to be recompiled as each app/piston is used for the first time post restart. Even without webCoRE, my hub takes about 5 minutes before it starts running smoothly again after a restart.


Yeah, definitely enough time. The interface is back up and I am able to control other devices and get readings from other sensors no problem. When I perform a normal reboot, I don't have this problem. But I had to pull the power and plug it back in because the interface was locked up (not because of webCoRE but actually because I was playing around with Speak using Amazon Poly commands.)

But I will try the refresh if it happens again. Thanks again!


So, @ogiewon, I had this exact same problem again. Had to force reboot my hub because of a rule in rule machine and boom...none of my Hubduino boards are reporting back to the hub. So, I have to walk around the house and reset all 9 of them. Any idea what could be causing this? I don't have any logs to show you, because as I said, they all quit communicating with the hub.