RA* - Disable Sleep/Screensaver?

Basic / Standard Reef Angel hardware
Post Reply
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

RA* - Disable Sleep/Screensaver?

Post by Piper »

Is there a way to disable the "screen saver" or sleep mode on the RA*? I'm having a problem with relays randomly getting stuck on/off. I'll wake up in the wee hours of the morning to find that my actinics never turned off and my heater stuck on or off. The graph on my temp probe looks more like an EKG :) When I touch the screen on the head unit to get it out of sleep mode, the relays start working again.

I put the head unit on a programmable wifi smart plug that is power cycling the head unit every few hours and that's helping. I'd like to try disabling the sleep mode and see if that actually solves my problem though.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

there is a timer for the lcd. it uses a memory location to adjust it. I forget what the default is for it. I know you can change the value, so you can look into it. not sure how much it will help though.
if you look through the code, here's the variable/memory location for it: Mem_I_LCDTimer
or if you use one of the apps, you can change it there.

Sent from my Pixel 2 using Tapatalk
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: RA* - Disable Sleep/Screensaver?

Post by Piper »

Thanks, Curt! I have a couple more things I want to try first but if they don't pan out for me I'll dig back into this one.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA* - Disable Sleep/Screensaver?

Post by rimai »

I opened up a new issue.
There was another report of the same problem.
https://github.com/reefangel/Libraries/issues/255
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

I've noticed something like this as well. I added comments to the github issue.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

Just to add to this, I have noticed the modules not responding as well.
the outlets either do not toggle or the salinity and water expansion module stops responding.
I did notice tonight that it happened when the screen timed out on the outlet / relay screen, i had connection / business issues.
I had to touch the screen to get it to come back working properly. I then went to the "main" screen (default on with the temps, ph, etc) and left it. the screen has timed out / turned off and everything is appearing to be working ok (at least my salinity and water level modules are displaying but I don't know for sure about the relay toggling and will have to check in a few days when I get back to my tank).

with that being said, try to leave the controller on the main screen when it times out / blanks and see if that fixes the problem. maybe there's something going on with the logic of the timeout and the other screens that are not the main one.

Sent from my Pixel 2 using Tapatalk
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA* - Disable Sleep/Screensaver?

Post by rimai »

I placed a patch on the webwizard and pushed to github.
I am hoping that this will fix the issue.
My theory is that the touch screen is somehow monopolizing the bus and not letting the bus be used by other slave devices.
I implemented a 5 second timeout.
To ensure that the patch is working correctly, when you touch the screen and hold your finger there, you will notice that the clock on the screen will stop. After 5 seconds, it should start counting again.
Let me know if this works for you.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

I just updated the code on my Star and here's my findings.

If I press and hold the touchscreen for more than a second or so, the clock stops like you described BUT I notice that my salinity and water modules stop working. I can touch it again and nothing changes. I press and hold the touchscreen for more than a second and release, the modules show their values and then stop. The modules won't work normally again until I change the screen. If I enter the menu and exit the menu, they show their values for a second and then stop.
So, when they stop, the only way to get them working again is to tap on the arrows to change the screen and then back to the main screen.

I also just tested that if I tap the screen (just a little tap like you would tap a button), sometimes tapping causes the modules to stop and sometimes not. If they stop, if I keep tapping slowly, they will start working again.

So it appears that the functionality is maybe partly fixed.
I have not tested what happens when the screen times out. Will be watching that later today and possibly reverting back to the previous code if this acts up.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

And as a side note, the uapp appears to not be working. I don't know if it's related to the code update or not (the changes should have no affect on the data being sent out). It shows me connected but no data is being updated. I tried from multiple computers and devices that have previously connected and worked with the portal.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

binder wrote:And as a side note, the uapp appears to not be working. I don't know if it's related to the code update or not (the changes should have no affect on the data being sent out). It shows me connected but no data is being updated. I tried from multiple computers and devices that have previously connected and worked with the portal.
It's working now. Not sure what was the problem but I was having some issues with it responding to wifi commands. Had to restart the controller manually because the touch screen was non responsive.

Sent from my Pixel 2 using Tapatalk
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA* - Disable Sleep/Screensaver?

Post by rimai »

I found the bug.
It was a return call I had missed and it only happens at a very specific time. So, it was a matter of chance.
It was returning without enabling the I2C bus again.
Can you give it another try?
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

rimai wrote:I found the bug.
It was a return call I had missed and it only happens at a very specific time. So, it was a matter of chance.
It was returning without enabling the I2C bus again.
Can you give it another try?
I most certainly will but it will be on Tuesday when I get back to work (where tank is located)

Sent from my Pixel 2 using Tapatalk
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

I don't see the changes/commits in github.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA* - Disable Sleep/Screensaver?

Post by rimai »

Sorry. I just pushed it
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

rimai wrote:Sorry. I just pushed it
Awesome. So far it appears to be working normally. the only thing that is going on extra is that 5 second delay that you added in (don't think that is actually necessary anymore so it could and probably should be removed).
just the couple quick things that i have done that would have previously caused the "lock up" (or dropping of the modules), has not.
it's probably safe to say this is now resolved....unless there's some sort of "rare case".
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: RA* - Disable Sleep/Screensaver?

Post by Piper »

This sounds promising! I will update my code and upload tonight and see if that helps. I sure hope this does the trick!
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

Piper wrote:This sounds promising! I will update my code and upload tonight and see if that helps. I sure hope this does the trick!
I have been running it since I posted and it's been doing great. No issues that I have noticed.
Please post your results.

Sent from my Pixel 2 using Tapatalk
Piper
Posts: 296
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: RA* - Disable Sleep/Screensaver?

Post by Piper »

I updated/loaded my code Thursday night. I’m now able to use my expansion hug again and most of my expansions that I had to previously ditched because of the bus locks. The one exception is my dimming expansion. It continuously locks the bus on me. I have enough dimming ports on the head unit so it’s not a big deal for me at this time.

Prior to the update my controller would just lock up and stop responding. Now it actually reports the bus lock on the head unit and in the app and also beeps so I know there is a problem. I’ll call this a big improvement for sure. I was seriously looking into alternatives prior to this update. I’m glad I held out :)
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: RA* - Disable Sleep/Screensaver?

Post by binder »

awesome!

as for the dimming expansion, it could be the module or the port on the expansion hub. Roberto can help you with the troubleshooting.

Sent from my Pixel 2 using Tapatalk
Post Reply