ESP8266 - Device Type and Sub Forum?


#1

Hi All,

I’ve been toying around with Arduino’s and various additional boards lately, specifically the ESP 8266. Found it does many things that I want it to do with http requests. http://192.168.1.51/light1=on as an example.

Im wondering if there is an easy to modify generic device type that will allow me to add buttons, dimmers, and such that I can easy just send the web requests to the ESP8266.

Was looking at this thread but didn’t have all the options I was looked for


ESP8266 Temperature Monitoring in Smartthings? (Where to start with a new device)
#2

Just wondering if there is a better sub-forum to add this request in if a moderator could move it for me?

Looking to find a solution for an Arduino/ESPP device that can be used by Smart Things. Maybe a device type that makes a post directly to the device or (likely more prefered) is a MQTT device type for Smart Things?

Does this exist?


#3

Anyone with some information on this?


#4

The MQTT bridge makes it pretty simple to tie ESP8266 devices into SmartThings by subscribing and publishing to MQTT topics. Here’s an example IoTea device I created using this approach.


#5

Hi Luma.

Thanks again for the info.

Question for you. I’ve just got my ESp8266 connect to wifi and working on getting it to publish to CloudMqtt. In your post, you also have a Smart App (for the phone), Device Handler (for the back end IDE) but what is the web service for?

Can you not interface SmartThings directly to CloudMQTT
or
Is the web service running on the client that’s using JSON to interface to SmartThings

Apologies but i’m still new at this.


#6

Hi @luma Luma,

So my MQTT Service is working great from the ESPP. However, I’m not sure if I want to go direct from CloudMQTT to Thingspeak or what extra benefits the Web service brings. The reason I’m asking is because the code is more complex than what I could do myself and not understanding it means it may be troublesome for it to do what I want.

Is there an explanation of what it does?


#7

The web service runs locally to bridge between MQTT and your ST hub. So there’s a device handler which runs in ST’s cloud, it sends events to you home ST hub, which sends events to the web service (the “bridge”), which translates them to MQTT to be sent to your broker (which might be in the cloud, mine is local). In the other direction, the MQTT broker sends MQTT events to the bridge, which in turn sends commands to your local ST hub.

The long and short of this is that you’re going to want a local system running all the time to run the web service. While you’re at it, you might as well run a local MQTT broker too.


#8

That’s great info Luma. Thank you very much.

My understanding is CloudMQTT is basically Mosquito? So if I can manage to set one of those up in a VM, I should be good.

The web service runs on any web server right? Like Apache?

Lastly, I thought all custom device handlers run in the cloud so you still require internet connectivity and its still a single point of failure?


#9

I have no knowledge of CloudMQTT so I cannot comment there. The MQTT bridge service is a node.js app, so you’ll want a node server to run it. Finally, you are correct in that an internet connection is still required for all of this to work.


#10

Great. Thanks Luma.

Will get started on my MQTT setup and see what I can do. I’m confident in the Arduino piece, the MQTT but not so much the bridge/json part :confused:


#11

Is it possible to run a mosquitto MQTT and the MQTT bridge locally but the Custom Device handler is still in the cloud? Do I have to run the above services on a VM in the cloud?

Curious why can custom device handlers not be pushed locally? I think the cloud connection is both a benefit and a limiter, no?

Just looking to clarify this
" the MQTT broker sends MQTT events to the bridge, which in turn sends commands to your local ST hub."

So if my MQTT broker and bridge are local, do they talk to the ST hub directly on my LAN or through the cloud?

I wonder if our community can just build a basic linux build already set up?


#12

At the present time no custom code can run locally. The reason is because Smart things is still a cloud-based architecture. The only thing that runs locally is the official smart lights smart app and some parts of the official smart home monitor, Plus some of the stock device type handlers for some zigbee and zwave devices. ( even official LAN integrations like the one for Philips Hue don’t run fully locally-- they require cloud access to authenticate the request . )

The reason is because under the current design, anything which is going to be run locally is pushed out to all hubs as part of the firmware update. There’s no way to limit A code update to an individual account. Which means any custom smart app or DTH would get pushed out to every customer, and they just don’t want to do that.

They said they would like to change this method in the future and allow for more local processing, but there’s no timeline for it now.

Detailed discussion in the following thread:


#13

I think my http device creator can meet your requirement: