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

community_app
community_driver

#548

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:


#549

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.


#550

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:


#551

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


#552

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


#553

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.


#554

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.


#555

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


#556

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


#557

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.


#558

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.


#559

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:


#560

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


#561

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)
//

#562

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

Thanks Dan


#563

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????


#564

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


#565

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

Thanks Ryan!


#566

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?


#567

In the Arduino IDE Serial monitor window, are the DHT22s showing the same -1.0 values? If so, the problem is on the Arduino side.

Try using a standard DHT22 example sketch from the DHT library (I.e. do not use a ST_Anything sketch) to see if the sensor work properly. That will determine if you have a wiring issue.