What would you do if you had access to our API?

Great! Nice use case. Thanks for that :slight_smile:

That makes sense, yeah, it’s impossible for the Bulb app to cover everyone’s use cases.

Thank you for the info! :slight_smile:

1 Like

Very interested in the bulb api, I’d like to be able to integrate it into Home Assistant (home-assistant dot io) especially now they have a new energy dashboard in the upcoming 2021.8.0 release which is due out tomorrow.

Happy to provide any testing.

1 Like

Same here. Would be super cool to implement that.


@Aminix_at_bulb @Daisy_at_Bulb
Sorry I am writing this here, but just quickly, would somebody from appropriate department be able to contact me (or you could give me link or something) regarding OTA update of my smart meter, please?

The recent home-assistant website has a few recent blogs covering what api uses I would want. Would be even better if bulb energy had an official integration to the largest and fastest free opensource home automation platform.


Like many others, integrate into home Assistant to trigger automations and track energy usage against appliance state (ie hot tub was on for 1 hour 8pm to 9pm), energy cost was £x.

Have a smart meter and in home display, but meter is outside the property and out of range for the display, so can’t extract usage via smartthings :angry:

1 Like

Just adding my voice to those looking to use the new Home Assistant energy management.

+1 for Home Assistant, but also would be great to be able to pull the data directly into Zabbix via a REST API.

Ideally I’d like to read: current power (watts), current current (amps), current power factor (if available). Potentially also current voltage. I can potentially see a use case for billing info: Current unit price, account balance, etc.

I’m personally less interested in the historical data as I’ll just create my own history in my dashboards.

1 Like

I would integrate your data into our home dashboard (of course!).

We currently have an CurrentCost Envir hooked up to a RPI2 that feeds into an influxdb and goes to a home grafana dashboard. This is good for pretty much any reasonable timespan (we probably only care about every 30 minutes to be honest).

I prefer grafana to an app as we chart a spectrum of home data there: temperature in rooms (zigbee), network usage by device, disk space, backups, peak and off-peak electricity usage, etc.

If you had an API that would provide data every n-minutes, then we could move over to that. Thus far we’ve resisted the move to smart-meter as it’s not providing any discernible value here.

1 Like

1- What would you use a REST API for?
I have a home automation system which manages and monitors all the event activity in my home, I would use the API to monitor overall electricity use and then with the internal power monitors, be able to adjust my own use to improve consumption.

2- Why would you prefer that to using our app?
I have various Zigbee and WiFi devices managing the home, but am trying to reduce these by replacing them with more wired/cabled devices. I currently do not have a WiFi enabled IHD (the only other method of monitoring via SmartThings) so I would have to purchase. If I were able to monitor over an API it would reduce the need for another WiFi device and then need for me to purchase one.

3- Why would you use our API rather than your car’s API?
I assume this to be an electric car, if so, I would use that too. but the overall usage should be obtained as a baseline. Each device using power/gas should be an additional feed to allow for granular managment and ultimately, reduction.

1 Like

@Aminix_at_bulb just another voice home assistant. Again, an integration with home assistant would be brilliant.

And while there appears to be a workaround with using smartthings and the IHD, I currently don’t have an IHD. My previous provider, who installed my smart meter, didn’t provide me with one. It would be great to get one to use smartthings in the time being.


1 Like

I personally would like to see two APIs:

  1. A central API for data coming from the central Bulb database - basically giving access to the raw data that is used to power the graphs on the website, to be consumed by third party integrations, like Home Assistant, Google Home, etc.

Data coming from this API would include historical data, pricing information, both account-specific (i.e. my own usage), and ‘global’ data (pricing per unit). Access to notifications/messages on the account would also be cool, but not a must.

This would require, in my opinion, an OAuth based account linking for security, with the option given to users to register their own implementation next to the cloud-based providers (e.g. Google Home).

  1. A local API provided by the IHDs - this already exists but isn’t open, unless my understanding of how SmartThings connects to the IHD is incorrect.

The IHD already gets some data from your servers for displaying rates/pricing, but what would be very useful here is the real-time consumption data. What I’d like to see is a streaming API that provides up to date (to the second) consumption, probably the easiest over websockets - although I’m not married to this idea, I would be perfectly happy with an advanced configuration option that would let the IHD connect to a local MQTT instance and publish data to it.

This should only need local authentication, which is solved on SmartThings via the GUID of the IHD. Some extra security would also need to be in place to prevent direct access from the internet (if someone would be dumb enough to open their IoT network up to the internet…), BUT I wouldn’t base it on e.g. the DHCP-provided network range (making it configurable, with the defaults coming from the DHCP settings is okay). My reason for this is simple - my IoT network is completely separate from my home network, clients are isolated, and per-client firewall rules are in place for IoT stuff that needs internet access (e.g. my ESPHome devices are local network only, but my Nest Hubs require internet). An extra routing/firewall rule is also in place to allow the IoT network to reach my Home Assistant instance (which is on the main net), so if the default permission is given by DHCP range, this would obviously block access from HA.

I firmly believe that a user should be able to access the raw data relevant to their home, especially if the device sending the data is in their home. A number of IoT/smarthome component manufacturers have realised this, and there’s been a recent push for local open APIs. Cloud based solutions are neat for user convenience, but pose a security risk - you’re trusting a third party with your data, and depend on them for uptime. Remember when last year Amazon’s servers went down, and left a considerable amount of users unable to even turn their lights on? Local, offline-first solutions are the future of smart home technologies, for a number of reasons (availability, security).

So while an online API is great to have, I think the local access to such data should be a priority. But I do understand that it is also more complex to implement, since deploying it requires a level of user interaction (e.g. updating the software on IHDs), whereas an online API update can be deployed much easier.

As for what I’d use the data for… The IHDs are incredibly limited when it comes to analytics. They display data in a fixed, easy to read format, which might be enough for your average user, but for power users, they’re just simply not enough. I would love to see detailed breakdowns, historical data (which might not be available in high enough resolution after a certain period of time - you guys too need to optimise data storage, so it makes sense that I wouldn’t be able to access minute-level usage from 6 months ago, but for me, storing my own data is not a major issue), and even run detailed analysis and queries to e.g. identify major power hogs, or optimise devices that might unnecessarily use more power than required.

Last, but not the least, big kudos for being so direct with your community about even such niche things - I can’t imagine that, as of now, a large number of your users would have much interest in APIs. While this openness was certainly a major factor for me in choosing Bulb, I’m fairly certain a majority of Bulb users wouldn’t even know what an API is if they were asked.


Just chiming in to say would love to connect your API with my Home Assistant, and do things like automate sending alerts when energy consumption is high, build energy dashboards, etc. I have a lot of connected smart devices but there are still good few big ones which aren’t, so having on-demand access to the power consumption data would certainly help.

1 Like

Real time alerts, got it!

Thank you and everyone for the great feedback, this is super valuable to us. We’re looking into how to develop this in the future, I hope that one day we have something for you :slight_smile:

Throwing in on this too, right now I live in a block of flats where the smart metret is out of range for the IHD so I cannot get any real time data on my usage.
Having an API would allow me to add my electric usage to my own (IOT) dashboards and see what I can’t get out of the IHD.
In theory when the IHD is connected to wifi it too could use the API’s for users that are beyond the range of their smart metre and don’t necessarily have the skills to use an API to get this info.

I’d love to get pricing data and energy mix as live as possible from Bulb so I can add it to my home energy use dashboard (I also have solar panels feeding into that).