Flic - iHost Hub by SonOff

In regards to a few closed forums,
I wish to rekindle a topic in regards to Flic buttons on an iHost SonOff Hub.

First off: I am a newbie, learning the lingo and how to create A forum.
Second, I don't know what I am talking about but I have a good idea on what I don't know.

I see a lot of PIE , Raspberry Pi users information to which is above my tasks at hand, I thought owning a device such as a hub that is a little more than a hub running docker addons for NODE RED would be the easiest solution to adding automation to the home.

I needed a SonOff hub to begin with to control the items I own , and it now networks well with my Apple mess , now I want to join Flic to the matter and see if I cannot get some basic logic to just work. HomeKit has a simplistic nature that I am okay with, and Home Assistant to what I figure is still cloud based. If I can find a work around that will just keep my devices working all the time that would be great.

The other reason I chose this hub, as it matches the 5 devices I now have with SonOff, is the fact from the videos I have learned that I may be able to create a local non cloud dependent network. Seeing as our internet sucks, cloud base software runs at the best inconsistent. Yesterday our HomePod mini just went off on a tangent and started playing loud music at 10pm by itself. We already lost our local radio station to which is now locked into a foreign language. I have now have no control over FM96 Puerto Rico radio via Tune-in. It's just not what use to play when I first bought the HomePod mini. Not to mention that I was forced to replace our Home hub when Apple upgraded its iOS and gave our iPad mini 2nd generation the boot. Needless to say a HomePod or HomePod mini was the next best solution to an Apple TV for a network hub for all our matter devices.

Okay now I am just ranting , but this is what I want to learn how to avoid. Hoping to run our automation in our home without being controlled by the clouds control.

1 Like

When it comes to node-red-contrib-flic-buttons (node) - Node-RED (nodered.org)

I do not understand everything on the page, git hub downloads and why I need to install items when the pallet has one and only one node for the flic pallet download.

I joined the forums to learn more about the products I have, as I have no local community to support my ideas and I am hoping any feedback may support my ideas. In return I will relay that info back on my progress, hopefully help out others in my same circumstance.

node-red-contrib-flic-buttons-hci (node) - Node-RED (nodered.org)

States something to what I figure does not pertain to the simplicity of the iHost Hub.
As there appears to be two pages one regarding.

node-red-contrib-flic-buttons-hci 0.1.5

and another regarding

node-red-contrib-flic-buttons 1.1.1

node-red-contrib-flic-buttons (node) - Node-RED (nodered.org)

I will related to the latest ; 1.1.1 if this makes sense.

Installing Flic Daemon

This node requires the fliclib-linux-hci daemon to handle the low level communication with the buttons. You will need to install this before you start:

On the page word for word, I think I require both do I not ?

Flic installs

Answering my own question I decide to do both, but remove 1.1.1 and install 0.1.5 first then add 1.1.1 on after, if it matters, I did this backwards last time and kept getting a connection error. But I cannot uninstall the pallet now ?

Question how do we delete pallets installed ?

Resolved, reinstalled Node-Red not 4, but a fifth time. My pallet was saved to my SD card, having to remove that folder and re-install 0.1.5 first. Then once it was installed I install 1.1.1.

Flic buttons on an iHost SonOff Hub

This is not going to work. Flic buttons use bluetooth, which is not accessible in iHost.

Delete nodes (remove the nodes from your flow first):

But my Flic 2 LR hub with SDK has an IP address and a console to it.

Flic Hub SDK

upped count to 2

Sorry i am thoroughly confused by your posts.
Is it working or is it not working ?

As far as I can tell the flic button is not shifting the information I will have notes for that on Tuesday.

Reviewing this topic, I do not have a raspberry pi , but I do have a Flic LR2 hub that allows my HomeKit to work. All 5 of my buttons have the ability through a HomeKit bridge to run scenes or turn on and off my HomeKit devices. The Flic LR2 hub has an ip address and this SDK interface to run javascript.

How to get a Flic button to work with docker and a Pi3 - General - Node-RED Forum (nodered.org)

I kinda understand the fact that the buttons using blue tooth connect to the bluetooth of the raspberry pi blue tooth and maybe the raspberry pi decides what to do without the use of a dedicated flic hub. But at the time I figured I need a hub for the buttons to work and they work beautifully. I assume that the flic LR2 Hub is kinda doing this for me, and somehow relaying that info to HomeKit via a bridge.

But what does the HCI do ? Now that I have gone from connection error to connected, I feel that I am close to having something working. My NS Panel does not have an IP address either, but as it is recognized as a device on SonOff iHost hub that node must register the data in a way that is recognized as I have shown pressing the one button, I am able to increase the count. I was also able to do this with Meross, but when I woke up the next morning, I realized it was counting something else. The number was up to say 35,000 counts without activating the device. Just something more that I have to study.

So the device now says "connected", does that mean it is working ? I don't know ! However, I assume there has to be someone who does knows what is going on ?? Otherwise, why would they invest the time in creating two contributions, one 3 years ago, almost 4. ... And one over 8 years ago ???

I'm pretty sure I just need to learn JavaScript.

According to the web page of the six or more options I can install for the topic or search Flic , one comes up as 'flicker' ... to which I know has nothing to do with Flic buttons.
node-red-contrib-flic-buttons (node) - Node-RED (nodered.org) states somewhere down the paragraph to make sure HCI is installed , so that was my first thought of installing the one before the other onto the iHost device.

Installing Flic Daemon

This node requires the fliclib-linux-hci daemon to handle the low-level communication with the buttons. You will need to install this before you start:

... Okay well whatever that means, I gave it a try, and was able to install 0.1.5 first, after a bit of frustration. But I still wanted the most up to date, so I also install 1.1.1 afterwards. ... Presto !

I have added to my other post : iHost (SonOff) - Docker - Node Red | Flic Community hoping maybe they have any input on the Flic contribution. But if the Flic contribution 1.1.1 or 0.1.5 is strictly to be run on a Node Red computer to which has a Blue Tooth communicator, the iHost Hub also uses blue tooth to which the iHost has. Because the iHost hub appears to offer the ability to install these Add-on to the pallet in Node-Red. One method I get a conflict error, where as the other process of 0.1.5 before 1.1.1 appears to state it is connected. Simply make me think I am getting somewhere.

Now whether all these device downloads are device specific ie Raspberry pi or Linux, maybe a windows or apple install, it is still available for us as a download using the iHost interface. Removing the pallet addon after it is installed, appears to be more of a hassle.

Again, I am only using the Sonoff iHost interface and not the github download site or whatever that is. Remember "newbie".

Not sure if I am replying to the topic above or below the script. But I was only able to remove the pallet install by removing node red completely. I also had to blow away the directory I created. Reinstalled Node-red , then added the pallets in order. 0.1.5 , then 1.1.1.

Creating an account at the github : osos/node-red-contrib-flic-buttons (github.com)

Hold on.

  • You have a flic hub, this hub takes care of interacting with the flic buttons.
  • The nodes you are referring to exist to interact with the buttons directly, without a hub, however:
    The fliclib-linux-hci daemon is a piece of software that acts similarly as a hub - you do not need this, because you have a hub
  • ignore the 'node-red-contrib-flic-buttons-hci' nodes.

When you configured the flic button in your flow you have filled out the IP of your hub and the mac address of your flic button, I assume ?

Connect a debug node directly to the flic button node, set the debug node to output the complete msg object and output only to the debug window, deploy.

Press the flic button and show the output here.

1 Like

So with 1.1.1 installed originally , I could not install 0.1.5 pallet add-on due to a conflict error. But without 0.1.5 pallet add-on I got a connection closed (error). Now by Installing 0.1.5 after deleting the folder on the SD card completely , enabled me to re-install both. However even before all that I was never able to get a connected status with 1.1.1 alone. And now I have a connected icon.

So I do not understand this : The fliclib-linux-hci daemon is a piece of software that acts similarly as a hub - you do not need this, because you have a hub

you do not need this - but then I will would get a connection closed (error) , and a red square.

300 DPI Debug 6.jpg

So with both I get a connected and a green square.

We need to see the output of the debug.

Upon further reply I will remove HCI 0.1.5 Addon from the node-red pallet, but for now attempted with the prior images to show a message counts of has not changed. The count is not happening, like it does so easily with the ihost SonOff to NS Panel SonOff handling its native devices (supported).

Also with 1.1.1 addon the menus differ in functionality to 0.1.5.

If I blow away my /data or say my /node-red-data folder again , I will simply install 1.1.1 again but I am certain I will get that "connection closed (error) red icon again.

However this time (#6) will be the first attempt with a /node-red-data folder on the SD card. You taught me this !

I then can move on to the next red :slightly_smiling_face:


Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

C-nP'd I am afraid I cannot change the color or realize why one font is larger that the other , weird ?

  • ignore the 'node-red-contrib-flic-buttons-hci' nodes.

The count is not happening

Why do you need the count ?
Node-red is based on message input and message output
You need to determine what your flic buttons produce in terms of messages: see screenshot above.

Connect it to a debug node, press the button and show the output in the debug window. This is critical to create flows.

Reinstall is not needed, you see the flic button as connected, that appears to be working.

ok I will review, see you tomorrow , LOL.

.. Oh this is good stuff !

Just thought message data is more info than a simple message count. If I could get the data to increment once like I did with meross I would have said whoo hoo. Even if the data was wrong, incorrect, in error or registering as white noise.

And : I do not know how to manipulate message data.

Okay I will review debug data.

Review : 1 1 1 interface connection failed.png on its own but has more options.

Ah I got bored again - wanted to get my Flic button to work.jpg

When removing 1.1.1 to install the missing HCI I thought lets try re-installing 0.1.5 .
But a conflict error prevented me from doing so, which was understandable, blowing away the folder on the SD card I installed 0.1.5 than 1.1.1 successfully but lost all the abilities in submenus of being able to select multiple clicks.

Different installation order.jpg - got results but nothing that I knew how to work with,

Different installation order - different results no affect.jpg

Tokens from the flic 2 LR Hub don't seem to be acceptable.