Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple flics? #2

Open
danmac opened this issue May 10, 2016 · 56 comments
Open

Support for multiple flics? #2

danmac opened this issue May 10, 2016 · 56 comments

Comments

@danmac
Copy link

danmac commented May 10, 2016

I can't tell if this is possible currently, but I have 4 flics I would like to connect to my Mac, and can't tell if there is a way to do this currently. The menu doesn't seem to let me add another one once I connected the first one.

@AntonMeier
Copy link
Contributor

The current version unfortunately only supports one Flic. Adding support for multiple buttons is of course of high priority for future versions. We will asses, depending on the response we get on this project, how and when we will continue the development work.

@erikvg01
Copy link

I second this. I'm really itching to use the Flic's as the primary human interface to the home automation system in my house...Right now the iPad app is brokering connections to the mac mini server which is executing all the scripts, but that burns up the iPad as being an iPad...It needs to be effectively stationary and always plugged in.

@AntonMeier
Copy link
Contributor

It will be available hopefully sooner rather than later.

@wejstal
Copy link

wejstal commented May 23, 2016

Any ETA on this? Really limiting with just one flic, however it works every time :) much better than using an iPhone.

@dermotos
Copy link

dermotos commented May 26, 2016

Just like to add my +1 regarding Flic on Mac. I'd like to interface with a node.js server. Once some kind of SDK becomes available, i'll be placing my order for ~20 of these!

Edit: Also, it's worth noting that there is a severe lack of physical controls on the market for home automation systems. I use voice and apps for controlling lots of things like blinds and the like, but in many circumstances (e.g.: turning on a bathroom light at 3am) there's no replacement for a physical button. Currently, there is no commercial option for this, I'm using custom made arduino button units. A tidy, wireless, programmable button like Flic is the dream, but connecting via a phone feels too hacky for me right now.

@AntonMeier
Copy link
Contributor

Thanks! We are currently working on something that I believe will be great and should cover all the things you want to do. It is going to be a mix between a full Flic app (for ordinary users) and a hack-app for those who want to make cool things on their own.

On top of that we are also building in support for the mac app to act as a "Flic Deamon" to support the TCP Client/server protocol that we have put together for our Linux SDK, which means that people can hook up the button events to pretty much anything they want. We already have a node.js client lib available for that so I guess that would be something for you to look at in the future.

We will get back to you guys as soon as possible with an ETA. I also think it would be cool to involve more people during the development as well so that we can get feedback early on.

@wejstal
Copy link

wejstal commented May 30, 2016

Sounds good! I will gladly help and give you feedback!

@AntonMeier
Copy link
Contributor

AntonMeier commented May 31, 2016

Today I have added a new repository, flic-service-osx, that contains an application that includes a TCP server for Flic communication. This is compatible with the client libs that we have made available previously, such as NodeJS and Java. With this you are free to scan and connect as manny buttons as you like and tie them up to your own applications, either on the local computer, or on your local network.

However, if you try this out you must unfortunately uninstall hax-with-flic first since undefined stuff can happen if you try and use both of them. The idea is that once the Flic app for mac is done in the future then this service will be built into that, meaning that your applications will work with that as well out of the box. Let me know what you think!

@wejstal
Copy link

wejstal commented Jun 1, 2016

Thanks @AntonMeier unfortunately my skills are limited, installation is pretty straight forward, but I'm not sure how I could add a flic by using the linux-hci. Do I need to compile anything for this? An example would be great :)

@AntonMeier
Copy link
Contributor

Well actually I guess this is aimed for developers. The only thing the flic-service-osx will do is to set up a TCP server on your computer that will distribute button click events to different clients on your computer or network. This means that you would actually have to do the client application on your own. The examples that i referred to on the fliclib-linux-hci repository are just sample clients that can be used for reference, but they don't actually do anything other then print the events.

I don't know how much development experience you have with these kinds of things, but it should not be too hard to get going if you just have some free time :) Otherwise I suggest you wait until someone else publishes their own clients.

@wejstal
Copy link

wejstal commented Jun 2, 2016

I should probably aim for some free time then :)

@wejstal
Copy link

wejstal commented Jul 5, 2016

Any news?

@AntonMeier
Copy link
Contributor

AntonMeier commented Jul 6, 2016

We are getting there.. slowly but surely..

screenshot2016-07-06

@wejstal
Copy link

wejstal commented Jul 7, 2016

Looks really good! Let me know if you need beta-testers!

@asabi
Copy link

asabi commented Aug 14, 2016

Wow, can't wait for this. +100 from me. I have been using it since day one with a button to control my TV and sound bar with no issues. I press the button, and it works !

Actually works better than my 100$ Logitech remote !

@wejstal
Copy link

wejstal commented Aug 22, 2016

Any news about the client?

@AntonMeier
Copy link
Contributor

The news at this time is that it is about 90% done. We have unfortunately had to put it a little bit on hold right now as we are working on the release of a different project with higher priority. Stay patient. I will do my best to make time and push for a beta release of the Mac app as it is definitely something that I value a lot personally.

@samph
Copy link

samph commented Sep 11, 2016

If this has been depriortied how about putting up the WIP to a branch/fork for others to contribute to?

@wejstal
Copy link

wejstal commented Sep 27, 2016

Been quiet for a while now! Would it be better for us to look into the Linux version? Or can we expect an update here anytime soon?

@AntonMeier
Copy link
Contributor

AntonMeier commented Sep 27, 2016

Yes I know :( I can honestly say that we are not working on that particular Mac application at this time. I can also not say when we will have time to start working on it again. It might be soon, but it also might not be, it really depends on how the scheduling of other projects turns out for us.

In the meantime, yes, it would be awesome if someone wanted to look at the flic daemon protocol that is available for Mac/Linux/PC. That protocol is fully uniform between the platforms so my dream is if someone decided to start an open source cross platform app that is compatible with that protocol.

Another thought that I had was if I just bite the sour apple and spend an evening or something to just add multi-button support to the current app. This is basically what people wanted in the beginning, but we sort of opted out of it in favor of the other application.. But it just feels unnecessary to spend time on something that we eventually will move away from. I'll see what I can do.

@tdupre
Copy link

tdupre commented Sep 27, 2016

That's shame your UI looked closed to completion :( I only bought the Flic to use with the computer thinking the Mac app would be released soon enough.

@axelnormand
Copy link

Also a shame. I was looking forward to hooking up multiple flics to my mac.
The screenshot looked awesome to me!

@wejstal
Copy link

wejstal commented Sep 27, 2016

@AntonMeier Yes if it's possible to just spend a couple of hours to finish the current app it would be very much appreciated. :) I will be very expensive for me if I need one dedicated Mac for every button! hehe! As always, let me know if you need any help with beta-testing

@AntonMeier
Copy link
Contributor

AntonMeier commented Sep 27, 2016

Ok, fair enough, I guess I can do that within reasonable time at least!

@asabi
Copy link

asabi commented Sep 30, 2016

BTW, the screenshot looks amazing, but the reality is that the current functionality with the one button is good enough, we just need the multiple buttons (all the "sonos, slack, Lifx, hue" etc can be achieved through the shell script we can run (for example by triggering an IFTTT maker channel) ... I guess what I am saying is that there is no need for the fancy interface, just allow it to connect to multiple buttons, and provide the same "run this on click" interface.

That's my two cents ...

@AntonMeier
Copy link
Contributor

AntonMeier commented Oct 3, 2016

Okey, so I took some time this evening to hack together a hax-with-flic version with support for multiple buttons. Before I push it to the repository it would be great if anyone could at least try it out and see how it works. I have not really had much time to properly test it so there are probably some bugs. I have noticed a few UI-glitches that I will fix later. I also have some patches to the bluetooth code that I will add before I'm done. To install this, simply make sure that you close the old program (if it is currently running) and then replace the app file in your applications directory.

Anyhow, here is a link: (--Link removed--)
Let me know if you find anything bad. Please also confirm if it is working for you.
@wejstal @asabi @axelnormand and the rest of you..

@asabi
Copy link

asabi commented Oct 4, 2016

k, thank you. Just tried it with two of my buttons. Seems to work well.

Two potential issues:

  1. I noticed that if the button I am about to connect is not setup to pair, the app goes into an infinite loop with an "ok" window that says that there are no buttons, until it quits.
    Once I disconnected the button from my previous device, and it was ready to pair, it was fine.
    I was able to run different scripts depending on which button I press.
  2. I am using it on a laptop. When I put my laptop to sleep, and turned it back from sleep, the app quit on me a couple of times, not consistently though. I will keep you posted.

@AntonMeier
Copy link
Contributor

Cool, thanks! That is exactly the kind of feedback I was hoping for! I will take a look at the issues that you brought up.

@tdupre
Copy link

tdupre commented Oct 4, 2016

I just tried with four buttons :

  • 4th button won’t be recognized (the first 3 are fine)
  • I scanned the first 3, all were connected at one point (green check), when I tried again to connect the 4th one, all buttons disconnected (orange cross), then I tried to quit the app and it went into a weird mode
    capture d ecran 2016-10-04 a 10 21 04
  • I forced quit the app, restarted, all my saved buttons are gone, when I try to scan again, I have this error saying : bluetooth is not activated (when it is my phone's on it and my trackpad too) and then the app goes into weird mode again.

@tdupre
Copy link

tdupre commented Oct 4, 2016

And now the app won't start again, tried deleting it, tried removing db in Application Support. Nothing starts, it's strange.

Also, for the time I had 3 buttons, deleting a button didn't seem to trigger anything (it worked on the previous version of the app with one button).

@AntonMeier
Copy link
Contributor

Auch.. that sounds bad.. may I ask what computer model you are using?

@tdupre
Copy link

tdupre commented Oct 4, 2016

Sure
capture d ecran 2016-10-04 a 14 40 44

@asabi
Copy link

asabi commented Oct 4, 2016

Hi tdupre,

Have you tried manually removing the buttons from your Bluetooth ? It may help it start the app.

@tdupre
Copy link

tdupre commented Oct 4, 2016

I removed 3 buttons manually from Bluetooth, tried starting again, then I deleted app from 'Applications', cleaned application support, copy-pasted application in 'Applications'. I still don't get any boot. The app boots, I can see it on the status bar :
image
Then it crashes (the blank spot disappears).

@tdupre
Copy link

tdupre commented Oct 4, 2016

Here's the crash report:
HaxWithFlic_2016-10-04-164441_MacBook-Pro-de-Thibaut.txt
Ping me if you need more info (also if you have a way to reset everything)

@AntonMeier
Copy link
Contributor

AntonMeier commented Oct 4, 2016

Thanks for the crash log! It appears as if the bluetooth manager has got stuck it a bad state and return a nil object for a button that should be removed. I built another one now that does not necessarily fix the problem, but it should at least not crash. This way we should be able to at least be able to troubleshoot further..

Try this one (-Removed-) and if it ends up showing buttons without a name then delete them and try again. Sorry for the issues! Normally I try and test my stuff better, but I sort of ran out of time last night :P

@wejstal
Copy link

wejstal commented Oct 4, 2016

Great work! I'm only trying with 2 flic right now, but it seems to work great. The only issue I have right now is that it's hard to distinguish between the different flics, so any way to give them names would be great :)

@AntonMeier
Copy link
Contributor

Yep I know that it can be tricky to distinguish between them. If I have time I will try and just add a field where you can actually set the name manually yourself.

@tdupre
Copy link

tdupre commented Oct 4, 2016

Will update tomorrow morning with results/feedback

@tdupre
Copy link

tdupre commented Oct 5, 2016

Follow up: app starts again, here's what I get:
capture d ecran 2016-10-05 a 09 29 29

When I try to delete a button, I get a crash, here's the crash report
HaxWithFlic_2016-10-05-092944_MacBook-Pro-de-Thibaut.txt

Adding a button works fine (but I can't delete the others)
capture d ecran 2016-10-05 a 09 33 45

When I add a second button, here's what I get:
capture d ecran 2016-10-05 a 09 35 22

When I add a third button, here's what I get:
capture d ecran 2016-10-05 a 09 36 23
for a moment then:
capture d ecran 2016-10-05 a 09 37 06

Fourth button goes like this:
capture d ecran 2016-10-05 a 09 38 37

BUT all 4 buttons are active and paired (I get the ding when I press them)

The button that is showed as null, is the same one that would crash my app yesterday.

@AntonMeier
Copy link
Contributor

Okey. Thanks! I'll dive into this issue when I get home tonight :P Extremely weird, but I sort of think I know what it might be. Very sorry about it.

@asabi
Copy link

asabi commented Oct 5, 2016

I will speak on behalf of Thibaut, but we are grateful for your time, we all understand it is part of development. Keep on the good work, there is progress and that's what's important.

@tdupre
Copy link

tdupre commented Oct 5, 2016

Hell yeah, VERY grateful! Besides, it works now so it's awesome :)

@wejstal
Copy link

wejstal commented Oct 11, 2016

This might have been said before, but it looks like the software is crashing every time I add a button, but after restart of the application it works fine. Been testing it a couple of days now!

@AntonMeier
Copy link
Contributor

I know. I looked at it and I did a little mistake there :( Most probably the new version will be out tomorrow. That is unless I find something else that is wrong.

@wejstal
Copy link

wejstal commented Oct 12, 2016

I'm actually experiencing app crashes now, it usually happens if the script isn't working, like if it's calling for a URL and that isn't reachable. Maybe this is fixed in the above "fix".

@AntonMeier
Copy link
Contributor

Please test this version HaxWithFlic-0.2.3

  • Improvements to button logic
  • Buttons can now be re-named.
  • Some UI changes
  • Minor bluetooth patches added.

I have not yet adressed anything regarding crashes that occur when scripts are not working like you mentioned.

@AntonMeier
Copy link
Contributor

Like always, you should only have to close the previous installation and replace the app file. Not delete anything in /Application Support.

@wejstal
Copy link

wejstal commented Oct 12, 2016

So far so good! :) Any news on the big project that you prioritize over building the MAC client? ;) Stand alone receiver?

@wejstal
Copy link

wejstal commented Oct 16, 2016

So I have been troubleshooting my iMac for the couple of days now, the problem is that even though it's in sleep mode it suddenly wakes up for no reason, this happens somewhat randomly. I have tried turning of both wake on LAN and the ability for bluetooth devices to "wake the computer", nothing helped, so as a last resort I quit the flic application and all my problems went away. Of course I can not use the buttons now.

I did not see this behavior with the old single button app but somewhere just before or maybe after that I upgraded to MacOS Sierra the problems arose.

Please note, the iMac is my "develop" environment for the daily usage of the flic app I use a always on Mac mini and it does not have a screen so I'm not able to tell if this behaves the same way.

@AntonMeier
Copy link
Contributor

Very interesting. To my knowledge I have not made any changes to the app that could affect sleep mode behavior in any way. Actually I have not yet upgraded to Sierra myself so perhaps I should go ahead and do that now that I have a specific reason to do so. Thank you for your help!

@wejstal
Copy link

wejstal commented Oct 17, 2016

Well Sierra upgrade might be the reason in this case! If I should try to downgrade to "1.6" version, I need to delete the old app in the program folder, but is there any more files that needs to be deleted?

@AntonMeier
Copy link
Contributor

To be sure you can delete this whole folder as well:
~/Library/Application\ Support/com.shortcutlabs.HaxWithFlicMac

@axelnormand
Copy link

Sorry bit late to the party but was just going to try this and the dropbox link is down?

Thanks again for your work on this

@AntonMeier
Copy link
Contributor

The latest commit contains these changes.

@AntonMeier
Copy link
Contributor

Hello again. Remember the Mac app I talked about? Well we have revisited that project recently and will be needing beta testers soon. Please take a look at this post if your are interested: Mac app beta testers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants