We will begin rolling out Samsung SmartThings Hub firmware version 0.43.4 starting Monday, June 06. Once downloaded, your Hub will briefly go offline as it reboots and applies the update; most customers will experience less than one minute of downtime. We will update the status page when the release is complete.
Hub Target:
- Samsung SmartThings Hub 2015 (Hub v2)
- Samsung SmartThings Hub 2018 (Hub v3)
- Aeotec Smart Home Hub
Release Date: 06 June 2022~ 10 June 2022
Note that this release may be spread out over a week, so you may not see your Hub update the first day of the release period.
Release Notes
Edge Drivers
- A number of bugs in the use of both UDP and TCP sockets were fixed
- These fixes make it a requirement that all socket methods must account for the potential return value
nil, "timeout"
- These fixes make it a requirement that all socket methods must account for the potential return value
- Fixed a bug in
cosock.asyncify
that was incorrectly resolvingrequire "socket"
when using ssl.https or urls with anhttps
scheme - Fix bug when re-using a table value for capability event generation
- Fix timer cancellation in the test framework
- Correctly handle Zigbee message equality test in test framework regardless of message construction method
- Add type checking on timer creation to provide better error messages when failing due to non-numeric timeouts
- Add ids to profiles for test devices
- Allow tests to expect a raised error
- Fixed a bug in
cosock.asyncify
that was not recursively swapping out calls torequire("socket")
- Fixed a bug in
ssl.https
that was referencing a non-existent property - Fixed a bug in
cosock.tcp
wherereceive
s would incorrectly insert theprefix
argument across timeouts - Updated the API version from 0 to 1
- This property can be accessed via
require("version").api
- This property can be accessed via
LAN Driver Developer Action Required!
Developers of LAN drivers will likely need to make changes to their drivers to handle updates made to fix bugs in this release. First, let’s cover what changes need to be made to allow for HTTP requests to work after this update. A driver may have something like the following example for an event handler or an interval timer callback.
TLDR
local http = require "socket.http"
local json = require "st.json"
function get_device_state(device_url)
local body, status_code, headers, status_msg = http.request(device_url)
if not body then
return nil, status_code --error message here
if status_code == 200 then
return json.decode(body)
else
return nil, string.format("Error requesting state: %s", status_msg)
end
end
On line 5 (local body, status_code....
) we will always and immediately get the return value nil, “timeout” which we can solve by changing line 1(local http = require
) to the following:
local cosock = require "cosock"
local http = cosock.asyncify "socket.http"
In this release, we made changes to our native socket implementation to make it more closely aligned with our driver framework. It has always been the case that any use of the native socket APIs inside of our driver framework will eventually result in confusing and very difficult to debug errors. That first example may have worked as expected on our platform, but eventually, we would see some error message or the driver lock up entirely without any explanation. The reason these things would happen has to do with how Lua’s co-routines work when we call functions that block the main thread from a co-routine. By moving the code to use the co-routine aware equivalent we can avoid this whole class of bugs entirely.