I am wondering if Flic Twist will be supported by the hub SDK? It looks like the mini hub will not have SDK support. But I am hoping the LR hub SDK will have a module to work with the new Twist product. The hub SDK has been very helpful to build our own connected apps with the Flic products.
Best posts made by dustingtorres
-
Flic Twist SDK Support
-
RE: Flic Twist - SDK Support
@Emil In the meantime before we get full SDK support for twist, would your team be willing to make public the BLE protocol used and/or update your repo for Twist support:
https://github.com/50ButtonsEach/fliclib-linux-hci
Most of the protocol is already described in there, I would just need to know any additional opcodes for Twist and their packet definition.
I have a lot of professional experience with BLE and would be happy to help build a client program for Twist (or update your existing client in the above repo) so some of your customers can start using it with a BLE enabled device like Home Assistant.
-
RE: Update SDK to use the FlicTwist ?
@Emil Curious if Flic Twist SDK support is a priority for the Flic team? I just want to know if there will be support or not.
I am a huge fan of the hub SDK and I use it for my buttons (more than the native app). I have a lot of thoughts on how I could use Flic twist to help my team at work, but only with SDK support. I want to take advantage of the sale to purchase twists but only if I know SDK support will come in the future.
As a side note, I am very excited for matter support too but Hub SDK is even more versatile for those who want to do the deep dive technically.
Latest posts made by dustingtorres
-
RE: Flic Twist - SDK Support
@Emil In the meantime before we get full SDK support for twist, would your team be willing to make public the BLE protocol used and/or update your repo for Twist support:
https://github.com/50ButtonsEach/fliclib-linux-hci
Most of the protocol is already described in there, I would just need to know any additional opcodes for Twist and their packet definition.
I have a lot of professional experience with BLE and would be happy to help build a client program for Twist (or update your existing client in the above repo) so some of your customers can start using it with a BLE enabled device like Home Assistant.
-
RE: Update SDK to use the FlicTwist ?
@Emil Curious if Flic Twist SDK support is a priority for the Flic team? I just want to know if there will be support or not.
I am a huge fan of the hub SDK and I use it for my buttons (more than the native app). I have a lot of thoughts on how I could use Flic twist to help my team at work, but only with SDK support. I want to take advantage of the sale to purchase twists but only if I know SDK support will come in the future.
As a side note, I am very excited for matter support too but Hub SDK is even more versatile for those who want to do the deep dive technically.
-
RE: Leviton?
HI @superdave67 ,
I use Flic with Leviton smart switches but I needed to use a custom setup on my Flic hub using the SDK.
If you are interested in that approach you can use the sample code below.
The
const
at the top need to be replaced with IDs specific to your setup. I think I can dig up a postman collection on how to get those IDs which I created based on this library. It is on a different computer, but I think I can get access to it in a few days.// main.js var buttonManager = require("buttons"); var http = require("http"); const L_DUSTIN_ID = "<LEVITON ID 1>"; const L_CAT_ID = "<LEVITON ID 2>"; const L_MASTER_ID = "<LEVITON ID 3>"; const FLIC_BUTTON_ID = "<FLIC BUTTON ID>"; const ACCESS_KEY = "<LEVITON ACCESS KEY>"; function toggleSwitch(switchId) { console.log("toggling: " + switchId); // Get current Switch Status. http.makeRequest({ url: "https://my.leviton.com/api/IotSwitches/" + switchId, method: "GET", headers: {"Content-Type": "application/json", "authorization": ACCESS_KEY} }, function(err, res) { if(res.statusCode != 200) { console.log("request status: " + res.statusMessage); } else { // Toggle the switch http.makeRequest({ url: "https://my.leviton.com/api/IotSwitches/" + switchId, method: "PUT", headers: {"Content-Type": "application/json", "authorization": ACCESS_KEY}, content: JSON.stringify({"power": JSON.parse(res.content).power == "ON" ? "OFF": "ON"}), }, function(err, res) { }); } }); } function handleButton(obj){ if(obj.isSingleClick) { toggleSwitch(L_DUSTIN_ID); } if(obj.isDoubleClick) { toggleSwitch(L_CAT_ID); } if(obj.isHold) { toggleSwitch(L_MASTER_ID); } } buttonManager.on("buttonSingleOrDoubleClickOrHold", function(obj) { var button = buttonManager.getButton(obj.bdaddr); if(button.uuid == FLIC_BUTTON_ID) { handleButton(obj) } }); console.log("Started");
-
Flic Twist SDK Support
I am wondering if Flic Twist will be supported by the hub SDK? It looks like the mini hub will not have SDK support. But I am hoping the LR hub SDK will have a module to work with the new Twist product. The hub SDK has been very helpful to build our own connected apps with the Flic products.