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

Temperature info will be coming from sensors in the rooms via the hub, not from sensors attached to the hubduino. Servos will be the only devices connected to the hubduino. The reason I would like to coordinate the dampers is to direct the most air to rooms that are the farthest away from target temperature.

I use a programmable thermostat (Lennox iComfort) that is integrated with HE. I do not control it via the hub, but do access data about setpoints, current temperature at the thermostat, and operating mode. The issue I am wanting to address stems from large target temperature changes that occur when the thermostat program exits a setback condition and tries to adjust temperature about 10 degrees F. During this large temperature adjustment, some rooms reach target faster than others so balancing of the duct dampers is required. I can get it set up pretty well for cooling mode or heating mode, but the damper positions are different for each of those modes. It usually takes a lot of manual interventions as the seasons change.

My goal is to be able to set a damper position based on more than just the temperature error for the room it is connected to. I would like to prioritize rooms that have the highest temperature error. This prioritization calculation is what drives the need for sharing data for all the rooms.

2 Likes

It really feels like a custom Hubitat App might be your best bet. This gives you one place to control all of the logic, and easily tweak it as needed. The App would have access to all of the necessary data from the temperature sensors and thermostat, and can send servo position commands to each vent.

1 Like

I'm not so good with Groovy. Sounds like I need to learn it.

I know how you feel. I usually just start with someone else's code that is at least similar to what I want to do, and then hack it to work for me. Basic structure of an App is

  1. get user input for all of the devices needed to run the app
  2. subscribe to events from those devices, and supply functions which can handle the events from the subscriptions
  3. add logic to the event handler functions
  4. Add scheduled functions which can cause the app to wake up periodically even if no new events have come in.

At least, that's how I approach a basic groovy app for Hubitat... There are lots of great community developers that I am sure would help you along the way.

1 Like

Maybe we should work together...
I have a Lennox iComfort furnace, and I am also making smart registers with an ESP01 and servo.
I want to do the exact same type of control, but I am changing my heat/cooling setpoints to the furnace via presence. I do not plan to change the room setpoints via presence.

1 Like

Excellent offer. So we don't hijack Dan's topic, I created a new topic for this HVAC zone control app. I will add my thoughts in the new topic when time allows.

1 Like

@ogiewon hope you don't mind hijacking your thread for a single post :wink:

I had on a drawer a set of arduino and related similar parts that are brand new and never used. This parts were to be used on a project that never materialized.
So I'm selling them away to any EU customer that is willing to pay for shipping and roughly the parts at a discount price.

The parts I have are:

5 x 19mm Flat Pins Type Switch Connector
3 x 19mm Metal Push Button Switch Waterproof Latching Self-lock 5v Multi Color
1 x 2.4 inch TFT LCD Touch Screen Shield for Arduino UNO R3 Mega2560 LCD Module
1 x English Nextion 2.4" TFT 320 x 240 Resistive Touch Screen USART UART HMI Serial LCD Module Display For Arduino Raspberry Pi 2 A+
1 x ESP-12F (ESP-12E upgrade) ESP8266 Remote Serial Port WIFI Wireless Module ESP8266 4M Flash ESP 8266
1 x ESP-32S ESP-32 Development Board WiFi Wireless Bluetooth Antenna Module For Arduino 2.4GHz Dual Core
1 x Mini 2In1 DC Step-Down Step-Up Converter 1.8-5V to 3.3V Power Wifi Bluetooth ESP8266 HC-05 CE1101 LED Module for arduino Diy Kit
1 x MB102 Breadboard Power Supply Module 3.3V 5V Solderless Breadboard Voltage Regulator for arduino Diy Kit
1 x ESP01 Programmer Adapter UART GPIO0 ESP-01 Adaptater ESP8266 CH340G USB to ESP8266 Serial Wireless Wifi Developent Board Module
1 x MB102 white Breadboard Dedicated Power Module 2-way 5V/3.3V for ARDUINO

1 x Arduino Starter Kit

As such if anyone is Interested let me know. The asking price is 35€ plus shipping. ( For everything).
P.s some stuff is not even here and is on transit but should arrive in the next couple of days.

P.s PM to not hijack the thread.

So, I have new info on the saga of the locked up board @ogiewon. I don't know why, but 3 of my boards locked up yesterday night. I went around and reset 2 of them manually but the third was out in the garage and I didn't immediately go out and rest it. I kind of forgot about it being locked up. Well, I log in this morning and BAM it's back...all on its own. I don't know how or why but it appears that eventually it was able to reestablish communication with the hub. This just gets stranger and stranger.

1 Like

It's like a kid that you ground and that you ignore she whims, after a while they come around;)

I must admit following this conversation is quite intriguing. You all are doing incredible things with @ogiewon’s app and platform. I look forward to the final results as I would like to the DIY shades and also am intrigued by the zone comfort solution. Keep up the great work!

2 Likes

Having issues with a BME280 sensor that was working on the Adruino/ST before I switched over to Hubtat. I had turned commented out the lines for the BME in my sketch (god only knows why at this point) anyway, uncommenting and restarting the Arduino got me nowhere. Watching the serial monitor I assume I should see the Arduino realize the sensor is there and show the sensor readings. The sensor is outside in an unheated enclosure. I live in Michigan and I assume it can handle the weather. I have power to it. What else can I check ?

Did you uncomment both lines in the sketch’s setup() routine? The first is to declare the device. The second is to add it to Everything.

I think I see it now I forgot to uncomment

st::Everything::addSensor(&sensor1);
st::Everything::addSensor(&sensor2);
st::Everything::addSensor(&sensor3);
//st::Everything::addSensor(&sensor4);

I didn't see until just now that sensor4 is the BME280

I'll give that a try and report back

Thanks Dan

Sometimes I think I am my own worst helper. That was it. Thanks Dan

1 Like

Dan,
Are there any settings that can be changed to adjust the readings for pressure in relation to sea level?

Also to change the output to Hubitat to inHG instead of millibars?

These would be good additions to the Child Pressure Driver as user preferences. If you’d like to give it a try, you can look at the Child Temperature driver to get some ideas on how to accomplish this.

1 Like

My high torque digital servos finally showed up, so I am back to testing with the new EX_Servo driver. I found that the default min and max microsecond values used by the servo library are way off for these servos. at 0 degrees the servos were trying to travel beyond their physical stops, and at 180 degrees they had a lot of unused travel. I took the simple way out and modified EX_Servo.cpp to include min and max values in microseconds.

m_Servo.attach(m_nPinPWM)

was changed to

m_Servo.attach(m_nPinPWM, 850, 2725)

where the two values need to be tuned to the specific servos in use. Default values are 544 and 2400.

I am posting this in case someone else runs into the same issue. At some point I might modify EX_Servo to allow optional arguments for specifying these values in the sketch. That would enable fine tuning for a mix of servos that have different min and max timing needs.

1 Like

Dan, I propose the following changes to EX_Servo.cpp:

		if (!m_Servo.attached()) {
//			m_Servo.attach(m_nPinPWM);
			m_Servo.attach(m_nPinPWM, 544, 2915);
		}

//		if (m_nTargetAngle < 0) {
//			m_nTargetAngle = 0;
//		}
//		else if (m_nTargetAngle > 180) {
//			m_nTargetAngle = 180;
//		}

//		m_nTimeStep = (m_nCurrentRate / 180);  //Constant servo step rate assumes duration is the time desired for maximum level change of 100
		m_nTimeStep = (m_nCurrentRate / (m_nMaxLevelAngle - m_nMinLevelAngle));  //Constant servo step rate assumes duration is the time desired for maximum level change of 100

I believe this will be completely backwards compatible for users that specify angles in the 0-180 degree range. For those that want to specify start, min and max microseconds in the range of 544 to 2915 instead of degrees, this gives a new level of control. It takes advantage of a feature I found in the servo library where values are interpreted as angle or microseconds depending on the value itself.

This works so far on my bench specifying start, min, and max angles in the sketch as either degrees or microseconds. I need to look for ways to break it, but so far I like it.

What model of servo are you using?