alexryd / node-shellies

Handles communication with Shelly devices
MIT License
35 stars 13 forks source link

Support for unicast #20

Closed jghaanstra closed 3 years ago

jghaanstra commented 3 years ago

Allterco Robotics might support CoIoT over unicast for Shelly devices in the near future. It will be made configurable in the device settings. What is needed to support unicast using this library?

Basically the CoAP server needs to use 0.0.0.0 as binding address and 224.0.1.187 as IP_ADD_MEMBERSHIP address to support both multicast and unicast.

jghaanstra commented 3 years ago

After some research it seems not much needs to be changed but it seems unicast responses from Shelly devices have a packet request code of 2.05 which is dropped in the node-coap library and filtered out in this library. I'll make this work locally but a solution within this library is still preferable.

alexryd commented 3 years ago

That sounds awesome. Can I try it out somehow? I agree, it would probably be fairly easy to support in this library.

jghaanstra commented 3 years ago

I just send a PR request to prepare this library. Unicast is still in testing phase but I could ask the developers from Shelly to add you to the integration developers slack channel which contains the info and links to test firmware which includes unicast support. Let me know if you are interested.

alexryd commented 3 years ago

Sure, please do.

jghaanstra commented 3 years ago

I'm gonna need an email address for that.

alexryd commented 3 years ago

alexander.ryden@gmail.com

jghaanstra commented 3 years ago

You should be getting an invite.

Gophlin commented 3 years ago

It appears that the new Motion sensor is the first device using this with the new 1.1.0 firmware. See https://www.facebook.com/groups/ShellyIoTCommunitySupport/permalink/3556025864496752

jghaanstra commented 3 years ago

The motion sensor is the actual reason why Allterco Robotics is switching to unicast. Now the motion sensor also receives all traffic within the multicast group of all Shelly devices which drains it's battery.

jghaanstra commented 3 years ago

Fixed in release 1.5.0