homekit | : house : A HomeKit Accessory implementation in Node.js
kandi X-RAY | homekit Summary
kandi X-RAY | homekit Summary
A HomeKit Accessory implementation in Node.js.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- 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 .
homekit Key Features
homekit Examples and Code Snippets
Community Discussions
Trending Discussions on homekit
QUESTION
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:39The 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.
QUESTION
I have this code:
...ANSWER
Answered 2022-Feb-01 at 02:07Improving your existing code by reducing converting and server calls (with explanations at the end):
QUESTION
I am trying to mimic the following curl:
...ANSWER
Answered 2021-Aug-21 at 02:21Like mentioned in the comments you meed to allow arbitrary loads. See Transport security has blocked a cleartext HTTP. For more details
QUESTION
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:56You can change/add the following to your setTabViewBackground()
method.
QUESTION
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:02Check 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.
QUESTION
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:35If I run the following (zsh):
QUESTION
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
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:04I 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
QUESTION
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:21That 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:
QUESTION
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:54I'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 TheoryUsually, 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 problemYou 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
- a new-colour request (changing the "target colour" state without changing the current colour blend value)
- 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".
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).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install homekit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page