Difference between revisions of "Send Hub Events"

From Hubitat Documentation
Jump to: navigation, search
(Added note on future (?) ST Groovy IDE deprecation)
Line 1: Line 1:
 
{{Top}}
 
{{Top}}
  
<big>Hubitat Elevation provides an integration to help smooth your migration from SmartThings, or as needed for devices that only work in SmartThings, when the primary hub is Hubitat Elevation. This makes it is possible to continue to use devices on your SmartThings hub until migration is complete. On the ''Master hub'', this is accomplished with the built-in app called [[Hub Link|'''Hub Link''']], which is used to link devices on your SmartThings hub to your Hubitat Elevation hub. Here's how to get started:</big>
+
Hubitat Elevation provides an integration to help smooth your migration from SmartThings, or as needed for devices that only work in SmartThings, when the primary hub is Hubitat Elevation. This makes it is possible to continue to use devices on your SmartThings hub until migration is complete. On the ''Master hub'', this is accomplished with the built-in app called [[Hub Link|'''Hub Link''']], which is used to link devices on your SmartThings hub to your Hubitat Elevation hub.
  
===<big>Installing Send Hub Events</big>===
+
'''NOTE''': SmartThings has announced plans to deprecate their "classic" Groovy IDE (integrated development environment). It is possible the below will stop working at any time.
<big>If you have not already installed '''Hub Link''' on the ''Master hub. See the'' [[Hub Link|'''Hub Link''']] documentation for details on how to install and configure Hub Link.</big>
 
  
*<big>Install [[Hub Link|'''Hub Link''']] on your Hubitat Elevation hub and enter the IP address of your SmartThings hub. The IP address of the SmartThings hub can be found in the SmartThings IDE under ''My Hubs''.</big>
+
Here's how to get started:
**<big>'''NOTE''': The SmartThings hub and the Hubitat Elevation hub must be on the same Local Area Network and must share the same subnetwork.</big>
 
  
=== <big>Step 1: Creating the "Send Hub Events" SmartApp on your SmartThings hub</big> ===
+
===Installing Send Hub Events===
 +
If you have not already installed '''Hub Link''' on the ''Master hub. See the'' [[Hub Link|'''Hub Link''']] documentation for details on how to install and configure Hub Link.
  
#<big>Sign-in to the SmartThings IDE at <nowiki>https://graph.api.smartthings.com/</nowiki></big>
+
*Install [[Hub Link|'''Hub Link''']] on your Hubitat Elevation hub and enter the IP address of your SmartThings hub. The IP address of the SmartThings hub can be found in the SmartThings IDE under ''My Hubs''.
#<big>Choose '''My SmartApps''' at that top, then click the '''Create New SmartApp''' button on the right.</big>
+
**'''NOTE''': The SmartThings hub and the Hubitat Elevation hub must be on the same Local Area Network and must share the same subnetwork.
#<big>Select the '''From Code''' tab and paste the code copied from this link [[https://raw.githubusercontent.com/hubitat/HubitatPublic/master/smartapps/hubitat/Send_Hub_Events.src/Send_Hub_Events.groovy Click HERE]]</big>
 
#<big>Select the '''Create''' button at the bottom.</big>
 
#<big>Choose '''Publish''', and select '''For Me''' from the drop-down that appears..</big>
 
  
=== <big> Step 2: Install the new SmartApp on your Smart Things hub</big> ===
+
=== Step 1: Creating the "Send Hub Events" SmartApp on your SmartThings hub ===
  
#<big>Launch the "SmartThings" app on your mobile device. Select the "Automation" tab. Scroll to the "My Apps" tab. Select "Send Hub Events."</big>
+
#Sign-in to the SmartThings IDE at <nowiki>https://account.smartthings.com/</nowiki>
#<big>Enter the IP address of your Hubitat Elevation Hub which can be found on the Settings page by selecting [[Hub Details|'''Hub Details''']].</big>
+
#Choose '''My SmartApps''' at that top, then click the '''Create New SmartApp''' button on the right.
#<big>Select the devices in your SmartThings hub that you want to appear on your Hubitat Elevation hub. These will primarily be sensor devices. If you need more than one attribute of a sensor in Hubitat Elevation, you can use the Omni Sensor selection to select devices that report multiple attributes.</big>
+
#Select the '''From Code''' tab and paste the code copied from this link [[https://raw.githubusercontent.com/hubitat/HubitatPublic/master/smartapps/hubitat/Send_Hub_Events.src/Send_Hub_Events.groovy Click HERE]]
#<big>Save the SmartApp from the SmartThings mobile app, and Send Hub Events will send your device selections to your Hubitat Elevation hub. The Hub Link app will create virtual devices for each SmartThings device and label them with the same name as found on SmartThings. The name shown on your Hubitat Elevation hub may be edited if you wish, but '''don't edit the Device Network Id,''' since this is used by the two systems to identify devices.</big>
+
#Select the '''Create''' button at the bottom.
#<big>Events for the devices you selected on SmartThings will now happen for shadow virtual devices on your Hubitat Elevation hub. These special virtual devices can by used in Rule Machine or other automations on your Hubitat Elevation ''Master hub''.</big>
+
#Choose '''Publish''', and select '''For Me''' from the drop-down that appears..
  
===<big>About Send Hub Events</big>===
+
=== Step 2: Install the new SmartApp on your Smart Things hub ===
<big>This is a one-way integration. Events that happen on SmartThings are sent to Hubitat Elevation. Events that happen in Hubitat Elevation '''are not sent''' to SmartThings. If you try to operate the special virtual shadow devices on your Hubitat Elevation hub, no corresponding action will occur on your SmartThings hub.</big>
 
  
<big>If you remove one of the selected devices from SmartThings, the shadow virtual device on your Hubitat Elevation hub will still exist, but will no longer function. You will have to remove it manually from your Hubitat Elevation hub. Similarly, if you de-select one of the selected devices on your SmartThings hub, the shadow virtual device on you Hubitat Elevation hub will have to be manually removed.</big>
+
#Launch the "SmartThings" app on your mobile device. Select the "Automation" tab. Scroll to the "My Apps" tab. Select "Send Hub Events."
 +
#Enter the IP address of your Hubitat Elevation Hub which can be found on the Settings page by selecting [[Hub Details|'''Hub Details''']].
 +
#Select the devices in your SmartThings hub that you want to appear on your Hubitat Elevation hub. These will primarily be sensor devices. If you need more than one attribute of a sensor in Hubitat Elevation, you can use the Omni Sensor selection to select devices that report multiple attributes.
 +
#Save the SmartApp from the SmartThings mobile app, and Send Hub Events will send your device selections to your Hubitat Elevation hub. The Hub Link app will create virtual devices for each SmartThings device and label them with the same name as found on SmartThings. The name shown on your Hubitat Elevation hub may be edited if you wish, but '''don't edit the Device Network Id,''' since this is used by the two systems to identify devices.
 +
#Events for the devices you selected on SmartThings will now happen for shadow virtual devices on your Hubitat Elevation hub. These special virtual devices can by used in Rule Machine or other automations on your Hubitat Elevation ''Master hub''.
  
<big>If you remove a shadow virtual device from Hubitat Elevation, that has no effect on SmartThings and you should therefore de-select them from the Send Hub Events SmartApp. If you remove [[Hub Link|'''Hub Link''']] from your Hubitat Elevation hub, it will attempt to remove all of the shadow virtual devices, but this may fail if any of those devices are still in use by apps on your Hubitat Elevation hub.</big>
+
===About Send Hub Events===
 +
This is a one-way integration. Events that happen on SmartThings are sent to Hubitat Elevation. Events that happen in Hubitat Elevation '''are not sent''' to SmartThings. If you try to operate the special virtual shadow devices on your Hubitat Elevation hub, no corresponding action will occur on your SmartThings hub.
 +
 
 +
If you remove one of the selected devices from SmartThings, the shadow virtual device on your Hubitat Elevation hub will still exist, but will no longer function. You will have to remove it manually from your Hubitat Elevation hub. Similarly, if you de-select one of the selected devices on your SmartThings hub, the shadow virtual device on you Hubitat Elevation hub will have to be manually removed.
 +
 
 +
If you remove a shadow virtual device from Hubitat Elevation, that has no effect on SmartThings and you should therefore de-select them from the Send Hub Events SmartApp. If you remove [[Hub Link|'''Hub Link''']] from your Hubitat Elevation hub, it will attempt to remove all of the shadow virtual devices, but this may fail if any of those devices are still in use by apps on your Hubitat Elevation hub.

Revision as of 00:38, 17 January 2022

Go to the top of the page

Hubitat Elevation provides an integration to help smooth your migration from SmartThings, or as needed for devices that only work in SmartThings, when the primary hub is Hubitat Elevation. This makes it is possible to continue to use devices on your SmartThings hub until migration is complete. On the Master hub, this is accomplished with the built-in app called Hub Link, which is used to link devices on your SmartThings hub to your Hubitat Elevation hub.

NOTE: SmartThings has announced plans to deprecate their "classic" Groovy IDE (integrated development environment). It is possible the below will stop working at any time.

Here's how to get started:

Installing Send Hub Events

If you have not already installed Hub Link on the Master hub. See the Hub Link documentation for details on how to install and configure Hub Link.

  • Install Hub Link on your Hubitat Elevation hub and enter the IP address of your SmartThings hub. The IP address of the SmartThings hub can be found in the SmartThings IDE under My Hubs.
    • NOTE: The SmartThings hub and the Hubitat Elevation hub must be on the same Local Area Network and must share the same subnetwork.

Step 1: Creating the "Send Hub Events" SmartApp on your SmartThings hub

  1. Sign-in to the SmartThings IDE at https://account.smartthings.com/
  2. Choose My SmartApps at that top, then click the Create New SmartApp button on the right.
  3. Select the From Code tab and paste the code copied from this link [Click HERE]
  4. Select the Create button at the bottom.
  5. Choose Publish, and select For Me from the drop-down that appears..

Step 2: Install the new SmartApp on your Smart Things hub

  1. Launch the "SmartThings" app on your mobile device. Select the "Automation" tab. Scroll to the "My Apps" tab. Select "Send Hub Events."
  2. Enter the IP address of your Hubitat Elevation Hub which can be found on the Settings page by selecting Hub Details.
  3. Select the devices in your SmartThings hub that you want to appear on your Hubitat Elevation hub. These will primarily be sensor devices. If you need more than one attribute of a sensor in Hubitat Elevation, you can use the Omni Sensor selection to select devices that report multiple attributes.
  4. Save the SmartApp from the SmartThings mobile app, and Send Hub Events will send your device selections to your Hubitat Elevation hub. The Hub Link app will create virtual devices for each SmartThings device and label them with the same name as found on SmartThings. The name shown on your Hubitat Elevation hub may be edited if you wish, but don't edit the Device Network Id, since this is used by the two systems to identify devices.
  5. Events for the devices you selected on SmartThings will now happen for shadow virtual devices on your Hubitat Elevation hub. These special virtual devices can by used in Rule Machine or other automations on your Hubitat Elevation Master hub.

About Send Hub Events

This is a one-way integration. Events that happen on SmartThings are sent to Hubitat Elevation. Events that happen in Hubitat Elevation are not sent to SmartThings. If you try to operate the special virtual shadow devices on your Hubitat Elevation hub, no corresponding action will occur on your SmartThings hub.

If you remove one of the selected devices from SmartThings, the shadow virtual device on your Hubitat Elevation hub will still exist, but will no longer function. You will have to remove it manually from your Hubitat Elevation hub. Similarly, if you de-select one of the selected devices on your SmartThings hub, the shadow virtual device on you Hubitat Elevation hub will have to be manually removed.

If you remove a shadow virtual device from Hubitat Elevation, that has no effect on SmartThings and you should therefore de-select them from the Send Hub Events SmartApp. If you remove Hub Link from your Hubitat Elevation hub, it will attempt to remove all of the shadow virtual devices, but this may fail if any of those devices are still in use by apps on your Hubitat Elevation hub.