local host = "fd9a:9169:3c05:1:e2f7:411a:7b09:3a0c"
local port = 5683
local ok, err = udp:setpeername(host, port)
if not ok then
return nil, "Failed to set udp peer name: " .. err
end
fails with “Failed to set udp peer name: unsupported”
local host = “[fd9a:9169:3c05:1:e2f7:411a:7b09:3a0c]”
fails with Error: Failed to set udp peer name: Name or service not known
I’ve yet to see evidence that the IP stack on the V2 hubs supports IPv6. There’s no mention of a local IPv6 address being bound in the CLI (or IDE of course).
Looking at it from one perspective, having something related to IPv6 is necessary due to the presence of Thread. However, I attempted to initialize udp6 from cosock, and it resulted in a nil reference error.
my hub has Thread, so IPv6 is here at some level.
However, the problem lies with the obsolete Lua libraries and the possibly stringent security measures that restrict access to anything except local addresses.
Then how can it support Matter, which uses IPv6 addresses for both Thread and WiFi devices? There are already some Matter Edge Drivers, separate from the LAN Edge Drivers. From the SmartThings developer documentation on Edge:
Hub Connected Devices connect to a SmartThings-compatible Hub using the Matter, Zigbee, Z-Wave, or LAN protocols. A SmartThings-compatible Hub enables Matter, Zigbee, Z-Wave, and LAN Devices to integrate with the SmartThings Platform, allowing you to view and control your Devices from SmartThings clients and incorporate these Devices into Automations and more.
The Matter protocol requires IPv6.
Matter uses IPv6 for its operational communications, and leverages both IPv6 Unicast and Multicast addressing for accessing its Nodes and Groups, respectively.