I don’t think there’s an official mechanism, but hopefully someone will correct me if I’m wrong.
It IS possible to use an Edge driver to communicate with a separate server device on the same LAN. Then have that server device send out messages. For example, TAustin has an mqtt project based on this structure.
Take a look at his LAN projects. They are on the Miscellaneous quick browse lists in the community-created wiki. Really clever stuff.
But of course this method does require a server device.
Yes I am looking at that. It isn’t quite what I am looking for as I think (please correct me if I am wrong) you have to have an edge driver for every device you want to send a command to and I am looking to be able to send a command to any hub connected device.
The closest I have got in my thinking is to have my local service trigger a rule (through a single edge driver) which could trigger a device…I would have to manage the rule definition. This seems clunky …but I haven’t completely given up.
The integrations like the MQTT project don’t require an edge driver for every single hub connected device. There’s just one edge driver that takes you to the integration server. But You can ask in that project thread for more details.
Yeah, I understand. We as customers have very little access to the hub. Smartthings basically just regards it as a box of radios plus the smartthings-supplied firmware. They don’t let us run stuff on it most of the time.
Hopefully someone will give you an answer eventually.
There are 2 MQTT current threads. One from a person asking a question, and one from a developer who created the integration project. I don’t see any posts from you in the actual integration thread, you might try there.
Not sure if I’m following what you are wanting to do. If you want to send a command to a local device, but have no dependence on the cloud, then that excludes the use of the mobile app. But it doesn’t exclude running automations, since they can be 100% local. So are you OK with triggering your device from an automation, or do you want to also be able to do it manually? If manually, what would you use - some application running on a computer on your LAN?
OK, got it. That would be fairly simple assuming the device has some kind of published API or supports something like MQTT.
Are you going to develop this application yourself?
The other thing is, if you controlled this device remotely, and it is also a SmartThings device, then you’d want to be sure that SmartThings is also getting synched with any state changes. That would happen automatically if the device is already integrated into SmartThings, but if you need to, your app could also use the SmartThings API to update SmartThings.
Hmmm… I don’t think I am explaining this properly sorry!
As an example, Say I have a zigbee light connected to my hub using a stock default driver. I want a way to tell smartthings to turn this on from a local application that I will write. The API you mention would be whatever smartthings supports (or an exposed interface from a smartapp, this would be easy I would think, but, it would not be local would it?)
Or…using MQTT…say I publish an MQTT message to turn said zigbee light on.
I think this MQTT pattern was mentioned in the long MQTT thread, where you noted that an edge driver cannot send a command to device controlled by a different driver.
I’ll be honest, I think you have two choices here.
just wait and see what Matter brings. Matter is “local first“ and there are going to be several apps which can control matter compatible devices locally, as Apple’s HomeKit already does. And as ikea Dirigera probably will. That may put market pressure on smartthings to move their app local, but no promises.
or, if local app control is really important to you right now, move to a different platform that has it. There are several that do.
Trying to figure out how to get smartthings to do this with its current architecture design is probably way more work than it’s worth given the alternatives.
Thanks…I am getting to the ‘move platform’ point, but given the effort involved and the fact that most things sort of ‘work’ I want to try and get an ‘official’ statement that what I am asking for is not supported by the Smartthings Architecture?
I also haven’t given up on the ‘rules’ approach as I think that is a mechanism that can execute globally and can impact multiple devices. Its just a horrible learning curve for me
Have we lost all contact with the Smartthings Dev team? Is there a way I can get a view from them?
Ohhhh, I see. Yea, unfortunately zigbee and zwave devices are going to need to be controlled by a driver on the hub.
Of course that driver is running locally and can control the device without a cloud connection. So what you need is a way to trigger the Edge driver to perform whatever command you want to send to the device.
Sorry it took me so long to understand
This is certainly achievable and could be accomplished in more than one way. If MQTT is an option, then for sure you could simply send an MQTT message and I have a driver that creates and controls devices based on those messages. You could then create an automation routine that controls the zigbee/zwave device based on the virtual MQTT devices that my driver creates. Simple!
I would also promote the LAN motion sensor is a form of a solution too. While designed to serve as a single purpose device, my Blue Iris controlling a lan motion sensor is definitely a version of what was described.
Combined with the web requestor you have both directions.
It feels like the gap comes back to interacting with other devices outside of routines.
Lastly, I would echo @Davec comments. I, too, would have abandoned ST without Tod’s (and others) extensive work with edge drivers.
MQTT is definitely an option. So, I would have to make your driver create a virtual device for every device I want to send an MQTT msg for? And then create an automation routine that matches that virtual device with the zigbee device?
Yes, using my edgebridge app would be an alternative to using MQTT. Not only is there a motion device on the SmartThings end, but I also have a presence sensor version and a simple momentary button for triggers.
Yes you got it. How many devices are we talking about, roughly? If it’s a huge number it definitely would be a proliferation of devices on the SmartThings side.
Regarding a SmartApp: I’m not sure it could really address what you are trying to do. They are really geared towards interacting with SmartThings through their servers, which is something you’re trying to avoid. Although it is the case that you can implement a SmartApp on your own local LAN (just takes a computer with nodeJS and an internet-accessible IP address), it still does it’s thing through the SmartThings server, and not locally.
Outside of MQTT and my edgebridge application, if you want to communicate directly with an Edge driver from an application on your local network, then you will have to develop a custom Edge driver AND take care of all the discovery and communication between the two. The complicating factor is that Edge drivers cannot reserve specific ports. So the Edge driver always has to initiate the link up.