Exploring Samsung SmartThings Hub and Zigbee/Zwave Networks
The Samsung SmartThings hub is a versatile device connecting Zigbee and Zwave networks, offering secure access to SkySpark via HTTPS. Zigbee and Zwave networks operate on distinct frequencies, enabling efficient communication without interference with WiFi. These networks support various devices for command and control, including wall plugs, dimmable lights, and more. Loggable sensors for temperature, humidity, motion, and more enhance monitoring capabilities. Explore applications like water leak detection and smart lighting control with this advanced technology.
Download Presentation
![](/assets/img/so-down.gif)
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
SmartThings The Samsung SmartThings hub is a hub that connects to many Zigbee and Zwave devices The SmartThings hub itself needs to connect to a standard internet router so that SkySpark has https access to it It has a static apiKey with ssl/https which yields a level of security The personal access token is sent with requests as a standard bearer token in a header The SmartThings hub requests are sent to the cloud which allows the SkySpark server to not be on the local network
Zigbee and Zwave Zigbee and Zwave networks are called mesh networks meaning their devices can extend the range of the networks and they also dynamically adjust to provide the strongest possible signal if devices move Devices on battery power will not extend the network to conserve energy Zwave devices can hop four times to extend the network Zigbee devices have no defined limit to number of hops to extend their network Zigbee and Zwave networks operate on difference frequencies than wifi so they do not interfere with wifi networks and vice-versa which is a major advantage Although the SmartThings hub can connect to Zigbee and Zwave simultaneously, Zigbee will be its own network and Zwave will be its own network meaning the one will not extend the other
Command and Control These technologies can send commands as well as receive sensor values Can control: Wall plugs (some measure energy) Other devices modelled as on/off switches Dimmable lights Colored lights These can be controlled via virtually anything you can imagine: Time/schedule Remote control Sensors on the following page
Loggable Sensors The following have been modelled and can be logged: Temperature Humidity Light level Motion UV Vibration Door/Window open/close Water leak sensor/presence of water Power, energy, current, and voltage Light level of a dimmable bulb Hue, saturation, level of a colored bulb
Control Applications Here are some popular control applications: Water main off when leak detected Window shades up/down based on outside light Outside lights on/off based on outside light Irrigation system on/off based on if it rained recently, the season, and the time Lights on when door open or motion detected Remote-controlled lights and TVs (yes, SkySpark can log and use the actual values of remote controls (ie pushed, double, held)) Use key fob to change setpoints and turn devices off when not around
Ziva is an Aeotec Distributor These devices have been tested and work great: Aeotec Smart Switch 6 (controllable and measures energy) Aeotec Multisensor 6 (measures 6 attributes/states at once) Aeotec Home Energy Monitor 5 Aeotec Nanomote Quad (does not work as expected with this hub) Aeotec Door Window Sensor Aeotec Water Sensor 6 Aeotec Water Sensor with Probe https://aeotec.com/products/ Contact us at: adam@ziva-tech.com to discuss
Other Devices that were Tested Most Samsung SmartThings devices Samsung has built-in support for non-standard devices such as their wifi wall plugs and even their TVs Sylvania color-changing bulbs Philips Hue dimmable and color bulbs (require Philips Hue hub) Several other wall plugs Inovelli sensors did not work well Some wall plugs that did not work well: Inovelli and Neo If a device is not explicitly mentioned, please contact us before purchasing at: adam@ziva-tech.com Note that making color-changing bulbs come on white is not fully implemented
Samsung Integration Samsung has integrated many of their smart devices with the SmartThings hub Their wifi smart plug with energy monitoring works flawlessly As mentioned before TVs have been tested to work It is presumed that many of their other smart devices such as ones you would find in a kitchen work, but they have not been tested
SmartThings API Set Up To have SkySpark talk to the SmartThings hub, it is necessary to generate a personal access token at this site: https://account.smartthings.com/tokens The token that is given will not be accessible on the SmartThings website or in SkySpark once it is entered into the connector, so it is recommended that you type your personal access token somewhere so you do not lose it
SmartThings Connectors in SkySpark Creating a SmartThings connector: dis: Any Readable Name smartThingsPersonalToken: This will be provided here: https://account.smartthings.com/tokens and acts as both a username and password uri: `https://api.smartthings.com/v1/` The smartThingsPollFreq tag determines the minimum amount of time before the cache can be refreshed and how often the curVal values will be updated (which is from where both polling with intervals and COV come). The default value of 1min is good for detecting COV changes, but the SmartThings hub has been tested down to 1sec for real-time control and works very well. Of course, these records will have the smartThingsConn and conn tags These can be created in the connector app
Polling of curVal smartThingsPollFreq (duration) How often you want SkySpark to poll the connector for COV The default is 1min It is a tuning parameter Note that this determines how often the curVal in SkySpark changes. You would still need to set how often the data is collected with the hisCollect tags.
SmartThings Functions smartThingsCmd send the smartThings a custom request; defaults to a lobby that you can walk read(smartThingsConn).smartThingsCmd smartThingsLearn return a grid of all available cur and his points read(smartThingsConn).smartThingsLearn smartThingsSyncCur force one or more points to sync readAll(smartThingsCur).smartThingsSyncCur smartThingsWrite write a value back to the smartThings read(plug and smartThingsWrite and cmd).smartThingsWrite(true, 9, "me") smartThingsPing send ping to connector to check connection read(smartThingsConn).smartThingsPing
Getting Data for SmartThings Points Manually or Automatically Collecting current values (from curVal): Each point must have these tags: smartThingsConnRef (ref) which is a ref that points to the SmartThings Connector smartThingsCur (str) which points to the SmartThings point object his (marker) cur (marker) hisCollectCov (marker or number) for cov collection OR hisCollectInterval (duration) for polling Note: we recommend also using a hisCollectInterval of 24hr when using a hisCollectCov to catch faulty sensors. Some devices such as certain Samsung TVs go completely offline when they are off, so instead of checking for a value like normal, we can see if the device is online or offline. The tag to add for this is useHealthCheck.
Writing to SmartThings Points from SkySpark Manually or with Automated Tasks Writing/Sending current values to a SmartThings point: Each point must have these tags: smartThingsConnRef (ref) which is a ref that points to the SmartThings Connector smartThingsWrite (string) which points to the SmartThings point object writable (marker) writeAttempts (number) (optional) this tag will send the write command multiple times if used when this point is sent a command Note: The pointWrite() command is the only writing command that is truly supported. The pointAuto() function is only used to clear the writeVal on SkySpark s end. It does not do anything on the device s end.
Basic Troubleshooting Note that it is normal for a connection to close when it has no points in a watch for a given period of time For larger systems, you want to set the poll frequency to a higher value to avoid network congestion
Getting Points via Code () => do conn: read(smartThingsConn) conn.smartThingsLearn().map r => do r = r.merge( { equipRef: read(equip)->id, siteRef: read(site)->id, hisCollectInterval: if (r->kind == "Number") 15min, hisCollectCov: if (r->kind != "Number") marker(), }) end.each r => commit(diff(null, r, {add})) Run as a task in large systems to avoid a timeout error
Getting Points with GUI We recommend using the Builder App s drag and drop capability to select which points are of interest as there are often many superfluous points