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

Make sure you change the Port number in the sketch to 39501 for Hubitat (and the Hub IP address, of course.)

Thanks, actually I have one question, What is "Number of Buttons" for ? I know it's on ST but probably I will see it in HE too.

If you choose to add some momentary pushbuttons to your ST_Anything device, they can be used to generate 'Pushable Button' and 'Holdable Button' events within Hubitat.

So, if you add IS_Button devices in your sketch, you should configure the Parent Device with a number that equals the number of IS_Button devices in your sketch. If none, select 0.

Other Apps that are capable of using Button Events, will then know how many buttons the Parent Device is exposing. This will allow the App to ask you what you want to do when Button "1" is Pushed (or Held) ...versus Button "2", and so on.

Thanks, I will use one push button, so this info helps. I still have trouble with the sketch, I just uploaded the AlarmPanel and it was a nightmare for me. I suppose for the push button I should upload the multi, but I must read to configure it.

If you explain exactly what pins you want to use, and for what, I can help configure the sketch for you.

Thank you very much, I got some screenshots of my Konnected setup, basically I have all pins for open/close sensors and one pin for a momentary switch. I hope the screenshots helps.

Ok, I got the sketch working, 5 contacts, 1 alarm and 1 relay switch.

one question, in Konnected we can use pin RX, I use it for contact sensor, not possible with Hubduino, any chance to get it working?

I use 6 contacts and 1 relay per NodeMcu, I just want to swap the NodeMcu from the base without touching anything else for migration.

Thanks

Glad to hear you've got things working. Unfortunately, I have never tried using the Rx pin, but it may be possible. Have you given it a try? Use Pin 'D9' to see if it will work.

After flashing the board, you will probably need to unplug the USB connection, since the USB connection utilizes Pins D9(Rx) and D10(Tx) for logging data to the Arduino Serial Monitor window. If the USB cable is removed, and you power the board via alternate means, it may just work.

Please give it a try and let me know your results.

Ok, I tried but it's closed all the time, I just played with the sketch, maybe needs another config on the library. Thanks

edit, I have mising the PIN here but I don't know what to add:

//NodeMCU v1.0 ESP8266-12e Pin Definitions (makes it much easier as these match the board markings)
//*************************************************************************************************
#define LED_BUILTIN 16
#define BUILTIN_LED 16

#define D0 16 //no internal pullup resistor
#define D1 5
#define D2 4
#define D3 0 //must not be pulled low during power on/reset, toggles value during boot
#define D4 2 //must not be pulled low during power on/reset, toggles value during boot
#define D5 14
#define D6 12
#define D7 13
#define D8 15 //must not be pulled high during power on/reset

edit 2: found it, should be 3, I will test now.

edit 3: did not work, it shows as closed. maybe needs another config somewhere.

Yea, I was afraid of that. My guess is that the Serial.begin() for printing data to the Arduino Serial Monitor is conflicting with trying to use that pin for general I/O.

FYI - You do not need to uncomment these lines in the sketch. I added them purely as a reference. When you select the proper Board Type in the Arduino IDE (e.g. NodeMCU v1.0), these definitions are automatically assigned.

ok, so I will have to move a cable, but that is better than moving all. Thanks.

1 Like

Hi Dan,
I´m already a ST_Anything user, running all the lights and buttons of my house on your code. (you have no idea how glad I´m for your work)

I recently find out you´re playing with Hubitat and decided to maybe give it a chance.
So I have one question that I couldn't find this on hubitat tutorial videos.

Can I setup a simple button (push button) thought Hubitat? Just to turn on and of single switchs. Is it fast responsive?

All the button/relay controls now are local, coded in the Arduinos, but would be very handy if I could "code" this in the hub, not in the Arduino.

I can't do this with Smarthings because the response isn't reliable and neither fast enough.

So would it be possible, easy and advised to have all my buttons depending on the hub response?

I currently have around 50 buttons and 50 relays in 4 Arduino modules, all wired in the LAN.

Thank you Dan.

My Hubitat Hub has been very fast and reliable. There are some users who have Lutron Pico remotes throughout their house, controlling in-wall z-wave relays, and the response time is excellent.

All - I have just tested both an Ethernet and ThingShield device on Hubitat firmware 1.1.2.121. Everything seems to be running fine on my test HE hub. Just wanted to let you know in case you were holding off on upgrading your hubs.

Lol, I updated the hub and I did not notice any change, hubduino works fine.

One question, the code, it has some refresh settings? I ask because I see some delay in the first thing it does after long time doing nothing, for example, I use it for door contact sensors, the most important is the front door, at night the contant sensor will turn on the light, I see when has been maybe an hour and you open the door it will have some delay, but after that it will respond fast. I don't know what could be. I have a couple of custom apps installed, maybe the hub is getting slow or something.

What micro-controller are you using? - [Update] ESP8266 based on earlier posts above. Also, what type of light are you having it turn on? How many ST_Anything devices are defined in the sketch? [Update] should only be about 6 or 7, based on previous posts above.

I have seen similar behavior, and I have seen it caused by a few different issues. I have a magnetic reed switch on my door to the garage. This is tied into an Arduino Mega with an Ethernet shield. I have a Rule Machine rule set up to turn on the garage overhead GE Z-Wave Light Switch when this door is opened. The response time is ~.5 second 99.9% of the time. So, it can be very responsive, if everything is working well.

  1. By default, ST_Anything performs a periodic, every 5 minutes, REFRESH of all of its devices to make sure Hubitat is kept up to date (in case a packet was missed, for example during a hub reboot.) If you have a large number of devices defined in your sketch, and you happen to open the door while the 5 minute auto refresh is occurring, you may experience a small delay. The auto refresh feature timing can be modified or completely disabled by editing the 'constants.h' in the main ST_Anything library folder. There are comments highlighting the various options.

  2. I have seen custom App issues cause delayed reactions in a GE Light Switch activating. I can't explain what or why, but after I removed webCoRE and Homebridge my overall system performance seemed to be better and these delays went away. I can't really say for sure one of these apps is to blame, just my anecdotal experience.

  3. Early on I had Rule Machine calling Refresh on multiple GE Z-Wave Light switches and dimmers to try to make sure physical events were properly reflected in Hubitat. This seemed to cause overall delays in the Z-Wave mesh, so I ended up disabling all but one of these Refresh rules, and I only run that one once every minute.

Other ideas that come to mind...

  1. Assuming you're using WiFi connectivity for HubDuino, how congested is your network? How stable is it?
  2. If you're using an ESP8266, are you compiling with v2.3 of the ESP8266 Arduino Core support package?
  3. Try to determine if the status of your contact sensor (attached to HubDuino) is changing quickly when you open the door. To do so , have a phone/tablet/laptop displaying the Hubitat Hub's detailed device page for the HubDuino Child Contact Sensor device. You can watch the status change in real-time on that page. Open and close the door to see if the updates are nearly instantaneous or not. This will tell you if the data coming in is delayed, or if the outgoing command to the light is delayed.

Hope these tips help. Please let me know what you figure out.

1 Like

Great reply by the way, and thanks for taking the time.

I will look for this. Probably I will ask you more about.

I have SmartTiles, OtherHub, Hub link, Garadget, Nest, Rachio, maybe OtherHub and Smarttiles are overloaded... plus I have ActionTiles in ST with HE devices.

Yes, WiFi, I believe is very stable, I have Google WiFi Mesh system and is very stable on speed and signal.

Yes, your warnings are everywhere!

I did, this is why I know it was slow, it's like it was sleeping, it wake up but after the wake up everything is fine until goes to sleep again.

I suspect of the Aeon energy meter, the light linked to hubduino is a GE zwave switch and maybe the energy meter has congested the zwave mesh, but I don't see any logs of it, I will look more.

Thank you

Oh yea, I originally had OtherHub running as well, replicating all of my HubDuino devices to ST to use ActionTiles. I eliminated that one as well, as it seemed to slow things down a bit.

I have Alexa, Lutron, Nest, Hublink, IFTTT, Life360, Logitech Harmony, Advanced Button Controller, Rule Machine, Simple Lighting, Motion Lighting, Mode Manager, Device Monitor, Hubitat Dashboard, and SmartTiles installed. The system is very stable currently.

I actually bought a second Hubitat Hub as a development platform (and spare!) This gives me a place to try new things without impacting the family. Also nice to test new firmware before risking the production hub! :wink:

I still use OtherHub because of ST SHM, I use a Iris/Centralite keypad with the app SHM Delay, I don't know how to get that in HE. I have a monitored alarm conected to a relay in the Hubduino, when SHM gets an intrusion it will trigger the monitored alarm. This will be until the contract ends in 1.5 years then the plan was Scout from ST but probably will be in the same way I have it now but from HE to ST, I don't know, maybe I must open a new thread asking for this.

I need some help, probably I must open a new thread but I want your suggestion first. I have the hub very slow, using hubduino to turn on a light takes about 5 secs, I saw the contact response is instantaneous. Why Rule Machine is slow? I'm attaching all the apps I have. I'm on version 119. Thanks.