rsauget / homebridge-flexom Goto Github PK
View Code? Open in Web Editor NEWHomebridge plugin for Flexom smart homes
License: Apache License 2.0
Homebridge plugin for Flexom smart homes
License: Apache License 2.0
The default poll interval of 60s results in frequent rate-limiting from Flexom's APIs (429), which persists and requires an Homebridge plugin stop then wait, then restart.
I've checked at this module's source code and found out that 1 equipment polled = 1 HTTP request out. I assume large homes with a lot of rooms and IoT devices will result in frequent 429s. I've adjusted the poll interval to 600s in the code, which fixed my rate limiting issues.
A solution to this could be to let the user configure the poll interval, just as https://www.npmjs.com/package/homebridge-dyson-pure-cool does (the homebridge-nest-cam plugin also does that). That way, the more IoT equipments one has, the more the poll interval can be increased. Which alleviates all rate-limiting issues.
I'd be happy submitting a PR if you're interested.
Hello,
First of all, thanks a ton for this integration to Homebridge! Never liked the official Flexom app to be honest, I'm really happy to have finally found an alternative to it :)
Describe The Bug:
Just having a slight issue with the blinds, where in some not-so-rare cases a blind would stay in loading state in the Home app, that until I reboot my Homebridge server, which would I assume re-poll the blinds states from the Flexom API and thus update HomeKit accessories. Note that this does not seem to not happen to the lights.
To Reproduce:
To reproduce, it looks like to me that the blind would need to be partially closed (eg. 97%), and the action would need to be taken using the physical wall-mounted control, ie. not Flexom nor this integration. In my case, the blinds are a kind of BSO (sun-blocking, can be fully closed yet each flap has an aperture of ~45 deg letting the light pass in, but blocking the sun rays producing heat), so those are not traditional blinds we typically see in most homes.
In case I need to have them in that fully closed state, yet sun-blocking and light-passing, I'd fully close them with the physical control button, and then make them go upwards again and then block them with a control button (all that from the physical button, ie. not from the Flexom app or this integration). In certain cases, Flexom's "buggy" systems understand that the blinds are like 97%-98% closed, while they are in reality 100% closed.
I assume that this non-100% factor is what could make your Homebridge integration to believe that the "closing" or "opening" action is still ongoing, forever, thus resulting in a forever-loading spinner in the Home app.
Image of a similar blinds: https://www.bimobject.com/en/content/showproductimage/aaa5ad73-b452-4ee6-8458-ef03ce4e4f60/371623/default?ver=20200803072245
Expected behavior:
I would expect the loading state to disappear once the blinds are not moving anymore.
Fix pathway:
I have no knowledge of how this Homebridge integration works, but I would assume that it's expecting the window covering accessory value polled from Flexom API to reach some target number in order to consider the action as fulfilled. In such cases, I'd add a ~10% margin for error tolerance in order to consider the action as complete, which would effectively fix the aforementioned issue for BSO-type blinds.
Logs:
Manually 100% closed (full light-blocking BSO) then re-opened the blinds ~15 minutes later to their closed yet light-passing BSO state (so, closed to 100% position but aperture at 45deg).
[27/07/2021, 18:42:13] [Flexom:Office:WindowCovering] changed from 0 to 50
[27/07/2021, 18:59:16] [Flexom:Office:WindowCovering] changed from 50 to 7.000000000000001
After this 18:59 time on 27th, the forever loading state started appearing in the Home app, and is still there right now.
Plugin Config:
{
"name": "Flexom",
"email": "xxxx
"password": "xxxxx",
"zones": true,
"excludeZones": false,
"excludedZones": [
{
"light": true,
"window": true
}
],
"things": false,
"platform": "Flexom"
}
Screenshots:
Environment:
Hi,
First of all, thank you very much for this plugin which is very helpful and complete ! I was looking for that for a very long time and thank you so much !
I would like to know if there is a way to exclude some accessories. Because currently, if I put my ID and password, it brings with all accessories (bulbs and rolling shutters) and with empty zones. I would like to import, for example in my case, only rolling shutters (neither empty rooms nor bulbs). Do you know how could I do that and if I could ?
Environment:
Hello there!
Would it be possible to release all changes from flexom-lib
master and update homebridge-flexom
with the new version of the library?
I'm using homebridge-flexom
on a daily basis at my home (thanks a ton, it does work great!), and I think that having the WS channel send less frequent keep-alives and pings would be nice.
BTW quick side-question: when building — Opened issue #68 for this one.flexom-lib
, did you see any way the smoke detector data could be fetched from Flexom API? I have a connected smoke detector at home, which is available through the Flexom app. Could be super useful to have it appear in HomeKit, w/ smoke alerts coming in as well!
Thanks again for your work!
Valerian.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
mocha
, @types/mocha
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
).github/workflows/build.yml
actions/checkout v4
actions/setup-node v4
.github/workflows/codeql-analysis.yml
actions/checkout v4
github/codeql-action v2
github/codeql-action v2
github/codeql-action v2
package.json
@rsauget/flexom-lib ^3.3.0
lodash ^4.17.21
@types/lodash 4.14.201
@types/mocha 10.0.4
@types/node 20.9.0
@typescript-eslint/eslint-plugin 5.62.0
@typescript-eslint/parser 5.62.0
chai 4.3.10
eslint 8.53.0
eslint-config-airbnb-base 15.0.0
eslint-config-airbnb-typescript 17.1.0
eslint-config-prettier 9.0.0
eslint-plugin-import 2.29.0
eslint-plugin-prettier 4.2.1
homebridge 1.7.0
homebridge-config-ui-x 4.52.2
mocha 10.2.0
nodemon 3.0.1
prettier 2.8.8
release-it 17.0.0
rimraf 3.0.2
ts-node 10.9.1
typescript 4.9.5
node >=14
Je viens de setup Homebridge.
Mon appartement est équipé avec flexom, j'ai installer le plugin et sur la Home app j'ai a liste de mes rooms mais je ne peux rien faire dessus. les 3 screenshots montre mon app flexom avec la liste des rooms
et des things
Celui-la montre dans Home App
la liste des rooms mais me marque qu'elles sont incompatibles.
Describe The Bug:
après installation, je ne vois aucun des accessoires présent dans Flexom
Logs:
TypeError: form_urlencoded_1.default is not a function
at axios_1.default.create.transformRequest (/Users/T/.npm/_npx/14098/lib/node_modules/@rsauget/flexom-lib/dist/hemis/hemis.js:78:49)
at transform (/Users/T/.npm/_npx/14098/lib/node_modules/@rsauget/flexom-lib/node_modules/axios/lib/core/transformData.js:16:12)
at Object.forEach (/Users/T/.npm/_npx/14098/lib/node_modules/@rsauget/flexom-lib/node_modules/axios/lib/utils.js:247:10)
at transformData (/Users/T/.npm/_npx/14098/lib/node_modules/@rsauget/flexom-lib/node_modules/axios/lib/core/transformData.js:15:9)
at dispatchRequest (/Users/T/.npm/_npx/14098/lib/node_modules/@rsauget/flexom-lib/node_modules/axios/lib/core/dispatchRequest.js:30:17)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Plugin Config:
{
"name": "Flexom",
"email": "",
"password": "",
"zones": true,
"excludeZones": false,
"excludedZones": [
{
"light": true,
"window": true
}
],
"things": true,
"platform": "Flexom"
}
],
"accessories": []
}
Screenshots:
Environment:
Hello there!
Overall Homebridge-Flexom is working great :) I've noticed a tiny issue w/ the WebSocket input channel, allowing to update HAP state whenever eg. a physical light switch is powered on or off, in real-time. This works just fine when Homebridge was just restarted, although after some time (days? network loss? anything else) it loses connection to the WS server and never reconnects.
When this happens, controls from HAP still work eg. I can hit Hemis API and enable/disable lights or control roller shutters, but physical actions are not reflected in real-time anymore in HAP. Restarting Homebridge will force the Homebridge-Flexom plugin to restart, which will reconnect to WebSocket, and fix the issue, until this happens again.
Hello,
First of all, thank you for your research and development about this subject.
I'd like to know which platform this plugin is compatible with, as Flexom V3 is now the new used app which isn't compatible with Flexom V2. It looks like you have developed this plugin using Flexom V2, do you know if it would work with Flexom V3 ?
Flexom V3 is connected to the Hattara® Rail DIN bridge from Overkiz and as far as I know it uses EnOcean as a main protocol but you can expand it with additional modules (e.g. Zigbee module etc...).
It isn't really clear to me how all this works yet, so maybe I misunderstood something.
Thanks in advance for your answer ! 😊
Best regards,
Lucien
When building flexom-lib
, did you see any way the smoke detector data could be fetched from Flexom API?
I have a connected smoke detector at home, which is available through the Flexom app. Could be super useful to have it appear in HomeKit, w/ smoke alerts coming in as well!
Given the metrics available on the screenshot below, it could also be used to create HomeKit accessories reporting air temperature, humidity, AQI and even smoke sensor fault (eg. reported as non-working).
I am eager to provide Charles Proxy traces to help on that.
Here are some screenshots of the object that appear in the Flexom app on my side:
Describe The Bug:
I have Flexhom ready house with all my light switches that are directly wirelessly connected to an IOT gateway.
After some time deploying my homebridge (1 or 2 days), If I manually use the light switches, I will have to send an "Off" request (homekit manualy or siri) to recalibrate and send an "On" request to finally turn on the light.
I tried every configuration I could know of and tried re-installing my homebridge multiple times.
Plugin Config:
{
"name": "Flexom",
"email": "XXX",
"password": "XXX",
"zones": true,
"tolerance": 0.05,
"excludeZones": false,
"excludedZones": [
{
"light": true,
"window": true
}
],
"things": false,
"platform": "Flexom"
}
Environment:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.