done
Help needed !
I want to create a Device for my solar panels to show up in Energy tab. I read here Energy | Homey Apps SDK about the capabilities but need some help to create such.
Solar panels
Solar panels are a common device in Homey that can generate their own power. These devices must have the solarpanel device class.
The measure_power value should positive when generating power. When providing a negative value, e.g. -13 watt, Homey assumes the solar panel is currently consuming instead of generating power.
In order for cumulative energy generation (kWh) to be tracked in Energy the driver must have a meter_power capability that will be set to the total generated energy in kWh as a positive value. Use the meterPowerExportedCapability energy property to configure a different meter_power capability for generated energy.
/drivers/<driver_id>/driver.compose.json
Copy
{
"name": { "en": "My Driver" },
"images": {
"small": "/drivers/my_driver/assets/images/small.png",
"large": "/drivers/my_driver/assets/images/large.png"
},
"class": "solarpanel",
"capabilities": ["measure_power", "meter_power"],
"energy": {
"meterPowerExportedCapability": "meter_power" // Optional: defaults to meter_power
}
}
How about:
Use device class “Wall plug” and use the “What’s plugged in” option to set it to Solar Panel.
Then use the Power and Energy capabilities for the AVD:
Please check the section Advanced Virtual Device in my tutorial, how to create an Solar Panel AVD: [Tutorial][Pro] How to integrate Hoymiles Microinverters via OpenDTU and MQTT
@DirkG , @Peter_Kawa and @Magnus_P and everyone else.
I have just updated the Test Version Device Capabilities Test .
- Added all classes and capabilities (ShowAs) dynamicly (in your own language).
- Updated: Homey-api to 3.11.3.
- Cumulative is now a base device property and no longer a capability property.
- Added (the effect of the) option for cumulative for meter_gas, meter_water and meter_power.
- Added cumulativeImportedCapability and cumulativeExportedCapability for meter_power.
Meaning, there is a lott more possibilities now!
Calsses and capabilities are generated on your Homey, based on the homey-lib npm package.
So when new classes or capabilities become available, adding them will be easy.
The classes and capabilities that are available are only created when the App version changes, the Homey version changes, or when the language changes.
Have fun people!
N.b. please note, under lists, there now is f.i. Color available. Use this in combination with Number light_temperature, light_saturation and light_hue.
N.b. there is still some new Energy stuff to implement (like for a car or battery). I’ll try to add that a.s.a.p.
Very cool Arie, thank you!
I was still on v2.14.9, while v2.15.4 crashed continuously on both my Pro 2019’s.
Do or die: I’ve installed v2.16.0 on my 2nd Homey, and it now runs for a few hours without issues. Fingers crossed ![]()
A future request: is it possible to sort the capability and list dropdowns alphabetically? Starting below the “main” entries maybe?
Thx Arie!
I created a Smart Meter already with Power, Import and Export capabilities. The Import and Export capabilities are currently not yet displayed in the energy dashboard. But as far as I know, it may take a day for the data to be displayed.
I will update you.
Well, they actually are sorted (after a few custom ones), but they are first sorted on display type (like Media, Slider, Button, etc) and then alphabetically (based on localized name).
Yeah, i also had that. Also, some energy dashboard functions only show if you enable the Create Real Capability, while the new export and import should not have that enabled (you can only check Create real fields once for a specifiek ShowAs (yeah, i still need to make that clear by disabling the checkbox CreateRealField of thats already checked for another same capability)).
Oww now I see it ![]()
![]()
![]()
Hahaha
Yeah well, since there are a lott of options now, grouping them seemed more handy.
But lets see if user have good suggestions ![]()
Hi Ari,
First thanks for your hard work.
I’m trying to add a home battery to the Energytab. Would that be possible with the update?
Been trying for an hour without success.
My device has no meterPowerImportedCapability or Expoted.
Can you help me there?
Greeting
Frank
Yeah, this will be the next items i add. I didnt have time to finish those today.
So, while with the update you can select battery as device class, the meterpowerimported en exported functions are not yet available.
But, they are coming real soon ![]()
Thanks you then I’ll wait for the update.
No it’s a good idea I think. I just didn’t discover the categories system on my own haha.
For the mobile app, I’d like to vote for a filter bar, with this pile of capabilities
. But I guess that’s on Athom’s end?
Mash up example:
Yeah i know, its a lott right ![]()
Im actually thinking about a setting to only display the “old” capabilities for new users.
I think when a completly new user starts his first AVD, the ShowAs lists are a bit impressive or steep learning curve ![]()
Or perhaps a short manual of explanations on the capabilities. The homey-lib generated capabilitirs have descriptions etc.
But yeah, a filter would also be handy ![]()
And just fyi: the last and also current testversion, have “deprecated” the special Status Indicator Field, since a text-field can be used as Status Indicator.
At least, that was possible, but im not sure it currently works in web to show a text status?
Because some fields (sensors) are readonly, meaning a USER cannot set it through an action in the homey app (and thus also not through the homey-api setCapabilityValue).
If you would use another type of field (a non sensor type), you would be able to set the value through the setCapabilityValue.








