There should be some clues in the logs. Turn on the logging on the Parent Device, and then click REFRESH. This will cause the microcontroller to send a status update for each of the devices.
The names assigned to each device in the sketch must follow the naming standard outlined in the ReadMe. For a contact sensor device, the device must be "contact1" or "contact2", etc... One cannot pick a random name like "frontdoor", as the name of the device is used to look up the proper child device driver type when creating the child and also for updating the child device's attribute(s).
I've been unable to find this searching so please forgive me if this is a dumb question. is there a capability to add multiple arduinos/esp32s? I wasn't able to change the hosting port from 35201 so it seemed like I could only have one device with multiple sensors. Am I missing something?
Yes, you can add multiple microcontrollers. Just create a new Parent device for each one, and make sure they each have a unique IP address. The port that Hubitat listens on in 39501, and the data is routed to the correct device based on its Device Network ID. In the case of HubDuino, the DNI is generated by the IP address of the microcontroller, which allows the data to be routed correctly.
This might be a bridge too far, but is there a straightforward way to log and show a graph of my temperature vs. time as recorded by my ESP32? I could cache up my temps and times in the ESP32, or I could cache them in the Hubitat, I don't have a preference. I know Hubigraph is no longer maintained and WebCore advertises you can do that, but WebCore looks daunting to me as it's more geared towards other things.
I use InfluxDB + Grafana running on an always-on home server in my house. Hubitat sends the data to InfluxDB for time-series archiving. Grafana then displays that data in an easy to use web app.
Yeah, unfortunately I don't have an always on server running in the house. I saw some stuff about sending data to Google Sheets, but I don't know how feasible that would be either. I wasn't sure if there was a way I could somehow format an array and send it over to Hubitat and get it to graph that. I poked around a bit and Hubitat isn't really setup for displaying generic data, it really tends to think of it as a sensor.
But I do see things like Weather tiles that can have an image as an attribute:
Could I build up an image somehow on the Arduino and send that to Hubitat to display? I realize this would require me to develop a child device, which also might be beyond my skillset. Just trying to see what options I really have here that might be relatively easy.
Do you have a Raspberry Pi hanging around no doing much? Even a small RPi Zero W would be enough to run InfluxDB and Grafana...
I am not aware of any way to transfer an image from a microcontroller to the HUbitat hub, unless you figure out how to use Hubitat's File Storage feature. Then, display that image file from a browser/dashboard?
Sending the data to a Google Sheet would be a pretty slick way of doing it as well.
Nope, unfortunately not. Maybe one day I will take the plunge and do get one and figure out how to do all that. But for me right now, that sounds like a lot more time than I want to put into it just to get a simple graph going. It's probably easier than I am fearing. But I want to get this project up and going ASAP, so I'll just deal with all that later.
I've been using ThinkSpeak to log data from a couple of my application. Not specifically HubDuino based but I bet you could get it to work. Here is an example logging the environment in my crawlspace;
OK, I thought I would share back with the community what I've got working. As of this morning all is going well with phase 1 of my (evil) plan.
I can now automate the flow of water to either the pond or the house, and have rules in place to make sure the house gets a good water supply while the water softener is running. I'm not yet monitoring the level of the pond, that will come later, but the ESP32 is doing it's job and sensing whether the pump is running and monitoring temperature. I also came across Quick Chart, which is VERY easy to use for charting basic data. Installing it was a bit of a head scratcher, but once in, it was very intuitive to use.
Here's my pump house (before cleaning up the wiring):
Is it possible to use hubduino with sensors not yet listed in on the github? I mean, to send arbitrary variables.
I'm using it with bme280s, and works like charm (esp8266), but I'd like to use it with Sensirion SCD30, which gives CO2, Temperature, and Humidity. It has I2C interface and very easy to implement due to the available libraries.
So actually I have 3 float variables that I wish to send over to Hubitat.
It is pretty easy to simply add a new sensor device class to support a new sensor. Just start by copying the PS_AdafruitBME280_TempHumidPress.h and PS_AdafruitBME280_TempHumidPress.cpp files to new ones named for the SCD30 sensor. Then, simply modify all of the internal code to use whatever library is needed for the SCD30. The Temperature and Humidity will be easy to handle. CO2 may be a little tricky... It does appear that Hubitat now does support a Capability called CarbonDioxideMeasurement with a numeric attribute of "carbonDioxide". I would need to add support for that in the Hubitat HubDuino drivers. That would not be too difficult, if you can handle the Arduino code side of things. Let me know how you'd like to proceed. Sounds link a decent addition to HubDuino!
Wow! That is one pricey sensor, eh? About $60 USD from vendors here in the USA. I was tempted to purchase one and simply add support for it... but not for $60!
Of course... If you want to send me one, I could add support for it to HubDuino for you...
I have been trying to get "ST_Anything_Multiples_ESP32WiFi.ino " to compile on my ESP32, but keep getting the following error. Has anyone experienced this?
I am using Arduino 1.8.16 & ESP32 V1.0.6
Arduino: 1.8.16 (Windows 10), Board: "ESP32 Dev Module, FTDI Adapter, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, Verbose, Disabled"
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp: In static member function 'static void st::SmartThingsESP32WiFi::WiFiEvent(arduino_event_id_t)':
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_READY' not handled in switch [-Werror=switch]
switch (event) {
^
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_SCAN_DONE' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_STA_STOP' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_STA_AUTHMODE_CHANGE' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_STA_GOT_IP6' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_STA_LOST_IP' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_AP_START' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_AP_STOP' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_AP_STACONNECTED' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_AP_STADISCONNECTED' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_AP_GOT_IP6' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WIFI_FTM_REPORT' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_ETH_START' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_ETH_STOP' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_ETH_CONNECTED' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_ETH_DISCONNECTED' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_ETH_GOT_IP' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_ETH_GOT_IP6' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WPS_ER_SUCCESS' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WPS_ER_FAILED' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WPS_ER_TIMEOUT' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WPS_ER_PIN' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_WPS_ER_PBC_OVERLAP' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_SC_SCAN_DONE' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_SC_FOUND_CHANNEL' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_SC_GOT_SSID_PSWD' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_SC_SEND_ACK_DONE' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_PROV_INIT' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_PROV_DEINIT' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_PROV_START' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_PROV_END' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_PROV_CRED_RECV' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_PROV_CRED_FAIL' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_PROV_CRED_SUCCESS' not handled in switch [-Werror=switch]
C:\Users\matts\OneDrive\Documents\Arduino\libraries\SmartThingsESP32WiFi\SmartThingsESP32WiFi.cpp:72:10: error: enumeration value 'ARDUINO_EVENT_MAX' not handled in switch [-Werror=switch]
cc1plus.exe: some warnings being treated as errors
Multiple libraries were found for "WiFi.h"
Used: C:\Users\matts\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\libraries\WiFi
Not used: C:\Users\matts\OneDrive\Documents\Arduino\libraries\WiFiNINA
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
Not used: C:\Users\matts\OneDrive\Documents\Arduino\libraries\WiFiEspAT
exit status 1
Error compiling for board ESP32 Dev Module.
I'll prepare the Arduino code and send it to you in the forthcoming days. I'd be grateful if you could include the CO2 in the Hubduino drivers.
I'm controlling the central ventilation system with multiple parameters (season, inside and outside temperature, humidity, on demand override), but an important parameter is missing, the CO2 level. I think others would benefit from this addition too.
I have added support for Hubitat's "Carbon Dioxide Measurement" capability to the latest "HubDuino Parent Ethernet Beta" driver code.
See this post for instructions on using the new version which should eliminate the need for most of the custom Child drivers from HubDuino.
This is a breaking change, however you can run old parent devices running the "HubDuino Parent Ethernet" driver alongside a new parent device running the "HubDuino Parent Ethernet Beta" driver. Be sure to install the new parent driver, along with all of the new custom "hubduino-component-{name}.groovy" drivers on your hub. All of the new code is in the GitHub repo.
I tested the CO2 measurement support by simply adding a PS_Voltage device, and using the new child device name "carbonDioxide1" as shown below.
So, as long as your new ST_Anything device sends its three measured values, using the standard naming convention ("temperature1 55.1", "humidity1 43.2", and "carbonDioxide1 123.4"), all three child devices will be automatically created on the HE Hub for use in whatever Apps you'd like.
Has anyone else had issues with servos jumping position?
I have an ESP8266 driving 4 servos - mostly they work beautifully, but I've noticed that sometimes they seem to jump randomly.
I think I've spotted it happening today. I'm using a slow speed - the default rate is set to 30000. It seems to be that when instructed the servo moves to the correct position, then jumps randomly at full speed to another angle.
I've seen this happen three times when the servo was directed 180 deg/100% and it then jumped to around 40% once and 60% the other time.
When you next direct the servo to move, it jumps to 180, then moves slowly to the required position.....
I've not seen it happen when directed to angles other than 180, though that may just be chance.
Does this ring any bells with anyone?
Cheers,
James