SmartThings Edge Developer Beta | Known Issues and Bug Tracking

I also ended up doing this. You can’t connect within the first few seconds of driver init

1 Like

4 posts were split to a new topic: [Custom capabilites] Issue with enum commands

A post was split to a new topic: [SmartThings Edge] Issue with the ColorTemperature default library

A post was split to a new topic: [SmartThings Edge] Issue with the device health (Zigbee)

6 posts were split to a new topic: [SmartThings Edge] Issue with default function to send Z-Wave configuration parameters

There is a null check that is missing in st/dispatcher.lua

function MessageDispatcher:dispatch(driver, device, ...)
  if self:can_handle(driver, device, ...) then
    local status, value = pcall(inner_dispatch, self, driver, device, ...)
    if not status then
      if self.error_handler ~= nil then
        self.error_handler(driver, device, ...)
      else
        local args = {...}
        local error_msg = string.format(
            "Error encountered while processing event for %s:\n",
            tostring(device)
        )
        for i, arg in ipairs(args) do
          local arg_str = string.format("    arg%d: %s\n", i, tostring(arg))
          error_msg = error_msg .. arg_str
        end
        error_msg  = error_msg .. value -- <-- NULL CHECK for value needed
        error(error_msg)
      end
    end
  elseif self.fallback_handler ~= nil then
    self.fallback_handler(driver, device, ...)
  end
end

I am currently seeing a crash due to this error_msg construction. There is no value in my error

Can you share the implementation that is causing this error, and also the related log, please?

I can’t since I moved on from it, but it was originally being triggered by parsing an invalid json string that had been truncated. I switched from dkjson to st.json and this error started occurring when I tried to decode a bad json string. I believe it can be duplicated by calling json.decode(truncatedJsonString)

@nayelyz Created a new edge bug thread here for the v43 rollout [ST Edge] v43 Http Socket Timeout

Hi @nayelyz
I don’t know the reason why in the preferences that are of type "enumeration" the text of the description field in the app is not shown:

preferences:
  - name: "restoreState"
    title: "restore state"
    description: "This parameter 16 determines if the device will return to state prior to the power failure after power is restored"
    required: false
    preferenceType: enumeration
    definition:
      options:
        0: "power off after power failure"
        1: "restore state"
      default: 1

In the numeric type preferences if it is displayed correctly

  - name: "autoOffTime"
    title: "Auto Off Time"
    description: "This parameter 4 determines 0- 65535 (0 s to 6553,5 s) Time period for auto off, in miliseconds"
    required: false
    preferenceType: number
    definition:
      minimum: 0
      maximum: 65535
      default: 0

Thanks

1 Like

Hi, @Mariano_Colmenarejo. Thank you for sharing this info. I’ll report this issue to the team.

1 Like