Code Monkey home page Code Monkey logo

hc's People

Contributors

brutella avatar chris-rock avatar cloudkucooland avatar comawill avatar dgageot avatar eaigner avatar fernferret avatar gonzolino avatar hairyhenderson avatar hubertat avatar jjcinaz avatar josh avatar mxlje avatar pmaene avatar simonwaldherr avatar timoschilling avatar tomtaylor avatar yakutozcan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hc's Issues

Fix invalid http host header field value

iOS uses the mDNS service name as host header field value – whitespaces are encoded as \032.
Go1.6 validates the host header field value as reported in #48 and will fail on any backslash character ("").

There is now a radar for Apple to fix that.

Until then we should remove whitespaces from mDNS services names.

Thermostat example?

Hi - this looks like a great project, thanks for working on it so far. I'd really like to expose my Raspberry Pi driven thermostat using HomeKit, and I'm not quite sure how to get started.

I can see the example with the switch, but the thermostat structs don't seem to have the same callback functions - I can't see how to bind up something that will trigger when the user changes the target temperature.

Am I missing something, or has this not been implemented yet?

Flatten project structure

Most sub-packages (if not all) can be consolidated into one package (preferably at the top level). For instance packages like util are not really required and can just be private package methods.

Bonjour: Failed to handle query

When I start up my app that runs two accessories, I get the following right at startup:

2016/08/16 22:26:09 [ERR] bonjour: Failed to handle query:
  write udp4 0.0.0.0:5353->192.168.0.16:5353:
    sendto: operation not permitted

I am running on Ubuntu 16.04 and I have stopped avahi-daemon to make sure port 5353 is available.

Is the problem here that it is trying to send a UDP packet from 0.0.0.0 ?

How to build own accessory?

I am trying to extend the thermometer to support additional sensors such as a carbon dioxide sensor and an humidity sensor. It is not really clear to me how to integrate those additional services. Might be due to my very limited golang experience. Could you provide some example on how to add an additional service to an accessory?

High latency client can crash the bridge

If the client is under enough packet loss or experiencing high enough latency, the following happens to me:

2015/07/18 19:28:44 [ERRO] Decryption failed: read tcp 192.168.1.104:65302: operation timed out
2015/07/18 19:28:44 [ERRO] Decryption failed: use of closed network connection
2015/07/18 19:28:44 [INFO] Close connection and remove session

The server is then dead and must be halted and resumed. If this is a fatal error, it should be handled as such and the program should terminate. If not, the connection should be retried. I haven't gotten deep enough into netio to see where to handle this better, and this is my first real foray into reading someone else's go.

How to update hc?

Could you provide some documentation on how to update an existing hc installation?
I am a bit puzzled, since the installation guide only clones the hklight repo. How does the hc code get updated to the latest version of the repo?
Thanks!

Q: Is it possible to query the state of other accessories through hc?

If I have other HomeKit enabled devices, would it be possible to query the state of those, and build new aggregated services from those devices?

Say I want to create a thermostat using the the already HomeKit connected temperature sensor in Elgato Eve Room, would that be possible via HomeKit or would I have to get data from the Bluetooth transfer directly?

MFi Compatibility

How can you enable the MFi compatibility? Is there stub functions to fill?

Start hc after boot on Debian

Is there an easy way to have hc started after a reboot? I can use the following script to start hc from the command line:

export GOPATH=~/go/
cd ~/go/src/hklight/
go run ~/go/src/hklight/home.go

But I can't execute it via cron after a reboot. Any suggestions on how to start hc after a reboot?

New accessories

Thanks for your work!
You plan to add new accessories?
Very interested in the camera and doorbell.

Does hklight work on OSX?

Hi,

I just wanted to dip my toes into this project by playing with hklight. But after starting it my iPhone does not see the accessory. Before I investigate further, is this known?

regards

bonjour fail... help

Hi, folks,

i try to start the example from the tutorial of brutella but i receive an error:

antonkluev.pi ~/go/src/hklight $ go run hklightd.go
2015/10/26 21:18:07 [INFO] Accessory IP is 192.168.1.8
2015/10/26 21:18:07 [ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: address family not supported by protocol

the homekit apps don't see my virtual accessoire..
can anyone help me?

and i have one more question: can i use my raspberry pi to control multiple accessoires?
thx guys!

Control of the IP Address that HC binds to

It would be nice to be able to control which ip address HC binds to instead of it just choosing one as it does now. I run HC on my linux gateway/firewall system and it was grabbing the outside interface address when I prefer it to keep its traffic on my internal net.

I've got a diff for the GetFirstLocalIPAddress func in mdns.go that first attempts to use the hostname ip address before falling back to just blindly grabbing the first available IP address.

An even better solution would be to be able to specify the address to bind to, perhaps as an additional variable in hap.Config? I don't "know" go but have figured it out enough for this diff. If hap.Config would be an approved method, I could work on implementing that.

iPhone on iOS 9 can't reconnect to bridge

iOS 9 connects and findes products in home app, after connection is lost (wifi | flight mode toggle on/off) and products remains disconnected..

Philips hue bridge connects right away (so no ios9/ iPhone problem)

As a developer I want to identify my accessory

The current implementation of POST /identify does nothing other than responding with HTTP status code 204 (no content).

Things to do

  • Respond with HTTP status code 400 (bad request) when accessory is already paired with a device
  • Respond with HTTP status code 204 (no content) when accessory is not paired. Provide method for developers to let the accessory identify itself.

Help: How to integrate temperature sensor

I'm the guy on twitter who asked for the netamo integration :)
I'm trying to integrate a temperature sensor. I can access the temperature via simple http requests. Can I adapt the thermometer class for this?
https://github.com/brutella/hc/blob/master/model/accessory/thermometer.go

I tried adding the temperature sensor to my devices like follows: 
thermometer_info := model.Info{
    Name:         "Netatmo",
    SerialNumber: "001",
    Manufacturer: "Netatmo",
    Model:        "Thermostaty",
    }

    model_thermometer := accessory.NewTemperatureSensor(thermometer_info, 10, 0, 100, 1)

But this will obviously give me 10°C as the temperature. Is there a func called when I access the sensor device via homekit? I would put the http call there. Thanks!

Prevent invalid characteristic values

Characteristics have a specific type (string, float, ...) and may have a min and max. We should prevent invalid values; e.g. 24 for values which have a max of 20.

Additions/modifications

Hi Matthias,

First, this is not an issue as such :-)

Second, great work you have done here. Now then, I'm working on an "HomeKit to MQTT Server" that allow bidirectional communication between HomeKit (using your HomeControl) and devices communicating via the MQTT protocol. So far I've made a new transport based on
'ip_transport.go' and a few additions/modifications here and there (including adding new accessories).

So the question is: are you willing to accept PRs (if the code is ok of course)?

If I commit/sync to github you can have a look - any interest?

/michael

Resetting State Information

Is there a simple way to reset the state information. For example reset all bulbs to off. Or would just restarting the program be enough to do this?

Multiple devices

How would one add multiple devices at once?

When I run hap.NewIPTransport("00102003", sw.Accessory) for every device, I get:

2015/07/15 21:49:18 [ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use

bonjour errors

Hi,
I built this for OSX but when I run it I get..
[Maelstrom 16:45] ~/projects/go/src/hklight >./hklightd
2016/12/16 16:45:26 [INFO] Accessory IP is 192.168.1.29
2016/12/16 16:45:26 [ERR] bonjour: Failed to unpack packet: dns: failed to unpack truncated message
2016/12/16 16:45:26 [ERR] bonjour: Failed to handle query: dns: failed to unpack truncated message
2016/12/16 16:45:26 [ERR] bonjour: Failed to unpack packet: dns: failed to unpack truncated message
2016/12/16 16:45:26 [ERR] bonjour: Failed to handle query: dns: failed to unpack truncated message
etc..

I ran wireshark looking for traffic but couldn't find anything (so.. maybe I looked in the wrong place :)

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.