HomeKit update, non-commercial version - SRP


Well, thanks for your contributions but my question was rather precise and technical.

Also i already use a rpi as homebridge but this solution is not straight forward and is adding an additional possible point of failue in the chain, while having it native on the photon would be in my opinion much more reliable.

Anyway, still if anyone has a hint how to solve the compile failure i have i’d be happy to try it :wink:



Hi @steven_r

The uint64_t and similar types are in a standard C header file called “stdint.h” but that should be included with Application.h or Particle.h.

How are you compiling? If you are using gcc on your own computer it could be that the environment is not set up correctly. If you are using the webIDE or Atom-based editor, then the cloud compiler is already set up for you.



Yes I’m using the CLI on my Mac OS X computer. I never had any problems like this before by compiling, and also included at first the stdint.h … but still the message:

sha.h:158:5: error: unknown type name 'uint64_t’
uint64_t state[8];

…and other references to similar types.
I’ll try your suggestion in using the web IDE.



The problem is that somehow the header file sha.h needs to include stdint.h and it isn’t getting there.


I connect my Particle devices to openHAB via MQTT, and openHAB in turn exposes them to HomeKit.

It’s probably a lot of work for someone who doesn’t want to use openHAB, but it does work and could be set up with just a single Raspberry Pi serving as openHAB server and mqtt broker.


Hi @fidel allow me to respond to explain that in speaking with both Apple and Particle, it seems possible to develop a HomeKit solution but it would probably be best provided as a compiled library maintained by Particle. Their new Particle Studios offering seems to address this: you can pay them to help you develop a HomeKit solution, for example.

Apple has a diagnostics tool which they use with development partners to help test HomeKit implementations, but they don’t plan to release it publicly, yet. Until then, I was able to get a basic Bonjour/HTTP/HomeKit server working but my solution was really a one-off implementation for temperature control of a home brewery system. Perhaps overkill to try to control my brewery from an iPad, but, damnit, the beer was worth it!


I’d be interested to hear why you chose to go with HomeKit for your project, rather than using a simple app or web page to control your brewery system. What advantage does HomeKit offer?


Hi @Ric - we had a contract to investigate a HomeKit based solution for potential commercial deployment (think a KickStarter based product for home brewers) and this Particle project was started as part of that prototyping work. In general though, if you use HomeKit as I do, it becomes the dashboard that me and my family want to use – for everything.


I’m not familiar with the dashboard. Where does that come from; is it a part of HomeKit, an available app, or something else?


You can find more information on the Apple development portal, here: https://developer.apple.com/homekit/


thanks @bko, with your hint I passed the previous error message (by including a sea.h files and resolving the “missing” dependencies.

Unfortunately I bump into another issue. (Error: “SRPClient.cpp:12:22: array used as initializer” )
I have to mention I am compiling using the web IDE (to avoid getting local compiler issues). I searched internet for that particular error, but did not find a working solution.

Maybe @moflo you could help me, explaning on which environment you compiled it, CLI or web IDE, if you got the error already, etc…

Thanks in advance :slight_smile:


Could this be your problem?

How about building a target like 0.7.0-rc.7? IIRC this uses a 5.x.x GCC in the build farm.

Also quoting the “offending” line/block of code would help diagnosing the problem.


Hi Moors7, can you point me to a recent guide to setup Homebridge on a Pi? Any site you would particularly recommend?


The official github wiki is always a good place to start: https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi