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:

Steven

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.

1 Like

Hi,

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.

Steven

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.

1 Like

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!

1 Like

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?

1 Like

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.

1 Like

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/

1 Like

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:
Steven

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

Thanks!

OK, I’m not a programmer and not experienced with Linux/Unix but I definitely want to use Homebridge as soon as possible to control my 10 Photons around the house…

So, I took all my courage together and ordered a new Pi3 B+…

In one long day, I have …

  • assembled my brandnew Pi with a SmartiPi touchscreen,
  • set-up the Pi from scratch,
  • learned to speek Linux :wink: ssh and VNC my Pi from my Mac and
  • managed to set it’s resolution to such an incredibly small size that I could’nt configure it anymore and I
  • escaped finally! (With a little help from great Linux minds!)
  • set-up Particle Pi where
  • managed the little green “D7” led using my iPhone App. Then
  • started installing Homebridge by following the original Github instructions by nfarina which Jordy (@Moors7 ) mentioned in the previous post.

I am very happy I managed to install Homebridge that far already without any help, but now I’m afraid to be STUCK!

Can one of you, experienced Homebridge users, give me a tip how I could proceed?
This weekend I 'd like to make it work…

These are the last steps I took a few minutes ago:


All went well with trial & error…
Fnally I also managed to create a required “homebridge” system user using “sudo” as my authorization wasn’t right… However, I couldn’t check if this user can write to that directory.

All seemed to go well until I did this (From NFARINA 's Github procedure):

* Then Enable and run the service (first time) with the following commands:

systemctl daemon-reload
systemctl enable homebridge
systemctl start homebridge

What happened on the Pi’s terminal screen?

pi@raspberrypi:/var/lib/homebridge $ systemctl daemon-reload

=> OK, seems fine…

pi@raspberrypi:/var/lib/homebridge $ systemctl enable homebridge
Failed to enable unit: File homebridge.service: No such file or directory

=> ERROR! ???

When I check the homebridge directory and “config.json” file, they both exist:

pi@raspberrypi:/var/lib/homebridge $ ls
config.json

Checking the homebridge status:

pi@raspberrypi:/var/lib/homebridge $ systemctl status homebridge
Unit homebridge.service could not be found.

=> STUCK!

:wave::older_man:

Continued in this new thread:

With Argons using the ESP32, projects using an ESP might have already figured out the hard parts. Mainly posting so I remember to look into this when I get mine.

I'm not sure whether you are aware of the fact that the ESP32 is only used as the WiFi "coprocessor" and is not actually driving the device. It's also not intended to be programmed by the user and it's GPIOs are not exposed via device pins either.

3 Likes

I just made time to click order. Thanks for the info, I read the specs, but obviously not closely. I’ll read up and not derail this thread.

Update, I don’t feel as stupid. With the tag line “Wi-Fi connected and powered by the ESP32”
There isn’t confusion if I say ‘WiFi connected and powered by an i7’