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

yeah...I meant like straight, needle-like leads.

image

Since you're only connecting to reset and GPIO0 for a second. RX & TX need a much firmer connection though.

It's too bad that they USB port didn't serve a dual role in this case to also allow you to program the board. but that would have made it WAY too easy. :stuck_out_tongue:

After a reread your post that's what i thought you meant. Real credit goes to the creator of the Hubdino code. I just got lucky on these outlets as when I bought the zentec brand they were the cheapest I could find.

1 Like

We couldn't get THAT lucky. The usb port is nice though (always on) as I have it powering a nodemcu that's hooked to a high torque servo that opens and closes my window blinds. :sunglasses:

1 Like

@ogiewon will this connect to a raspberry pi and get the data from a DHT11 ?

No support for Raspberry Pi in HubDuino/ST_Anything. OmniThing does support RPi and many other platforms.

Question - semi-on topic. :smile:

I have need to put an esp8266 outside. I have a contactless level sensor that I want to put on my pool's bleach tank for low level detection.

I poked around in the arduino IDE 6 months ago when I got the level contact sensor, and it looked like it should work (I saw the state change as expected when using it on a coke can :smile:) . Then I got busy and never did anything with it.

Does anyone have any suggestions for enclosures for an ESP that would be suitable for outdoor use?

EDIT: Oh, and I guess it doesn't HAVE to be an ESP8266, I just said that because I have an extra one laying around.

While not exactly small... the following enclosure is nicely designed and includes an GFCI outlet internally. It is designed to house an outdoor sprinkler controller. It has a removable plate that can be used to mount your electronics to, and allows for cable management behind the plate.

https://www.amazon.com/gp/product/B000VYGMF2/ref=ox_sc_mini_detail?ie=UTF8&psc=1&smid=ATVPDKIKX0DER

Do you have a link to the exact model of sensor you'd like to use for this application?

Here's a non contact sensor I was looking at for another project. Simple on-off when level drops.

https://www.amazon.com/Contact-Liquid-Level-Sensor-Switch/dp/B074KB93N7

For an outside enclosure go to your local Home Depot, Lowes, Menards and look for something like this:
https://www.homedepot.com/p/BELL-1-Gang-Non-Metallic-Weatherproof-Gray-Box-with-Three-1-2-in-or-3-4-in-Outlets-PSB37550GYB/202284546

I have one of these:

And one of these:
https://www.dfrobot.com/product-1493.html

I didn't test the one from amazon, but I did poke around on the one from DFRobot, and it seemed to work.

The first device can be handled as a contact sensor in HubDuino. You'd need to make sure that the Internal Pullup feature is disabled, as the device outputs either 0v, or Vin. The only issue I see if that the minimum voltage is 5V. Trying to use this with a ESP8266 will require a level shifter to keep the voltage in the GPIO pin between 0v and 3.3v.

The second device also looks like it could simply act as a HubDuino contact sensor. It appears to look similar to the first one, requiring 5v, and output 0v or 5v. Again, the level shifter would be a safe bet when using an ESP8266 board.

The nice part is that you should be able to pull the 5v right off the ESP (5v pin for Wemos D1 Mini or VU pin for NodeMCU) since the current draw is only 100mA. But be sure you get a good level shifter. I tried to use one for some LED strips to get the control voltage to 5v and it was a PITA. If you pull the 5v off the board though, you won't have to tie the grounds together since they'll already be together. :slight_smile:

I am revamping my wirinng connections for all my contacts to the Arduino. all new terminal strips and such. How would I implement the onboard pullup resistors for the contacts in the sketch? That would make it so much easier to transition to the new terminal strips.

Thanks

All of the example sketches that demonstrate the use of a Contact Sensor, do so using the internal pullup feature of the board.

static st::IS_Contact             sensor3(F("contact1"), PIN_CONTACT_1, LOW, true, 500);

At the top of every ST_Anything device's .cpp and .h file, you will find the documentation for that device. For example...

//******************************************************************************************
//  File: IS_Contact.cpp
//  Authors: Dan G Ogorchock & Daniel J Ogorchock (Father and Son)
//
//  Summary:  IS_Contact is a class which implements the SmartThings "Contact Sensor" device capability.
//			  It inherits from the st::InterruptSensor class.
//
//			  Create an instance of this class in your sketch's global variable section
//			  For Example:  st::IS_Contact sensor6(F("contact1"), PIN_CONTACT, HIGH, true, 500);
//
//			  st::IS_Contact() constructor requires the following arguments
//				- String &name - REQUIRED - the name of the object - must match the Groovy ST_Anything DeviceType tile name
//				- byte pin - REQUIRED - the Arduino Pin to be used as a digital input
//				- bool iState - REQUIRED - LOW or HIGH - determines which value indicates the interrupt is true
//				- bool internalPullup - OPTIONAL - true == INTERNAL_PULLUP
//				- long numReqCounts - OPTIONAL - number of counts before changing state of input (prevent false alarms)
//

So I was being redundant then. Sounds like me :smiley:

Thanks Dan

1 Like

So this is different. I was adding a few contacts and when compliling I get this error:

expected ';' before 'st'
here:
st::Everything::addExecutor(&executor1);

IF I insert the ';'
;st::Everything::addExecutor(&executor1);

it compiles.

I am using version 1.8.5 of the arduino programmer. Something new????

You're missing the semi-colon on the light before the one that is getting highlighted. Every line should end with a semi-colon.

1 Like

Ah I see that now. I miss the simplest things these days.

Thanks Ryan!

1 Like

Just hooked up two DHT22 devices. I have both the child temp and humidity devices installed. I have a BME280 and several DS18b20 temp sensors and they are working fine. When I check the device both temp and humidity for both devices reads -1.0 Is there another driver I need?