I’m going to try to write a 3rd party Add-in for Patriot (https://github.com/rlisle/Patriot). This should simplify adding Photon DIY devices to Home Assistant. I’m just starting on this, so I’m very much on the steep part of the learning curve. Does anyone have any suggestions for how to get ramped up quickly on creating Add-Ins?
Just wanted to update this thread as it is the first one that comes up on Google when you search for photon and home assistant integration:
I ended up using a webhook integration between particle.io and Home Assistant and it was perfect (and simple!!).
I used an HTTP Sensor as the end point!
It would be great if you could elaborate on this a bit, perhaps with an example?
First of all you need to have your Home Assistant available from the Internet. (I wont elaborate on this as there are plenty of docs on the subject)
Next you need to create a long-lived access token in your Home Assistant user profile, click on your user at the very top left of your HA ui (yourhomeassistant.url/profile)
After that in your particle.io console go to the integrations page, and create a new Webhook:
Event Name: The name of the particle.io event you want to send to HA
Full URL: https://yourhomeassistant.url/api/states/sensor.nameofthesensorthatwillbecreated
Request Type: POST
Request Format: JSON
Device: pick the particle.io device that is sending that event
“friendly_name”: “Friendly name of the sensor created in HA”
“Authorization”: “Bearer INSERTTHELONGLIVEDTOKENYOUCREATEDEARLIER”
Enforce SSL: Yes
That’s it, you create one integration per metric you want to have from your particle sensor and you get a sensor in HA for each of them!