-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simulator #1
Comments
hello, currently I use homebridge-dummy and homebridge-dummy-thermostat packages to emulate accessories. I doubt that faking mdnssd is worth it. So I would emulate accessories with brutella/hap. |
Ah dummy looks perfect . Did not know that already existed . Could you possible add a basic example in readme or whatever makes sense . To show how to inject dummy hardware |
Thanks . Will pick it up tomorrow. Thanks for helping me |
nice system.
Would be good if there is a way down in the https://github.com/hkontrol/hkontroller to create fake Apple Home devices.
would make testing easier.
https://github.com/hkontrol/hkontroller/blob/main/controller.go#L175 could have a SetDevices and use the memory store.
Even better would be to just allow a mocking of the StartDiscovering() func at https://github.com/hkontrol/hkontroller/blob/main/controller.go#L70.
Another way would be to have a config file that could then be used for running different testing scenarios. The controller.go could then ask for this config, wire up the fake Devices with a fake DNS, and the StartDiscovering() would see them. With this approach its possible to inject fake devices from the bottom of the system.
https://github.com/brutella/dnssd#create-a-mdns-responder looks like it already has this feature too. We just have to use it.
The text was updated successfully, but these errors were encountered: