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.

Daily push message for solar production, which flow?

hi guys, does someone know how to make a flow that sends a push message every day after sunset what my daily solar generation is (with the solar app created by Diederik / https://apps.athom.com./app/it.diederik.solar?query=solar)?

I came up with something like the 2 following flows that should work combined. But they don't unfortunately. :(
Any help is appreciated!





1.jpg 85.1K
2.jpg 90.5K
«1

Comments

  • Just a matter of finding where it fails.

    Flow 1:
    Did you try and have Homey tell you the level of 'Energie is veranderd'?

    Flow 2:
    Does push notification work if you test?
    If you remove 'Het is na zonsondergang' does it work?
  • bvdbosbvdbos Member
    edited September 2016
    If in the second flow you add the label "Waarde" it should work. Now it reads "Energie" which isn't possible in this flow (the label doesn't exist in this flow)... But even then I think it will trigger uncountable times as the period "after sunset" is very long... You should do this i.e. with a time-condition or set a boolean to true if the message is sent and reset it at 0:00 every day.
  • @RobinVanKekem:
    Did you try and have Homey tell you the level of 'Energie is veranderd'?
    No, I haven't. How and where should I do this? Do I need a second flow for it? And if so: how do I configure this?
    Does push notification work if you test?
    It already did and still does send the message to my phone, but it's all empty apart from a string (phrase like "Je dagopbrengst is:"). So it doesn't contain any integer / value.

    @BasvandenBosch:
    Okay, I have added 'waarde' to the 2nd flow. See below my current flows:





  • isnt the problem the combo? the IF and AND at the same time?

    Try: IF its after sundown THEN send the push noti containing variable?
  • Jon said:
    @RobinVanKekem:
    Did you try and have Homey tell you the level of 'Energie is veranderd'?
    No, I haven't. How and where should I do this? Do I need a second flow for it? And if so: how do I configure this?
    There is a card named 'Spraak' in which you can do the same thing as your doing now in your second flow 'Stuur een pushbericht'

    Does push notification work if you test?
    It already did and still does send the message to my phone, but it's all empty apart from a string (phrase like "Je dagopbrengst is:"). So it doesn't contain any integer / value.
    That's how it's supposed to work when testing so you can safely assume that's working fine.
  • Jon said:
    @BasvandenBosch:
    Okay, I have added 'waarde' to the 2nd flow. See below my current flows:

    Did you drag the black label to the 'Stuur een pushbericht' card? Then you should be fine.
  • Trustme2 said:
    isnt the problem the combo? the IF and AND at the same time?

    Try: IF its after sundown THEN send the push noti containing variable?
    This won't work, at least not in 1 flow. Homey needs to know what the variable is, so first you need to 'set' the variable.
  • Jon said:
    @RobinVanKekem:
    Did you try and have Homey tell you the level of 'Energie is veranderd'?
    No, I haven't. How and where should I do this? Do I need a second flow for it? And if so: how do I configure this?
    There is a card named 'Spraak' in which you can do the same thing as your doing now in your second flow 'Stuur een pushbericht'
    Okay but how will this help me? If the push message does not contain the value properly, how can we expect that a speech output will then work?
    Does push notification work if you test?
    It already did and still does send the message to my phone, but it's all empty apart from a string (phrase like "Je dagopbrengst is:"). So it doesn't contain any integer / value.

    That's how it's supposed to work when testing so you can safely assume that's working fine.

    Hmm, it apparently is not (yet)... :neutral: 
  • Jon said:
    @BasvandenBosch:
    Okay, I have added 'waarde' to the 2nd flow. See below my current flows:

    Did you drag the black label to the 'Stuur een pushbericht' card? Then you should be fine.
    Yup, like you can see in my screenshot, the black 'waarde' label is already in the push message card.
  • Jon said:
    Okay but how will this help me? If the push message does not contain the value properly, how can we expect that a speech output will then work?
    Don't use the test button, wait for 'energie' to change.
  • JonJon Member
    edited September 2016
    Jon said:
    Okay but how will this help me? If the push message does not contain the value properly, how can we expect that a speech output will then work?
    Don't use the test button, wait for 'energie' to change.

    Energy changes all the time. See below screenshot. But still the flow does not do anything :(

  • This  works for me:




    Yes this works. But the OP wants to have a AND condition. the problem is: If the value of the IF does not change during the time of the AND condition, the THEN will not fire. 

    There needs to be a card added to Better variables: Like a card that says [VALUE] is higher/lower than X. This way he can set it to "IF the VALUE of energie is higher than 0 AND the sun goes under THEN send a message". 
  • The card is not "Sun goes under" but "Sun is under". @work right now so cannot make an example but will do so tonight.
  • The card is not "Sun goes under" but "Sun is under". @work right now so cannot make an example but will do so tonight.
    Curious!!
  • The card is not "Sun goes under" but "Sun is under". @work right now so cannot make an example but will do so tonight.
    It's basically the same thing. Both "Sun goes under" and "Sun is under" is a pre defined time that changes every day. So for example it's the exact same if you use use the time  19:40 today (if you live in Groningen, like i do).

    What the flow of the OP says is: IF the variable "energy" is changed AT 19:40(sundown) THEN send a message [variable "energy"].

    But I think the problem is that when the variable "energy" doesnt change today at exactly 19:40 the flow will not work because the flow hasnt met the requirements of both IF and AND.

    Only  the AND (time) works.
  • bvdbosbvdbos Member
    edited September 2016
    You're correct about sunset (only looked now). The OP wants to know the amount of Energy produced at the end of the day. Don't know what the solar-app reports but I guess it's total energy produced per day? Then the "when the sun sets" can go into the "when", no need to have an extra trigger for energy changed if you work with normal variables: You can use {{$energ}} to get a normal variable in a text as the variable energ constantly has the correct value in it...



    "it's after sunset" definitely means the whole period after the sun sets. So in the above card the one-time trigger is "the sun sets" but in the and-column the card is "it's after sunset" meaning in the evening...

  • +1 nice! Did not know it worked like this. 
  • @BasVanDenBosch where did you get the {{$energ}} from? Is it something that the solar panel app provides for everyone who installed it? Or should I create this variable somewhere else, if so: where? 
  • bvdbosbvdbos Member
    edited September 2016
    @Jon: See above:


  • Trustme2 said:
    +1 nice! Did not know it worked like this. 
    Watch out  :) don't do it like this, was just an example to show the difference. You should use one of the cards but not both (that will never trigger).
  • Jon said:
    @BasVanDenBosch where did you get the {{$energ}} from? Is it something that the solar panel app provides for everyone who installed it? Or should I create this variable somewhere else, if so: where? 
    you should use {{$Energie}}
  • No, my variable is called "energ" in this example as I already have another variable "energie" in use :)
  • No, my variable is called "energ" in this example as I already have another variable "energie" in use :)
    I ment for Jon  ;)
  • Hi @Jon ;
    I have a couple of similar flows. Power is probably  a little different for every installation but look at what I see: 

    Today the power changed the last time around 19u45  it droped to 0.
    Mon Sep 19 2016 19:15:01 GMT+0200 (CEST),33
    Mon Sep 19 2016 19:30:01 GMT+0200 (CEST),7
    Mon Sep 19 2016 19:45:01 GMT+0200 (CEST),0

    after that Power isn't changed, but sunset was around 19u46? 
    So if this is the same at your site, your second flow isn't triggered anymore after the condition [Het is na zonsondergang] is true.

    Would it be triggered (and executed) you should have  received an empty Push msg as. you used the wrong label. 


    So I use the following in my homey: have to re-test after some BL-Variable problems. 
    Homey Variables:
    - Power 
    Better Logic Variables:
    - PowerSunPowerMeterDailyHigh = Number
    - PowerSunPowerMeterDailyHighS = String
    - PowerSunPowerNow = Number


    Flow 1: PowerNow
    When: The Power Changed
    And: -
    Then: Set a variable PowerNow = <Power] + BL-Set a Variable PowerSunPowerNow= <Power]

    Flow 2: PowerSunNow
    When: The Power Changed
    And: The Time is Later than 17u00 AND  - Logic: <Power] is less then 30
    Then: Send a push Msg notificatiion "Power is <Power] " + Enable a Flow [PowerSunPowerMeterDaily] 

    Flow 3: PowerSunPowerMeterDaily
    When: The Power Meter Changed
    And: -
    Then:  Send a push Msg notificatiion "Power Meter <Wh]  kWh"
    + Disable a Flow [PowerSunPowerMeterDaily]
    + BL-Set string variable PowerSunPowerMeterDailyHighS = <Wh]
    + BL-Execute mathjs expression (<Wh]) => PowerSunPowerMeterDailyHigh

    Flow 4 Bonus: 
    When: BL-A Variable changed PowerSunPowerMeterDailyHigh
    And: BL- Math.js expression is False: $PowerSunPowerMeterDailyHigh$ > $PowerSunPowerMeterAllTimeHigh$
    Then: BL-Execute mathjs expression ($PowerSunPowerMeterDailyHigh$) => PowerSunPowerMeterAllTimeHigh
    + Send a push notification : SunPowerMeterAllTimeHigh = <value] kWh

    I have to re-test the last one, by re-setting PowerSunPowerMeterAllTimeHigh 

    My syntax: A label from a trigger card in the description is  <label]

  • @BasVanDenBosch okay, so if I understand you well enough, the following combination should work for me?





  • bvdbosbvdbos Member
    edited September 2016
    The "it's after sundown" card in the and-column should be omitted. The sun can't go down if it's already down so this will never trigger. "De zon ondergaat" is enough as a trigger.... And what's the label in the pushmessage? Is it there on purpose?
  • hi @BasVanDenBosch in one of your previous posts, there's your flow with also 'it's after sunset' in the AND column ?!? So I am confused why you advise me to wipe it out...
    And the label + tekst in the push message is: {{$stroom}} and the TIJD label so I know which time the measurement was done.
  • I understand, adding the time should work...
    Like I posted monday:
    Watch out  don't do it like this, was just an example to show the difference. You should use one of the cards but not both (that will never trigger).
  • I understand, adding the time should work...
    Like I posted monday:
    Watch out  don't do it like this, was just an example to show the difference. You should use one of the cards but not both (that will never trigger).

    Okay, will leave that card out and let's see what it will do this evening!! B)
Sign In or Register to comment.