This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Enhanced PVoutput driver in solar panels app with additional mobile capabilities
Hi,
I have added some mobile capabilities to the Solar Panels PVoutput driver. I have included the daily peak power as well as the totals of they month and year in the mobile view (besides the 'energy' and 'power' counters that the app already included). All parameters are tracked in the Homey insights view.
I have used a different part of the PVoutput API, the possibilities are endless (http://pvoutput.org/help.html#api). It's a shame the mobile capabilities can't be dynamically configured, it would be great if you could choose which parameters you would like to have in the mobile view. Let me know what you think.
You can run/install the app from the command line if you fetch it here at the link below. I'll look into a pull reqluest so the author of the solar panels app can include the changes (if he wants to ;-)
https://github.com/abaretta/it.diederik.solar.git
Comments
PVoutputPro has nice options and graphs. The paid version has support for multiple systems, comparisons and estimates.
Do you have any ambition in further development of the PVOutput app? I'm a (paying) pvoutput user and use pvoutput to log generated and used electricity + water and gas usage. For water and gas usage I use the extra v7 - v10 parameters of pvoutput.
It would be awesome if I could get all this info in my Homey and trigger flows on these values. Maybe there is a need for a separate PVOutput app???
I don't know if there are other users who also use the advanced features of pvoutput.
You can view my data here (click "show extended data" for gas and water usage) : https://pvoutput.org/intraday.jsp?id=20778&sid=18657
At the time I did notify the creator of the solar app of the additions in the mobile interface, however he did not respond, and I didn’t create a pullrequest. I guess the way to go would be to get the parameters added to the solar app. I’ll have a look.
In my case the data is not coming right out of a box. I have some scripting running on a server to collect all the data from my solar panels (via USB -> RS485) and my Fluksometer (power + water + gas consumption) and send it to PVoutput.
On my previous HA controller (VeraEdge) I had some virtual devices and did some http requests from my scripting apps to feed the VeraEgde virtual devices with data. I guess this can be done also on Homey but I'm a starting Homey user so I still have a learning path to go.
If you want extra info on how I use PVOutput to help out, you can always PM me.
The Homey SDK does not have a good way to deal with custom/configurable capabilities unfortunately. This makes it difficult to use the extendable parameters in a sensible way in the app I am afraid.
—
Using http request app to receive data in / push data to Homey, for instance the temperature as reported by a sensor.
In Better logic, create a number variable for the temperature. Next create a flow with an HTTP trigger 'Ontvangen POST' ('Received POST' or something in english I guess).
The trigger has a JSON tag. Drag this tag to the action column in a HTTP 'JSONpath Better Logic' action.
In the trigger you need to fill in an identifier, let's call it 'python-temp'. This needs to be matched in the HTTP POST used to push data to Homey later on.
In the JSONpath Better Logic action you fill in: '$.temp' in the first field, and your BL variable in the second.
Now Homey is listening for HTTP POST directed towards <homey-IP>/api/app/com.internet/python-temp. Any JSON data posted here will be put in the BL variable, all you need to do is send some data.
From a python script you could use a system call:
As you can see I call curl with a python system call in the example above, of course you can run curl from the shell as well, in that case leave out the python data formatting. It would look something like this:
Note that you need to look up your 'bearer token' for authentication, it is part of the Homey URL when you are logged in (http://YourHomeysLocalIPAddress/?bearer_token=Deaf001000bad1000effe000hace000215c001).
Today I noticed that the values in Homey insights (from the solar panels app) are not the same as in PVoutput. Homey insiight values are a bit higher than PVoutput. Very strange
Do you also have this?