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.

[APP] Better logic / Variable management

145791025

Comments

  • A reboot actually brought them back. It's seems like the in memory variables are lost somewhere during up time of Homey.
  • Guessed that already. I think instead of memory I'll revert back to reading them always from Disk. Minor changes... Though maybe a bit bad for performance. I'm unsure if it will be noticeable. 
  • Think I found the problem. For some reason the variable manager gets unloaded, but never reloaded with initialization. Init is setting everything in memory. This means that when they get unloaded and also there is a trigger the variables are overwritten with the unloaded data aka, no data. Then you loose the variables. 

    I'm sorry for people who have to create all there variables again. I pushed an update that now forcefully always read data from disk so this should never happen. If you want you can get it from git.
  • If I install this, do I have to recreate my variables as well? If so, I'll wait for the nice weather to be over first :)
  • If your variables are not gone they will be there after the update. 
  • Running 0.9.3 with all variables intact still. Thanks!
  • Let me know if you encounter any problems. 
  • Good stuff Uranday, thanx for all the effort you put into this ... :+1: 
  • Yup, thanks ever so much - my Homey is pretty much useless without your app.
  • PhuturistPhuturist Member
    edited April 2016
    This morning I noticed some flows didn't trigger again. I checked and the variable list was empty again. I installed the 0.9.3 from GitHub yesterday but did not reboot afterwards. Is a reboot required to avoid the missing variables you think?

    I have rebooted now and the variables are back. I'll let you know if it happens again or the reboot solved it.
  • Don't think it will matter. Guess there is a bigger problem. I'll try to get into contact with @emile / @Athom ;
  • My variables are still all there. I'm very curious what changed in 0.8.27 that causes so many issues - something about how flows trigger?
  • UrandayUranday Member
    edited April 2016
    New patch is published. Let me know what happens!
  • edited April 2016
    What changed? :)

    Edit: Git doesn't show anything new, which patch are you talking about?
  • Everyting is now read from storage instead of stored in memory.

  • Oh you published it to the store, I thought you had a 0.9.4 somewhere. Never mind :)
  • Indien het gebeurd dat er geen variabelen beschikbaar zijn graag even via de settings pagina een log sturen naar athom. Deze kunnen ze dan gebruiken om het probleem te pin pointen. Laat ook even hier weten zodat ik @Emile een berichtje kan sturen. 
  • aloftaloft Member
    Uranday said:
    Everyting is now read from storage instead of stored in memory.

    Is there any impact on performance and/or storage-life-expectancy due to this change?
  • aloft said:
    Uranday said:
    Everyting is now read from storage instead of stored in memory.

    Is there any impact on performance and/or storage-life-expectancy due to this change?
    No, Homey keeps the vars also in memory. I discussed this with Emile.
  • Uranday said:
    Indien het gebeurd dat er geen variabelen beschikbaar zijn graag even via de settings pagina een log sturen naar athom. Deze kunnen ze dan gebruiken om het probleem te pin pointen. Laat ook even hier weten zodat ik @Emile een berichtje kan sturen. 
    Just happened again. The 0.9.3 GitHub version is installed, I assume it's the same as the app store version that was published today. Log send: 1B80157D5E
  • edited April 2016
    Crap - same here. I think it happened when I was trying to turn on some lights (flip a boolean). This caused the turn-lights-on-flow to run twice with 1 press (sigh), so I pressed the IR button a couple of times, until it stopped responding altogether. That was maybe two hours ago.

    Log sent: 47489013A2

    Edit: latest version from Github installed.
  • UrandayUranday Member
    edited April 2016
    When this happens can you also post a chrome screenshot  (with f12) of the settings page. Emile says this could provide more info. I wish I could do it, but I have not many flows and devices yet,  so I didn't see it happen. 
  • Too late, I rebooted - to be sure, does he mean the Stuff for Geeks page? 
  • No, if you have the issue again and no variables appear in settings. Open the settings page, press f12, reload the page and see if there are any errors. This is the chrome debug window. 
  • Ah okay, you mean the settings page of Better Logic. Gotcha.
  • I just experienced a really strange thing. I have a flow that turns off a KAKU switch at 22:30 based on a BetterLogic bitflip device. This worked well as it was supposed to. But I wanted to know if this perhaps caused the loss of the variables so I navigated to the BetterLogic settings page and upon loading the boolean variable for switching this KAKU socket changed to true (which in turn triggered a flow to switch a KAKU socket on). Weird stuff. A screenshot of the console is below although I dont think it's of much use.


  • Phuturist said:
    I just experienced a really strange thing. I have a flow that turns off a KAKU switch at 22:30 based on a BetterLogic bitflip device. This worked well as it was supposed to. But I wanted to know if this perhaps caused the loss of the variables so I navigated to the BetterLogic settings page and upon loading the boolean variable for switching this KAKU socket changed to true (which in turn triggered a flow to switch a KAKU socket on). Weird stuff. A screenshot of the console is below although I dont think it's of much use.


    This could be an other bug.. Unsure what could caused this. Maybe a double trigger? 
  • PhuturistPhuturist Member
    edited April 2016
    Uranday said:
    Phuturist said:
    I just experienced a really strange thing. I have a flow that turns off a KAKU switch at 22:30 based on a BetterLogic bitflip device. This worked well as it was supposed to. But I wanted to know if this perhaps caused the loss of the variables so I navigated to the BetterLogic settings page and upon loading the boolean variable for switching this KAKU socket changed to true (which in turn triggered a flow to switch a KAKU socket on). Weird stuff. A screenshot of the console is below although I dont think it's of much use.


    This could be an other bug.. Unsure what could caused this. Maybe a double trigger? 
    I might know what is going on and its my mistake. I have a flow that calculates 1 hour before sunset using the mathjs library. Another flow is checking every 5 minutes if the current time is greater then this variable but I forget to clear the variable afterwards so the condition is true every 5 minutes after the time is greater then the variable. Coincedence I just happen the view the settings page just at the exact moment that the 5 minutes passed. I came to this conclusion as the variable set time was exactly 22:35:00.
  • This just happened again. Initially the console did not show anything but I noticed a pending GET request in the network tab of the Chrome developer tools. Eventually this request probably timed out and showed as an error in the console.

    These are the headers of the request (I edited the bearer token for obvious reasons).
    Request URL:http://192.168.0.120/api/manager/settings/app/net.i-dev.betterlogic/variables?_=1459886716224Request HeadersProvisional headers are shownAuthorization:Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxContent-Type:application/json; charset=utf-8Referer:http://192.168.0.120/manager/settings/User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36Query String Parametersview sourceview URL encoded_:1459886716224
    @Uranday or @Emile, is this something you can work with (my Homey depends on the app).
  • EmileEmile Administrator, Athom
    @Phuturist does this always happen? Can you maybe invite me to access your Homey?
Sign In or Register to comment.