Hub Beta Firmware Announcement 0.43.3

Hub Firmware 0.43.3 Beta

Hey everyone!

We’re excited to announce the start of a new SmartThings Hub Firmware Beta. Version 0.43.3 will begin rolling out in batches starting on May 16, 2022, and we will send out an email when we start updating Hubs. This will be a phased rollout so that we can keep a close eye on any issues that arise so your hub may not be updated immediately. The hub will be offline for about a minute during the update. See below for more specific details about the update.

Version

  • 0.43.3

Hub Target

  • Samsung SmartThings Hub 2015 (Hub v2)
  • Samsung SmartThings Hub 2018 (Hub v3)

Release Date

  • Release Date: May 16, 2022 - May 18, 2022
    Note that this release will be spread over the listed days, so you may not see your Hub update on the first day of the release period. We will post on this thread once all users should have received the update.

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 in an event handler or an interval timer callback.

TLDR

1local http = require "socket.http"
2local json = require "st.json"
3
4function get_device_state(device_url)
5  local body, status_code, headers, status_msg = http.request(device_url)
6  if not body then
7    return nil, status_code --error message here
8  if status_code == 200 then
9    return json.decode(body)
10  else
11    return nil, string.format("Error requesting state: %s", status_msg)
12  end
13end`

On line 5 we will always and immediately get the return value nil, "timeout" which we can solve by changing line 1 to the following:

1local cosock = require "cosock"
2local http = cosock.asyncify "socket.http"`

With the TLDR out of the way let’s go over a little more why we need to make this change. In this release we gave our native socket implementation some much needed love which made it more closely align 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 for some amount of time 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.

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"
  • Fixed a bug in cosock.asyncify that was incorrectly resolving require "socket" when using ssl.https or urls with an https 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

NOTE

Anyone who participated in the previous beta is automatically signed up for this one.

If you’d like to participate in the beta, but haven’t taken the survey yet: Sign Up Here

If you’d like to opt-out, update your preferences via the Account Settings menu item in Centercode

2 Likes

Hi @alissa.dornbos

Does that means that the following issue has been solved and deep copy before sending the event is not required anymore?
Thanks

Looks like I’m on 43.3 now. I didn’t receive an email prior.

Will DTH to Edge Driver migration be part of this firmware beta or the next one?

Thanks for letting me know! I will take a look.

Nice find :slight_smile: See my newest announcement here. Hub Firmware Beta Group, get ready to migrate!

1 Like

Yes, the team mentioned this should be fixed in this version.

1 Like