homekit | : house : A HomeKit Accessory implementation in Node.js

 by   song940 JavaScript Version: 1.0.0 License: MIT

kandi X-RAY | homekit Summary

kandi X-RAY | homekit Summary

homekit is a JavaScript library typically used in Internet of Things (IoT) applications. homekit has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i homekit' or download it from GitHub, npm.

A HomeKit Accessory implementation in Node.js.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              homekit has a low active ecosystem.
              It has 40 star(s) with 6 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2 open issues and 2 have been closed. On average issues are closed in 77 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of homekit is 1.0.0

            kandi-Quality Quality

              homekit has 0 bugs and 0 code smells.

            kandi-Security Security

              homekit has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              homekit code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              homekit is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              homekit releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed homekit and discovered the below as its top functions. This is intended to give you an instant insight into homekit implemented functionality, and help decide if they suit your requirements.
            • Finish the GC5 encryption processing .
            • Initialize camera .
            • Verify that decrypt and decryption .
            • Constructs a new Stream controller .
            • Updates a state with the given bytes .
            • Encode a TLV buffer
            • Generate MD5 blocks .
            • Decrypt layer .
            • Encrypts algorithm .
            • Encrypts the given cipher .
            Get all kandi verified functions for this library.

            homekit Key Features

            No Key Features are available at this moment for homekit.

            homekit Examples and Code Snippets

            No Code Snippets are available at this moment for homekit.

            Community Discussions

            QUESTION

            Is there an Android/iOS API for a 3rd party app to control Google Home linked devices?
            Asked 2022-Feb-25 at 17:39

            I'm looking to create a mobile app that controls lights that are connected to a Google Home, is this possible? I'm basically looking for a Google Home equivalent to Apple's HomeKit framework.

            This is a similar question, but also three years old, so I'm wondering if anything has changed, or changing soon with Matter.

            ...

            ANSWER

            Answered 2022-Feb-25 at 17:39

            The platform does not give programmatic access to developers to the devices in their home. In this regard nothing has changed up to this point. I cannot speculate what may happen in the future.

            Source https://stackoverflow.com/questions/71267975

            QUESTION

            Scraping data PRAW - How can I improve my code?
            Asked 2022-Feb-01 at 02:07

            I have this code:

            ...

            ANSWER

            Answered 2022-Feb-01 at 02:07

            Improving your existing code by reducing converting and server calls (with explanations at the end):

            Source https://stackoverflow.com/questions/69944807

            QUESTION

            Download & Upload zip file
            Asked 2021-Aug-24 at 14:28

            I am trying to mimic the following curl:

            ...

            ANSWER

            Answered 2021-Aug-21 at 02:21

            Like mentioned in the comments you meed to allow arbitrary loads. See Transport security has blocked a cleartext HTTP. For more details

            Source https://stackoverflow.com/questions/68867084

            QUESTION

            when tab bar background switch to dark, change tab bar items border color also
            Asked 2021-Jul-11 at 09:56

            I have small SwiftUI app, tab bar items have two color, selected have blue color and unselected have gray color and when I click the tab bar items , background switching to the dark color, and I want to change tab bar items border color like selected will have blue color, unselected will have red color when background switch to dark color , is it possible?

            DemoView:

            ...

            ANSWER

            Answered 2021-Jul-11 at 09:56

            You can change/add the following to your setTabViewBackground() method.

            Source https://stackoverflow.com/questions/68334990

            QUESTION

            iOS App Rejected: Guideline 2.5.4, CoreBluetooth Background Processing
            Asked 2021-Apr-15 at 20:02

            My app was rejected for TestFlight Beta as follows:

            "Guideline 2.5.4 - Performance - Software Requirements

            Your app declares support for external-accessory in the UIBackgroundModes key in your Info.plist file but does not declare any external accessory protocols supported by your app. The external accessory background mode is intended for apps that communicate with hardware accessories through the External Accessory framework.

            If your app is meant to work with external hardware, supported protocols must be included in the UISupportedExternalAccessoryProtocols key in your app's Info.plist file - and the hardware's PPID # should be provided in the Review Notes field of your app in App Store Connect.

            Additionally, your app must be authorized by MFi to use the desired hardware. If you are not yet in the MFi Program, you can enroll at MFi program."

            I read similar questions, but none answer or solve my problem.

            In Xcode project settings I have checked "Uses Bluetooth LE accessories" under Background Modes.

            In info.plist I have NSBluetoothPeriperalUsageDescription="Uses Bluetooth for switches and adaptive toys".

            If I uncheck "Uses Bluetooth LE accessories" under Background modes I think my app will be approved, but it leaves out the following important set of users of the app as follows:

            The app is for capability switch users in the Accessibility realm, which is already a small set of users. The feature requiring background communication between the app (central) and switches (peripheral) is for a specific subset of switch users that have a visual impairment and significant cognitive delays. This is an even smaller set of users, probably < 100 in the world, but it is an extremely important use case for these users. It is not practical to have the app always in the foreground when they use the app to use audio to say 1 or 2 words, typically "Yes"/"No", or "I need help!”, needed even when there is no WiFi or cell signal. For example, my test user (downloaded to her app directly from my Xcode dev env) with Fox G1 syndrome uses this mode exclusively and has seen great improvements in having some minimal control of things in her life (e.g., saying “I need help” when she feels a seizure coming on or requires diapering).

            Current capability switches on the market use the Bluetooth HID profile, which does not allow for background use or 2-way communication between central (my app) and accessory (switch box), to do important feedback like adjusting delay time for switch activations for users with movement disorders and tremors, also the case of my test user.

            Has anyone successfully received app approval for background communication with an accessory as a peripheral that is not MFi or HomeKit approved? When I read the MFi FAQ, this peripheral accessory does not appear to fall into the MFi umbrella, and with HomeKit I already came across the limitation that it does not work when the device is sleeping (this latter case is another bone I have to pick, since non-touch users cannot turn on lights, open auto-doors, turn up heaters... unless the device is open which they cannot physically do, and Siri is not an option since they are non-verbal!).

            Additional technical background regarding the app: I use only CoreBluetooth (UART), where the app is the central. My API is so simple I am slightly embarrassed to list it, but here goes:

            // BLE UART API

            let receiveSwitch1On: NSString = "SWITCH1_ON"

            let receiveSwitch1Off: NSString = "SWITCH1_OFF"

            let receiveSwitch2On: NSString = "SWITCH2_ON"

            let receiveSwitch2Off: NSString = "SWITCH2_OFF"

            let sendSwitchboxOn: NSString = "ON"

            let sendSwitchboxOff: NSString = "OFF"

            let updateDebouncePrefix: NSString = "DEBOUNCE="

            let updateGraceOffPrefix: NSString = "GRACE_OFF=“

            Does anyone have a suggestion on what I could change technically, or advice for navigating the app approval process on what my lowest cost option would be to keep this use case of background comm between app and peripheral? Already I've spent significant time and money to create this capability. I am not in this to make money, but to provide some benefit to a small set of users that are largely left out of technology. I am willing to spend more time and money to reach the finish line, but I really can't afford a lot of ongoing program costs as I expect MFi or HomeKit might be.

            Thanks for reading!

            ...

            ANSWER

            Answered 2021-Apr-15 at 20:02

            Check your info plist.

            Apple's message says that you have external accessory background capability selected. This is not the Bluetooth LE background mode you are discussing in your question.

            You don't need external accessory capability to use Core Bluetooth in the background.

            Source https://stackoverflow.com/questions/67079392

            QUESTION

            dns-sd Registration Not Appearing in Browse After Being Accepted
            Asked 2020-Oct-01 at 18:35

            I'm running home-assistant in a docker container on MacOS Catalina and need to allow HomeKit to interface with it. I'm trying to register a service with dns-sd to get it to work based on a fix recommended in a thread on the issue. The registration works, but the service doesn't appear afterward if I understand it correctly.

            I first enter:

            ...

            ANSWER

            Answered 2020-Oct-01 at 18:35

            If I run the following (zsh):

            Source https://stackoverflow.com/questions/64160820

            QUESTION

            Xamarin iOS - HomeKit integration
            Asked 2020-Sep-24 at 13:04

            I'm working on an app using Xamarin.iOS. I need to add the possibility to add an accessory to HomeKit using the address coming from an internal API (basically I retrieve the address of the device using a web request). Once I have this setupCode of the accessory I try to use the following API from HomeKit

            https://docs.microsoft.com/en-us/dotnet/api/homekit.hmhome.addandsetupaccessories?view=xamarin-ios-sdk-12#HomeKit_HMHome_AddAndSetupAccessories_HomeKit_HMAccessorySetupPayload_System_Action_HomeKit_HMAccessory___Foundation_NSError__

            in particular the API with the following signature AddAndSetupAccessories(HMAccessorySetupPayload, Action) but the Action that should be called on completion it's never called.

            The only result that I get is that my app tries to go in background but it remain stuck and become unusable.

            The only hint that I get from the device log is this:

            HomeUIService Host app does not have entitlement 'com.apple.homekit.private-spi-access' or 'com.apple.developer.homekit.allow-setup-payload' -- not allowed to add from URL!

            but I have the Entitlement for Homekit added to my app. I'm not able to find any documentation on the entitlements specified in the log message.

            Has anyone experienced something like this?

            Thank you guys

            ...

            ANSWER

            Answered 2020-Sep-24 at 13:04

            I had the answer from Apple Support, so I answer my question just for someone in the future or myself in the past (Dark series spoiler :).

            Basically this API doesn't work if you don't add the Entitlement "com.apple.developer.homekit.allow-setup-payload" with value equals to True.

            I know, there is no documentation regarding this, but this is it.

            Cheers guys

            Source https://stackoverflow.com/questions/63940330

            QUESTION

            While using IMPORTXML, why can I get IMG ALT but not IMG SRC?
            Asked 2020-Aug-10 at 19:21

            I'm trying to use Google Sheets as a scraper to get product descriptions prices and images from a specific store. https://www.aliexpress.com/store/group/xiaomi-Aqara-Smart-home/2389096_516541380.html

            I'm trying to retrieve the image URLs from this page but in the end, I'm not able to make it work.

            ...

            ANSWER

            Answered 2020-Aug-10 at 19:21

            That page is loaded dynamically using javascript, and the sample html in your question is a result of that. Absent some trickery (you can search around for scripts to handle dynamically loaded pages), GS can't retrieve that data.

            Fortunately, not ALL data is loaded like that. If you disable JS on that page, you will get most of the same data, including the info; only this time - it looks like this:

            Source https://stackoverflow.com/questions/63340386

            QUESTION

            How to cleanly tell a task to die in FreeRTOS
            Asked 2020-Jun-04 at 08:54

            I'm making a light with an ESP32 and the HomeKit library I chose uses FreeRTOS and esp-idf, which I'm not familiar with.

            Currently, I have a function that's called whenever the colour of the light should be changed, which just changes it in a step. I'd like to have it fade between colours instead, which will require a function that runs for a second or two. Having this block the main execution of the program would obviously make it quite unresponsive, so I need to have it run as a task.

            The issue I'm facing is that I only want one copy of the fading function to be running at a time, and if it's called a second time before it's finished, the first copy should exit(without waiting for the full fade time) before starting the second copy.

            I found vTaskDelete, but if I were to just kill the fade function at an arbitrary point, some variables and the LEDs themselves will be in an unknown state. To get around this, I thought of using a 'kill flag' global variable which the fading function will check on each of its loops.

            Here's the pseudocode I'm thinking of:

            ...

            ANSWER

            Answered 2020-Jun-04 at 08:54

            I'm sorry to say that I have the impression that you are pretty much on the wrong track trying to solve your concrete problem. You are writing that you aren't familiar with FreeRTOS and esp-idf, so I would suggest you first familiarize with freeRTOS (or with the idea of RTOS in general or with any other RTOS, transferring that knowledge to freeRTOS, ...).

            In doing so, you will notice that (apart from some specific examples) a task is something completely different than a function which has been written for sequential "batch" processing of a single job.

            Model and Theory

            Usually, the most helpful model to think of when designing a good RTOS task inside an embedded system is that of a state machine that receives events to which it reacts, possibly changing its state and/or executing some actions whose starting points and payload depends on the the event the state machine received as well as the state it was in when the event is detected. While there is no event, the task shall not idle but block at some barrier created by the RTOS function which is supposed to deliver the next relevant event.

            Implementing such a task means programming a task function that consists of a short initialisation block followed by an infinite loop that first calls the RTOS library to get the next logical event (see right below...) and then the code to process that logical event. Now, the logical event doesn't have to be represented by an RTOS event (while this can happen in simple cases), but can also be implemented by an RTOS queue, mailbox or other. In such a design pattern, the tasks of your RTOS-based software exist "forever", waiting for the next job to perform.

            How to apply the theory to your problem

            You have to check how to decompose your programming problem into different tasks.

            Currently, I have a function that's called whenever the colour of the light should be changed, which just changes it in a step. I'd like to have it fade between colours instead, which will require a function that runs for a second or two. Having this block the main execution of the program would obviously make it quite unresponsive, so I need to have it run as a task.

            I hope that I understood the goal of your application correctly: The system is driving multiple light sources of different colours, and some "request source" is selecting the next colour to be displayed. When a different colour is requested, the change shall not be performed instantaneously but there shall be some "fading" over a certain period of time. The system (and its request source) shall remain responsive even while a fade takes place, possibly changing the direction of the fade in the middle.

            I think you didn't say where the colour requests are coming from. Therefore, I am guessing that this request source could be some button(s), a serial interface or a complex algorithm (or random number generator?) running in background. It doesnt really matter now.

            The issue I'm facing is that I only want one copy of the fading function to be running at a time, and if it's called a second time before it's finished, the first copy should exit (without waiting for the full fade time) before starting the second copy.

            What you are essentially looking for is how to change the state (here: the target colour of light fading) at any time so that an old, ongoing fade procedure becomes obsolete but the output (=light) behaviour will not change in an incontinuous way.

            I suggest you set up the following tasks:

            • One (or more) task(s) to generate the colour changing requests from ...whatever you need here.

            • One task to evaluate which colour blend shall be output currently. That task shall be ready to receive

              1. a new-colour request (changing the "target colour" state without changing the current colour blend value)
              2. a periodical tick event (e.g., from a hardware or software timer) that causes the colour blend value to be updated into the direction of the current target colour
            • Zero, one or multiple tasks to implement the colour blend value by driving the output features of the system (e.g., configuring GPIOs or PWMs, or transmitting information through a serial connection...we don't know). If adjusting the output part is just assigning some registers, the "Zero" is the right thing for you here. Otherwise, try "one or multiple".

            What to do now

            I found vTaskDelete, but if I were to just kill the fade function at an arbitrary point, some variables and the LEDs themselves will be in an unknown state. To get around this, I thought of using a 'kill flag' global variable which the fading function will check on each of its loops.

            Just don't do that. Killing a task, even one that didn't prepare for being killed from inside causes a follow-up of requirements to manage and clean-up output stuff by your software that you will end up wondering why you even started using an RTOS.

            I do know that starting to design and program in that way when you never did so is a huge endeavour, starting like a jump into cold water. Please trust me, this way you will learn the basics how to design and implement great embedded systems. Professional education companies offer courses about RTOS integration, responsive programming and state machine design for several thousands of $/€/£, which is a good indicator of this kind of working knowledge.

            Good luck! Along that way, you'll come across a lot of detail questions which you are welcome to post to this board (or find earlier answers on).

            Source https://stackoverflow.com/questions/62113104

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install homekit

            On Linux and other systems using the avahi daemon the avahi dns_sd compat library and its header files are required. On debianesque systems the package name is libavahi-compat-libdnssd-dev. On other platforms Apple's mDNSResponder is recommended. Care should be taken not to install more than one mDNS stack on a system. On Windows you are going to need Apples "Bonjour SDK for Windows". You can download it either from Apple (registration required) or various unofficial sources. Take your pick. After installing the SDK restart your shell or command prompt and make sure the BONJOUR_SDK_HOME environment variable is set. You'll also need a compiler. Microsoft Visual Studio Express will do. On Windows node >=0.7.9 is required.

            Support

            Fork this Repo firstClone your RepoInstall dependencies by $ npm installCheckout a feature branchFeel free to add your featuresMake sure your features are fully testedPublish your local branch, Open a pull requestEnjoy hacking <3
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i homekit

          • CLONE
          • HTTPS

            https://github.com/song940/homekit.git

          • CLI

            gh repo clone song940/homekit

          • sshUrl

            git@github.com:song940/homekit.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link