Giter Site home page Giter Site logo

Comments (11)

NorthernMan54 avatar NorthernMan54 commented on May 27, 2024

Shouldn't your script handle this scenario and just automatically login again ?

from homebridge-config-ui-x.

etomnash avatar etomnash commented on May 27, 2024

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.

NorthernMan54 avatar NorthernMan54 commented on May 27, 2024

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.

bwp91 avatar bwp91 commented on May 27, 2024

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.

etomnash avatar etomnash commented on May 27, 2024

auth is set to none. That does not seem to apply to Swagger.

from homebridge-config-ui-x.

etomnash avatar etomnash commented on May 27, 2024

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.

NorthernMan54 avatar NorthernMan54 commented on May 27, 2024

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.

etomnash avatar etomnash commented on May 27, 2024

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.

NorthernMan54 avatar NorthernMan54 commented on May 27, 2024

@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.

etomnash avatar etomnash commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.