r/Scriptable • • Jan 13 '21

Help House Energy widget - a question

Post image
52 Upvotes

14 comments sorted by

7

u/seppelicous Jan 14 '21 edited Jan 14 '21

So this is my first widget - hooray! The data is provided by nodered, packed into a json file and uploded via ftp to my webserver every few minutes. Code on request, if someone is Interested, but it is not yet ready and ist needs some work to provide the correct data.

What I dont like are the edgy rectangles. Is it possible to make them round? I didnt finde a method in drawContext for that.

Any design ideas from your side? I appreciate your suggetions for improvments

1

u/TheGreatDanishViking Jan 14 '21

It looks cool, I'd like to see the code.

1

u/seppelicous Jan 14 '21

Will share it soon, I still have some issues that needs to be fixed first.

1

u/Jodfie Jan 14 '21

What are you using to get the energy data? Do you have one of the newer meters you can get data from?

2

u/seppelicous Jan 14 '21

Yes, I have a smart meter, a raspberry pi with Nodered catches the data and stores it in an influx database.

1

u/abjeroen Jan 14 '21

Nice! Just curious what do W en kWh tell you compared to each other?

1

u/seppelicous Jan 14 '21 edited Jan 14 '21

The first value is the recent house power, the second value is the energy consumption from 0:00 to now

1

u/abjeroen Jan 14 '21

Nice. Would love the source. I'm on to the same thing but don't know how to do the graph. It's just text for.now

2

u/kekub Jan 14 '21

Super cool. I hope to be able to have a backend to do stuff like that too!

0

u/[deleted] Jan 14 '21

[deleted]

1

u/seppelicous Jan 14 '21

Only works as far as I see, with path method, Not with drawcontext

1

u/mvan231 script/widget helper Jan 14 '21

Path is to be used in draw context.

You can see an example here

2

u/seppelicous Jan 14 '21

Thanks, that was easy to implement. Works now :)

1

u/mvan231 script/widget helper Jan 14 '21

Excellent!!

0

u/[deleted] Jan 27 '21

[deleted]

3

u/seppelicous Jan 27 '21

I will do tomorrow, I just have to add comments, then will share the code