Comments (11)
Shouldn't your script handle this scenario and just automatically login again ?
from homebridge-config-ui-x.
Yes, but... I have implemented a Swagger login to get a token in each php script and it works, but it adds delays that are less than ideal and causes not infrequent incorrect results because of collisions during busy states. Checking to see if an existing token is still valid would add similar delays. Best would be an optional ability to extend token timeouts. I believe that would be a homebridge feature request.
In case anyone is interested, these php scripts are to compare inside and outside temperatures to set switches in homebridge so that HomeKit/Pushcut can trigger notifications. For whatever reasons Apple does not allow temperature sensor compares in HomeKit, even via shortcuts. Of course, they do enable comparing a sensor to a fixed temperature value.
It would be nice if there were a homebridge plugin that set switches based on temperature sensor compares. Since that doesn't exist the only solution I can see is via php scripts, which is heroic and inelegant. Seems like this is a common need and Apple's restriction may be due to concerns about safety or equipment damage if temperature compares are used indiscriminately.
from homebridge-config-ui-x.
A slightly different approach, but with a similar result is to leverage node-red for your rules engine, and the homebridge-automation flow access and control homebridge devices. This would remove the swagger requirement.
from homebridge-config-ui-x.
could you not just set auth to none?
https://github.com/homebridge/homebridge-config-ui-x/wiki/Config-Options#auth
from homebridge-config-ui-x.
auth is set to none. That does not seem to apply to Swagger.
from homebridge-config-ui-x.
node-red looks like an interesting approach. I may yet try that. If I had been aware of it, I might have spent the effort to learn node-red rather than ever-finicky php script. (I am not a coder by trade, just a retired particle/astro-physicist trying to get some basic home automation to work.)
from homebridge-config-ui-x.
node-red is simple and well worth the learning curve. It is based on a Graphical design model, backed by javascript
And with the existing integration to homebridge, it is pretty straight forward
from homebridge-config-ui-x.
In June (traveling in May) will do homebridge maintenance (upgrade Raspberry Pi OS, node.js,...) After that stabilizes I will will look into node-red. Do I understand correctly that node-red integration with homebridge goes through the cloud and requires an account subscription with homebridge.ca for communication? I am concerned that delays due to cloud transactions could cause similar problems as I am finding with multiple php scripts?
The optional control of Swagger token timeouts would still be very desirable as that is all local.
from homebridge-config-ui-x.
@etomnash the node-red integration with homebridge
go direct and does not use cloud or need a homebridge.ca account and is 100% local. Under the covers it leverages the HomeKIt api to control the homebridge devices.
from homebridge-config-ui-x.
OK. Was confused by the setup instructions link to your Alexa plugin instructions regarding insecure mode and that when on to how to setup the cloud communication.
from homebridge-config-ui-x.
Related Issues (20)
- All Devices - No Response HOT 2
- Operation failed with code 243 HOT 3
- Can‘t Update Node - Download Error HOT 7
- Cannot install package because of node-gyp-build error HOT 4
- Update from 4.55.1 to 4.56.0 fails with an error. HOT 5
- npm ERR! errno -4058 HOT 2
- Homebridge still loading at UI HOT 3
- Delay at the measurements of ram and cpu HOT 3
- Can‘t Update Node - Download Error #2029 HOT 2
- [Homebridge UI] Backup is skipping "storage/core" because it is larger than 10MB. HOT 5
- Homebridge was running smoothly for many months, now the accessories Tab is empty. HOT 3
- Homebridge status stays starting HOT 2
- Accessoires from homebridge not responding in apple homekit HOT 8
- Homebridge v1.8.0 broke connectivity to homekit HOT 2
- Homebridge v1.8.0 fails to install because of unknown git error HOT 1
- Error missing '../lib/cli.js' when installing a plugin using HomeBridge 1.8.0 HOT 5
- Homebridge accessoires not responding in apple homekit HOT 1
- no child bridge govee HOT 9
- becomes unreachable after restore from back up
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-config-ui-x.