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

The output of the detector is a simple 0 or 1. I considered using it to run a relay into a contact input. It would isolate the devices and a simple on / off .

Do you have a link to the specific model of flame detector? I could then tell you how I would wire it.

All digitals are 0 or 1... I think the pertinent data is what voltage, or is it a dry contact?

Here it is;;

0 and 5 vdc. If it had dry contacts I would connect it to a contact.

Looks like it can work at 3.3v based on the description..

“ the working voltage of 3.3V-5V”

If you power it directly from the ESP8266, you should be able to wire its DO to one of the ESP’s DI pins. Just make sure you do not enable the “Internal PullUp” feature of the IS_Contact Device as I am assuming this device outputs either 0v or 3.3v when powered via 3.3v.

Thanks for looking Dan

Has anyone explored getting an SGP30/CCS811/BME680 working for AQI (and Temp/Humidity for BME680)? I would love to dig in but I am not sure I know where to start...

The BME680 looks closest to the BME280 that already has support for Temp/Humidity/Pressure. Maybe that would make a good starting place for me...

@ogiewon What is the best method to share files? Should I create a GitHub account or is there another way to post files? I have just created a 10k thermistor sensor polling sensor, and I have a PWM dimmer with ramp on/off that I would like to contribute.

1 Like

PM me and we can discuss options.

@ogiewon I got a Wemos D1 mini and relay shield to try and do the fireplace controller. I connected & configured using the same code I was using on my LinkNode R4, but changed the PIN_S2 definition to point to "D1". My relaySwitch definition is below:

static st::S_TimedRelay executor1(F("relaySwitch1"), PIN_S2, LOW, false, 7200000, 0, 1, 0);  // turn relay on for max of 60 minutes. 

I configured a new Hubduino Ethernet device with the new IP & MAC. My issue is that relaySwitch1 never gets auto-created within this new device. I know my device is talking to Hubitat as I'm getting RSSI data back. Is there any way I can test via curl against the Wemo device to see if triggering D1 will trigger the relay? Any idea why it's not auto-creating the relaySwitch1 child device? I have the drivers code installed as I have the LinkNode R4 on the same Hubitat device.

Thanks!
Brian

Brian - did you change the Arduino IDE's Board Manager to use the Wemos D1 board instead of the generic ESP8266 board?

Sounds like you're running old HubDuino Groovy Driver code. The latest version only requires the IP address of the micro-controller. You can safely upgrade to the new version as it is backwards compatible with existing installations. It also eliminates the need to specify the number of buttons (which does require the Arduino libraries to be updated to the current version as well.)

nope, unfortunately when I originally wrote the Ethernet communications library, I really did not know what I was doing. So, the data is not in a form that is easily replicated via curl.

Try running the ST_Anything_Multiples_ESP8266WiFi.ino sketch instead, as it is designed to run with a relaySwitch device already. Don't change anything other than the WiFi/Network section of the sketch to see if it runs correctly on your Wemos D1 board. You can then comment out all of the other devices in that sketch once things are working correctly.

Well, when I upgrade the ethernet code, disconnected the relay board and rebooted the Wemos mini, the relayswitch device showed up. Of course the relay didn't toggle, so I disconnected everything and traced it back to an issue where D1 won't work for a relay, so I had to wire it to D5 instead (Wemos D1 mini with relay shield (why does D1 not operate relay but D5 does)? : esp8266). Anyway, of course HubDuino is working as designed once again :slight_smile:

Thanks & Happy Holidays!
Brian

2 Likes

Dan:

Is there a way to set the ip hostname ?

Mike

Yes, there is actually a way to set the micro-controller's host name. It was added after the example sketches were written, which is why it is a little obscure/hidden feature...

In your sketch' setup() routine, you should have the following section of code. As you can see from one of my personal sketches, I have added an additional string parameter to the end which is used as the host name.

You could also comment out the first constructor and uncomment the second one if you'd prefer to use DHCP. Just be sure to reserve the IP address in your router's DHCP server as it must not change.

  //Create the SmartThings ESP8266WiFi Communications Object
    //STATIC IP Assignment - Recommended
    st::Everything::SmartThing = new st::SmartThingsESP8266WiFi(str_ssid, str_password, ip, gateway, subnet, dnsserver, serverPort, hubIp, hubPort, st::receiveSmartString, "HubDuinoAttic");
 
    //DHCP IP Assigment - Must set your router's DHCP server to provice a static IP address for this device's MAC address
    //st::Everything::SmartThing = new st::SmartThingsESP8266WiFi(str_ssid, str_password, serverPort, hubIp, hubPort, st::receiveSmartString, "HubDuinoAttic");

3 Likes

Can it be done this way with a variable in keeping with the general organization of the sketch?

String str_hostname = "WiFiSwitch71";

st::Everything::SmartThing = new st::SmartThingsESP8266WiFi(str_ssid, str_password, ip, gateway, subnet, dnsserver, serverPort, hubIp, hubPort, st::receiveSmartString, str_hostname);

Mike

Yes, that should work.

That's what I have been using and the hostname shows up in Arduino IDE ports list, but the host name does not show up in my router's client list. The sketches are properly connecting and working so connectivity is not an issue.

A few Tasmota based devices I have show the hostname and the hubitat hub and and other devices show hostnames in the client list.

Any ideas where to look?

Mike

Unfortunately, I do not have any idea why your router is not displaying the host name. You could switch to DHCP, and the reserve a static IP address for each HubDuino device. Often, in the DHCP reservation screen of the router you can assign a host name as well.

1 Like

I already checked the router options and no such capability. I thought there might be something in one of the libraries since tasmota based devices are showing the hostnames and the only network difference (besides coding) is they are static DHCP.

Its no big deal. Thanks anyways.

Mike

1 Like