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

Hello.

Let me start by saying what a fantastic project this is and many thanks to @ogiewon and all who contribute.

I am also working on the same solution so hoping you can provide further clarity?
When adding the NodeEPS8266 to Hubitat, i can see the voltage values in the parent device and these are as expected and within range, however the voltage sensor does not show as a "Child Devices" and therefore is not able to be selected as a device on the dashboard?
Any ideas on what i could be doing wrong?

Like @EVOLVING.HOME I am also new to this and only just getting going with Arduino programming, so please be kind :grin:

Many thanks

Please explain how you’re “seeing” the voltage values? Are you seeing them in the Live Logs? If so, please post a screen capture of what you’re seeing in the logs.

In your sketch, what name did you enter as the first parameter for the PS_Voltage device? It needs to be “voltage1”. A second PS_Votlage device in the same sketch would use “voltage2”, and so on. You can change the Label field on the child devices on the hub once they are created.

Also, you need to have the Child Voltage Sensor driver added to your list of custom drivers on the Hubitat hub.

Thank you for your quick response, simple mistake on my part i called it "voltage". Changed to the correct name and bingo, working like a charm!

Again many thanks @ogiewon you wouldn't believe how many hours i have spent on this :relaxed:

I can now move onto my other Nodemcu integrations... :+1:

1 Like

Quick question for the Hubuino experts..
I'm very new at this - just got mine working properly this weekend and It truly is amazing.. I have the HC-sr04 using the PS_Ultrasonic sensor and it appears to be working wonderfully. I wanted to use the sensor to measure my parking distance in the garage , so I wanted to change the polling interval to be much faster (default is 60s) . Wanted to change to every second.
Is this frowned upon, as it exposes the HE to being flooded ?

Lastly, I'm trying to follow the code in the ST_Anything main sketch. What is an Executor sensor ?

Thanks in advance

Once a second might be a bit too quick. Maybe try 15 seconds and see how that works... Just an idea.

The ST_Anything library has two main types of devices it supports... Sensors and Executors. Sensors read data from the environment, while Executors accept commands from the Hubitat hub and 'execute' them.

A temperature measurement device is a 'sensor', in particular a 'polling sensor'.
A magnetic reed switch device is a 'sensor', in particular an 'interrupt sensor'.
A switch device is an 'executor'.

Dan, firstly, my most humble thanks for the work that you've done on the Hubduino/ST_Anything - it is exceptional... just what I was looking for.

I am tinkering with it and have formed the opinion that the prime (and only) Sketch (i.e. ST_Anything_Multiples) drives everything... Can this Sketch be changed for additional processing ? I wanted to simply turn on the LED_BUILTIN in the main loop (just to play) but it doesnt seem to take.. so can anything be added in the main loop or is it to be left alone ?

Also can you have multiple Parent Devices in HE.. If so, how does the Child find its correct Parent ? From what I can deduce, 1 Micro Controller can have 1 master sketch which creates I parent HE device (which can have with multiple children).
Is any of that correct (or it it time for me to go to bed).

Thanks again in advance.,

The sketches that I provide are simply examples. You should start with one and edit it for your specific requirements.

You can add some of your own code to the loop(), however you really need to be a proficient Arduino programmer before doing so. It is easy to create issues, especially if any blocking calls are added. I recommend all users who are new to Arduino programming to follow some of the online tutorials for learning how to program Arduino microcontrollers.

Let me know what you’re trying to accomplish and I’ll do my best to suggest an approach that works within the ST_Anything architecture.

I answered these questions already....

Dan Thank you.. I wanted to simply make the internal LED blink to indicate that unit is working (when I place the MC in the garage). So I added the following in the main loop,

digitalWrite(LED_BUILTIN, HIGH);
delay(100);
digitalWrite(LED_BUILTIN, LOW);
delay(100);

It didnt blink so I assumed that perhaps the Internal LED is disengaged or something

Thanks again for your patience,.

Those delay() statements are blocking calls that will cause problems.

uuuugggg yikes - ok its best I leave the loop alone.. I'll let the MC/ST_Anything do its thing. I can do any necessary processing with Webcore and the Child device on HE.

thx

Dan, any thought of adding a time-of-flight sensor to your long list of available devices ?

What would be the use-case for a time of flight sensor? :thinking:

Same use-case as used by the hc-sr04 (ultrasonic) accept its much more accurate and farther reaching.... the sr04 is also affected by temp and humidity which alters the accuracy..

Hi @ogiewon,

Thanks again for this, I am having tons of fun and have my water meter working great. I would like to use my nodemcu esp12 for my water meter and 6 contact sensors. I am having a little difficulty understanding my choices for pins. Looking at this

I am thinking I can't use DO or D8 for a contact sensor since they have an internal_pullup? As far as the water sensor goes I run the circuitry off of the 5volt supply pin of the nodemcu and that results in a constant voltage to the pin (constant at around 1.8 volts, pulsing to 2.8). Anyway I currently run the water meter (pulse sensor) on D7, but I can change that if need be.

Thanks for any insight, I can't seem to wrap my head around the pullup, pulldown.

I hear you... I have often also wondered what the use-case is for the ultrasonic sensor... :stuck_out_tongue_winking_eye: Tank level measurement seems to be the most common application.

Depending on the specific sensor you’d like to integrate, you can simply use one of the existing ST_Anything devices as a starting point for creating a new device. I’d recommend using the Child Voltage driver as the ultimate receiver of the data since it will be analog in nature.

I'm looking to directly monitor the status of my Ecobee's outputs to my hvac unit. The end goal is to implement some sort of HVAC zoning app such as [Release] HVAC Zoning & Ventilation Control. The Zooz Zen 16 is almost perfect for this, but I prefer not to use z-wave and would like 4 inputs and 4 outputs. It looks like HubDuino might be my best option. I've only ever worked on one other Arduino project using an Adafruit trinket and LED ring, so my "maker" resume is a bit short. I'd like to start with a simple board and then add on the pull-up/down switches and output relays as I get more confident in my abilities.

Can you recommend a board (or boards) to get me started? As I mentioned, my end goal requires 4 inputs and 4 outputs, so a board that could accomodate this from the start would be best. However, I could split the funtions between two boards if necessary. 24 VAC power input would be ideal, but I know this is a long-shot. Also, WiFi or hard-wired ethernet will work.

HVAC signal input will eventually be just a set of basic relays with 24VAC coil voltage, with the contacts wired to the microcontrollers inputs. Outputs will likely be a standard arduino relay output board used to switch 24VAC power to the main zone dampers. The output functions could also be offloaded to any number of other zigbee-controlled switches if needed.

Recommendations? Thanks in advance!

Can the sensor results be combined in ST_Anything ? I have a functioning HC-SR04 , using the Ultrasonic Sensor. I will also try and get a temperature sensor for my DHT-22 (temp + humid). However, my intent is to improve the distance accuracy of the HC-SR04 by adding in a temperature value to the formula.... How would I go about this... ??

(1) do I "combine" the getData method of the Temp sensor to the getData method of the Ultrasonic
or
(2) do I "refer" to the data in the Temp sensor object from the getData of the ultrasonic object ?

Any advice or instruction would be greatly appreciated.

thx

This is not the design/architecture of ST_Anything Arduino code.

You could create your own PS_Ultrasonic_w_Temp device, that has all of the necessary code to read both the HC-SR04 and a DHT22 sensor, to then use the raw values from each to output a more accurate result.

Another option would be to 'catch' both values in the sketch's callback routine, and then perform whatever math is required to improve the distance calculation. Then, you could either send the result to a completely new child device on Hubitat, or there may be a way to intercept and send the corrected ultrasonic distance value... :thinking:

Before you go through all of that work, however... You could simply do the math on the Hubitat side, depending on the complexity of the algorithm.

The ESP8266 GPIO pins are 'fun' to try to use...

If I were you, I'd try using Pin D0 for the Water Pulse counter. It doesn't have an internal pullup resistor, which should be fine since your device is driving the pin between the low and high voltages.

This leaves pins D1, D2, D5, D6, D7 for five contact sensors using the Internal Pullup resistors.

Unfortunately, getting that last contact sensor may be a problem...but you can try using pin D8 and see what happens.

The wiring for your contact sensors should be as follows:

ESP8266 GPIO PIN --- Contact Sensor --- ESP8266 GND

The Internal Pullup feature causes the ESP8266 to put 3.3v on each pin, via an internal ~10KOhm resistor. When the magnet come in contact with the reed switch, the input is dragged down to 0 volts (i.e. GND). When the magnet is moved away, the voltage on the GPIO pin will be 'pulled up' to 3.3v again.

Dan, thanks,, appreciate the insightful response.

BTW do you have a ST_Anything sensor that takes care of the DHT-22, as a stand alone sensor ??

Thanks again