@craig-2 There is an official MQTT integration for the Flic Hub LR SDK, which can be used for HASS integration. It works passably well, but I am partial to this version, which is much more fully-featured, and has worked pretty flawlessly for me.
Latest posts made by mullz
-
RE: Home Assistant + Flic Twist - please help usposted in General Discussion
-
RE: Stuck Matter Bridgeposted in Flic Hub
@Emil They mean "tap to edit" doesn't seem to work in the iOS app, currently.
The same thing happens on my own iPhone: When trying to try to modify any Matter devices, tapping on "tap to edit" does nothing.
EDIT: Just discovered that editing Matter devices does work, but only when you access them from the "Providers" page within the hub settings; trying via the "modify" section when choosing a button action does not work. @sam, perhaps you could try from the "Providers" page?
-
RE: IRTCP v1.0.0 (Hub server for using IR module via HTTP)posted in Flic Hub SDK
@Emil I found something else when tweaking @jitmo's timeout function, but it appears to be a flic documentation issue:
ir.cancelRecord()results in a"TypeError: not a function"message , even though the Hub SDK documentation says it's a valid method; I think the correct method is actuallyir.cancel().(...but please, correct me if I'm wrong!)
-
RE: IRTCP v1.0.0 (Hub server for using IR module via HTTP)posted in Flic Hub SDK
@Emil Ah, I see! I should've read up more on Node.js' EventEmitter class.
I haven't touched the timeout code yet, but in my test module (which uses @jitmo's code), it looks like just adding the
.removeAllListenersmethod to the end of theputsequence solves the overwriting issue:// Wait for recordComplete event ir.on('recordComplete', function(signal) { console.log('@ ir.on.recordComplete'); // Stop the timeout timer clearTimeout(timeoutTimer); // Convert the signal to a string var data = _irSignal2str(signal); console.log(data); // Store the data put(c, name, data); // Remove all listeners ir.removeAllListeners(); }); // ir.on.recordComplete }Thanks so much for helping me work this out!
-
RE: IRTCP v1.0.0 (Hub server for using IR module via HTTP)posted in Flic Hub SDK
@Emil This is helpful info for investigation, but I still can't figure out why the console output appears to indicate overwriting multiple commands every time a new one is recorded:
server connected
GET /?record=test HTTP/1.1Host: flichub.local:1338
Accept: /
Accept-Language: en-US;q=1, ru-RU;q=0.9, es-US;q=0.8
Connection: keep-alive
Accept-Encoding: gzip, deflate
User-Agent: Flic/7.0.5 (iPhone; iOS 26.1; Scale/3.00)
recording signal...
Signal testUp stored!
Signal testDwn stored!
Signal test stored!
Signal test stored!
server disconnected
server connected
GET /?cmd=test HTTP/1.1Host: flichub.local:1338
Accept: /
Accept-Language: en-US;q=1, ru-RU;q=0.9, es-US;q=0.8
Connection: keep-alive
Accept-Encoding: gzip, deflate
User-Agent: Flic/7.0.5 (iPhone; iOS 26.1; Scale/3.00)
server disconnected
Unless I am reading it wrong, recording a new signal saves it, but also overwrites all previous recordings with the new IR signal, as well.
(I sent these commands from the iOS flic app, using the Internet Request feature, from one of the widgets, if that is helpful info)
-
RE: IRTCP v1.0.0 (Hub server for using IR module via HTTP)posted in Flic Hub SDK
Hello,
I've been trying to get this script up and running on my own Flic Hub LR (firmware v4.6.0), but I seem to be running into trouble with the datastore module; nothing appears to stay saved, or else entering one IR code overwrites ALL IR codes with with string from the most recently recorded one. When I tried to investigate what was being written to the datastore, I noticed the datastore.db file appears corrupt in some way (dB Browser for SQLite says it's unreadable/malformed). This happens in both the original "IRTCP" code @oskaremilsson posted, as well as the "ir-server" version posted by @jitmo.
Am I missing something silly, or is there a change in the way the datastore puts/gets work in the latest firmware?