I’ve been playing around with an API to get data from my smart meter for gas and electricity. There’s a free API provided by these folks (https://glowmarkt.com/) which seems to work pretty well and gives me data up to the end of the previous day.
Any interest in this / anyone else tried something similar?
For Holland this is done many times, search for P1, this is the universal name for the connection from the smart meter here.
Just registered for bright myself, going to look if there’s a way to push the values out to JS in homey or use mqtt in some way!
I’ve not played with the MQTT yet but the API works well and is very easy to use. Using advanced flow it’s pretty straight forward to get the data into homey. One main reason for me that i wanted an app is to make the data appear as a whole house smart meter in the energy tab in homey. That way it automatically treats that as the total house consumption and creates an ‘other’ category with all the other energy meter readings from individual devices subtracted from the smart meter reading.
Nice, I’ve bought a few JS and Node.JS books myself, is there any resources you’ve used you’ve found helpful? I’m finding it difficult with the app development side but wondering if I’m jumping in the deep end too quick. Is your code open source for the app you’ve done so far?
Think I’ll try with the MQTT and advanced flow to start with! Perhaps an advanced virtual device may allow updates and the ability to show as a smart meter?
I am just working out how to get GitHub connected up with VS Code so I can manage the code in a repository. I also need to work out a way to make the authentication work without having to have my username and password hard coded into the app which was my very hacky way to get the proof of concept working. Once I’ve got those sorted, I will make the repository public and keep developing from there.
Thanks for the heads up, will take a look!
Keep us updated and I’ll let you know how I get on when I get a chance to try a few things!
You can store them in the env.json file and don’t publish that to GitHub. The format of the file is standard json with key: value pairs.
I am just working out how to get GitHub connected up with VS Code.
There are plugins for github in VS Code.
Thanks @Adrian_Rockall i have made some good progress today and got GitHub working with vs code. I think I’m well on the way now also to be able to sort the username and password issue. The challenge there was that I can’t use the env.json since each user will need to create their own account for the glowmarkt api and then enter their username and password into this app in order for it to connect and read their smart meter data. But Arie has very helpfully pointed me in the right direction to use the device store for this in another thread I opened on this question How to securely store username and password for an API within my app - #12 by DaneedeKruyff
Hi @Jonathan_Draper - how are you getting on with this?
Happy to collaborate with you if you like - I’m looking for this exact plugin, and it’ll save me writing it myself
I have your app installed and it works a treat.
Would there be a way to get my Gas Meter connected, so i could get the gas consumption.
That would be the icing on the cake for me.
Hi Brian. I did look into it but it’s not trivial. For gas the smart meter only reports the overall meter reading and not any form of ‘current rate of consumption’ so it’s not nearly as useful to have in homey I think and it’s also in strange units that need converting in a non trivial way. Finally there’s no suitable standard unit supported in homey so I’d have to create a custom capability for it.
All of which I think should in theory be doable and perhaps for a more experienced coder maybe fairly easy. But since I’m not that experienced and it didn’t seem that useful and I’ve got a lot on at the moment, I’ve not got round to it.
Thank you very much for the reply.