kck Posted September 7, 2017 Author Posted September 7, 2017 Yup. The change that is causing this actually looks like it went into the system late in the Jessie life (i.e., latest build of Jessie has the failure but earlier ones don't). I finally tracked it down to a change in the way some of the pins on the Pi are controlled in recent versions which essentially overrides the dim control that I am using. I have just figured out how to manually turn that off and get dimming to work again but now I need to figure out how to do it from inside the console program. I'll work that out and get a patch into the program. By the way, I'm not chasing this one only for you - if our bedroom units don't dim at night I'll lose lots of WAF points and at some point I'll update them to Stretch so I'd better have this fixed first! Kevin
kck Posted September 7, 2017 Author Posted September 7, 2017 OK - there is a new release up that should work fine to dim Stretch or late-Jessie systems. You can grab it if you want. I also added, based on your experience, a minimal config example and writeup in the useage notes that should walk a new user through what we did with less pain. It also explains the simple operations. Since you just went through this I'd appreciate it if at some point you looked at it and tell me if it a) makes sense and would have helped. Kevin P.S. Hope you're in the NE and not Florida based on looking at the Irma projections a friend in Miami sent me.
aaronball Posted September 7, 2017 Posted September 7, 2017 (edited) I'll take a look at your new config example and usages note today and let you know. I am in northern Virginia. Without any traffic I can be in DC in forty minutes. Not originally from here, just ended up here do to employment. Now semi-retired. Don't think Irma will effect us much. Maybe some residual effects later. Yeah I wouldn't want to be anywhere in FL right now. I've been through a few hurricanes and Typhoons while living in the Far East. They are to be taken seriously. I just checked the dimming on the Stretch system and it works fine, you sure fixed that quick. Thanks. Edited September 7, 2017 by aaronball
aaronball Posted September 7, 2017 Posted September 7, 2017 My console is working fine now, have it now switching in idle screen from clock to weather. Awesome. Next thing I need to add is the alert function. The garage door alert is a great idea.. I took a look at your new usernotes, yes the new notes helped explain functionality and setup procedures much better. The new simple configuration is great. A couple of things that would help is a file structure diagram and the difference in a cfg file and a txt file and where they need to reside. Oh one more thing, with any computer program syntax is very important, new user of course. I think with that a new user can setup their own console keypad. You may have everything I have suggested covered, if you did I missed it in the notes. Still a awesome program, so much more to add. I had to write a list down of all the functions so I don't forget to add them. Brilliant idea and program! Aaron
kck Posted September 8, 2017 Author Posted September 8, 2017 Thanks. I took a shot at your suggestion and added some of that info to the useage notes. Some of that info might still be useful to you so do peruse it. As you go along please feel free to suggest other things I might document and, of course, suggestions on program improvements are always welcome.
Xathros Posted September 8, 2017 Posted September 8, 2017 (edited) Well, I just ordered another Pi3 with a 7" capacitive touchscreen and case. Hoping I can make this all work on a 7" screen when my parts arrive. I enjoyed reading through this thread again today and look forward to getting this up and going on my ISY. Has anyone tried this with a 5.X ISY yet? Are there settings that allow for landscape vs portrait display? -Xathros Edited September 8, 2017 by Xathros
Teken Posted September 8, 2017 Posted September 8, 2017 Well, I just ordered another Pi3 with a 7" capacitive touchscreen and case. Hoping I can make this all work on a 7" screen when my parts arrive. I enjoyed reading through this thread again today and look forward to getting this up and going on my ISY. Has anyone tried this with a 5.X ISY yet? Are there settings that allow for landscape vs portrait display? -Xathros Nope . . . But, I echo your thoughts about how fantastic this project is! I would greatly appreciate it if you could document this journey in a new thread as I really wanted to do the same using the Pi Zero W. I believe Kevin & Aaron have really ironed out most of the bugs in the setup and called out some of the nuances of this project. I intended to do the very same but got side tracked in several other Alpha / Beta projects. Looking forward to your *How To* my friend . . . 1
kck Posted September 8, 2017 Author Posted September 8, 2017 (edited) There was someone who ran it on a 5.x version. The only issue that came up at that time was that the ISY had altered how it reported status in certain cases (as I recall it had to do with reporting UOM as well as the actual value). I fixed that easily at the time once I figured out what had changed. So I think it should work but I'm still running 4.x. I'm planning at some point to install some of this in our other home and will probably start there with a 5.x ISY and some Z-wave but no timeline on that. I haven't got a 7" screen but that certainly sounds interesting and in theory things should scale since the console get info about the screen from the underlying system. Of course we all know how well theory works with software and new hardware. Still I do think it should be close because I even managed to do a test once by cobbling up running the code in a Win10 window. As to portrait/landscape, that shouldn't really matter. The configuration of the screen is all in the OS so if you can get the screen calibrated in the OS as a landscape then the console program will just see a screen size in pixels corresponding to that arrangement. Having said that it may well be that the button layout for that sort of screen won't look as you'd like. That should be easy to improve if you let me know what you'd like. Right now the program has a set of layouts that just depend on the number of buttons. Generalizing that to allow more choices that would handle other screen arrangements would be worthwhile. So just let me know on that one. The one thing that probably will not work will be dimming. That seems very specific to the screen. If you are a Python person look at the module hw.py to see what the console currently knows about the hardware. I think handling a different hardware should be easy enough but expect it will require a change here. @Teken: after my experience with Aaron, I have tried to encapsulate all that learning in the useagenotes that come with the install and that you can grab from GitHub to look at. I figured that embedding the information there would be the best place to stick it. I created a very simple starter case that should let a user see if the console is installed and running before launching into more elaborate screens. I am hopeful that this meets the need and will continue to enhance the information there as I see more is needed. Before you start I suggest you read through the current version of the note and tell me if anything jumps out at you as missing. Edit: I just looked at the button layout topology code and changing that will be very easy. Right now it just has an (row,columns) pair for each possible number of buttons. I can just add some alternate arrangements for landscape or bigger screens. Edited September 8, 2017 by kck
Teken Posted September 8, 2017 Posted September 8, 2017 There was someone who ran it on a 5.x version. The only issue that came up at that time was that the ISY had altered how it reported status in certain cases (as I recall it had to do with reporting UOM as well as the actual value). I fixed that easily at the time once I figured out what had changed. So I think it should work but I'm still running 4.x. I'm planning at some point to install some of this in our other home and will probably start there with a 5.x ISY and some Z-wave but no timeline on that. I haven't got a 7" screen but that certainly sounds interesting and in theory things should scale since the console get info about the screen from the underlying system. Of course we all know how well theory works with software and new hardware. Still I do think it should be close because I even managed to do a test once by cobbling up running the code in a Win10 window. As to portrait/landscape, that shouldn't really matter. The configuration of the screen is all in the OS so if you can get the screen calibrated in the OS as a landscape then the console program will just see a screen size in pixels corresponding to that arrangement. Having said that it may well be that the button layout for that sort of screen won't look as you'd like. That should be easy to improve if you let me know what you'd like. Right now the program has a set of layouts that just depend on the number of buttons. Generalizing that to allow more choices that would handle other screen arrangements would be worthwhile. So just let me know on that one. The one thing that probably will not work will be dimming. That seems very specific to the screen. If you are a Python person look at the module hw.py to see what the console currently knows about the hardware. I think handling a different hardware should be easy enough but expect it will require a change here. @Teken: after my experience with Aaron, I have tried to encapsulate all that learning in the useagenotes that come with the install and that you can grab from GitHub to look at. I figured that embedding the information there would be the best place to stick it. I created a very simple starter case that should let a user see if the console is installed and running before launching into more elaborate screens. I am hopeful that this meets the need and will continue to enhance the information there as I see more is needed. Before you start I suggest you read through the current version of the note and tell me if anything jumps out at you as missing. Edit: I just looked at the button layout topology code and changing that will be very easy. Right now it just has an (row,columns) pair for each possible number of buttons. I can just add some alternate arrangements for landscape or bigger screens. Hello Kevin, As always, your generosity and investment in time to offer this project to the community can not be understated. I look forward to reading over the documents in the next few week ends! Thank You!
Xathros Posted September 8, 2017 Posted September 8, 2017 (edited) There was someone who ran it on a 5.x version. The only issue that came up at that time was that the ISY had altered how it reported status in certain cases (as I recall it had to do with reporting UOM as well as the actual value). I fixed that easily at the time once I figured out what had changed. So I think it should work but I'm still running 4.x. I'm planning at some point to install some of this in our other home and will probably start there with a 5.x ISY and some Z-wave but no timeline on that. I haven't got a 7" screen but that certainly sounds interesting and in theory things should scale since the console get info about the screen from the underlying system. Of course we all know how well theory works with software and new hardware. Still I do think it should be close because I even managed to do a test once by cobbling up running the code in a Win10 window. As to portrait/landscape, that shouldn't really matter. The configuration of the screen is all in the OS so if you can get the screen calibrated in the OS as a landscape then the console program will just see a screen size in pixels corresponding to that arrangement. Having said that it may well be that the button layout for that sort of screen won't look as you'd like. That should be easy to improve if you let me know what you'd like. Right now the program has a set of layouts that just depend on the number of buttons. Generalizing that to allow more choices that would handle other screen arrangements would be worthwhile. So just let me know on that one. The one thing that probably will not work will be dimming. That seems very specific to the screen. If you are a Python person look at the module hw.py to see what the console currently knows about the hardware. I think handling a different hardware should be easy enough but expect it will require a change here. @Teken: after my experience with Aaron, I have tried to encapsulate all that learning in the useagenotes that come with the install and that you can grab from GitHub to look at. I figured that embedding the information there would be the best place to stick it. I created a very simple starter case that should let a user see if the console is installed and running before launching into more elaborate screens. I am hopeful that this meets the need and will continue to enhance the information there as I see more is needed. Before you start I suggest you read through the current version of the note and tell me if anything jumps out at you as missing. Edit: I just looked at the button layout topology code and changing that will be very easy. Right now it just has an (row,columns) pair for each possible number of buttons. I can just add some alternate arrangements for landscape or bigger screens. Cool. I'll let you know after I get it up and running. I believe the resolution will be 800x480. Thinking either a larger number of buttons or a split screen with buttons on half and info (Clock / weather / custom status info) on the other half would be good. Dimming isn't important on this one as this will be a desk based unit. For the bedroom, I will probably go with a 3.5" screen like yours. That will be round 2. Does this depend on the Raspbian GUI or will this run on a CLI only setup? -Xathros Edited September 8, 2017 by Xathros
kck Posted September 8, 2017 Author Posted September 8, 2017 So I just added 2 optional parameters that can be specified when defining a screen: KeysPerRow and KeysPerColumn. These will override the normal layout code and should allow you to handle landscape. There may be some better long term solution but that should work at least for now. The split screen idea would be neat for a bigger screen but the currently defined screens won't do that. You could probably hack them in Python to combine a button and weather screen or something if you want to define a new screen type. That's an idea that definitely goes on my futures list in case I get myself a larger screen system. For now the easiest path would just be more and/or bigger buttons. By the way - the really quick response this week is due in part at least to the ugly forest fire raging just outside Portland which has made our air rather yucky to breathe on the golf course. Has be spending time on my other retirement hobbies.
aaronball Posted September 8, 2017 Posted September 8, 2017 That would be interesting, a landscape screen. More buttons in landscape would be nice. I have a 7" screen with a pi 3 that I use for programing DCC modules in model trains. If you get around to including the 7" screen selection I could test it for you. I was wondering if there is a way to force the word wrap for the button name. I have seen some other people's files and they show a comma in the Label name. I tried that but it didn't do anything. Also I recreated the problem with the thermostat. If I go to the ISY control screen and do a query on the thermostat the softconsole locks ups when I go to the thermostat screen. It will not display the thermostat screen again even if I re-boot the pi. I have to make a change to a thermosat setting with the ISY control screen and re-boot the softconsole before it will work agai. Hope that makes sense. I have seen the fires on the news. I would think Portland stays too wet for forest fires, but I guess you are having a dry spell. I was born in Klamath Falls, OR. But don't remember it because we moved to the east coast where my dad was from. I lived in Great Falls, MT from 79 -82. Don't remember hearing about or seeing any forest fires back then. Hope they get those fires put out and you can get back on the course soon.
kck Posted September 9, 2017 Author Posted September 9, 2017 Regarding name wrap: with a key description if you explicitly give the key a label rather than defaulting it to the name from the ISY then a comma provides line breaks. So label = Wall Plugs, will treat "Wall Plugs" as a single unbreakable label whereas label = Wall, Plugs will treat that as 2 words one per line. Since the label parameter expects a sequence of things if you leave off the trailing comma: label = Wall Plugs then is actually gets treated with each letter as a separate word and hence on a separate line. (i.e., it will sort of wind up looking "vertical" on the button - probably not what you want. Regarding the thermostat: I'd never seen anything like that happen. But since you mentioned doing an explicit query I tried that and got the failure. Looks like under some unknown conditions, the ISY sends through garbage info for the current state of the Thermostat. I've now guarded against that case but if you are looking at the screen when you do a query you may see nonsense values briefly that should then repaint correctly. Not sure why I never encountered it before. Think I asked above but by chance is your Thermostat running on battery versus being powered from the furnace? If so that might explain why you saw it earlier without the explicit query since I think the case arises while the ISY is processing a query which takes a bit longer than the state request from the console. In any case, it shouldn't crash any longer.
aaronball Posted September 9, 2017 Posted September 9, 2017 The thermostat is powered by the furnace. That fixed the thermostat issue here as well. Thanks.
aaronball Posted September 11, 2017 Posted September 11, 2017 Kevin, I received 2 new pi zero w's and 2 new tft 3.5 consoles. I set them up the same as the pi 3. When running the installconsole script it removes the Bluetooth capability and then can not install the new Bluetooth capability. So when I reboot the pi zero it does not have Bluetooth. Also the console does not show on the 3.5 screen. But by monitoring the pi 3 softconsole if I press where a button should be it activated that button. So it seems every thing is loading correctly, it's just not showing up on the screen. I setup the pi zero's with the adafruit quick setup for the 3.5 screen and they work fine. Any idea what could be going on?
kck Posted September 11, 2017 Author Posted September 11, 2017 Well I just created a system from blank SD card on a pi0w using a Waveshare 3.5 screen (trying out a Chinese cheap screen). I see the Bluetooth situation. Interestingly it seems to work fine on my Pi3 after the install. Must be something in the system configuration script that I get from the guy in Australia (which is needed for other reasons for the touchscreens). I have left a message in his forums for him and he is normally pretty prompt at responding modulo timezones. So I'll see what he says and figure out if there is a solution. I hadn't noticed this because I don't use BT for anything. Don't know what the console not showing is. It almost sounds like it that the backlight isn't on which could be something related to the dimming issue that I fixed on the Pi3. Try this: open a vnc session to the pi while it is running the console. Then cd /sys/class/backlight/soc:backlight and then sudo echo 1 > brightness and then sudo echo 0 > brightness. Let me know if either echoing a 1 or 0 to brightness turns on the screen. If a 1 turns on the screen then it would appear that for some reason the dim value is being set to 0 within console on the pi0. Echoing 0 should disable the full power backlight override and use whatever the pi0 PWM is doing which might be the issue. I can't quite try this here easily because I don't have an Adafruit screen handy and the Waveshare screen doesn't dim (or at least I haven't researched if it does yet).
kck Posted September 19, 2017 Author Posted September 19, 2017 I just pushed a new release (2.3) that fixes the Bluetooth issue by removing the Kali Pi kernel stuff that had been required to work around Raspbian system problems for some of the screens. It also further simplifies installs in that it asks all the questions it needs up front and then will run unattended including rebooting as needed. If you specify a minimal test configuration it will configure everything and ultimately reboot into the test configuration. It has been pretty well tested on a Pi3/35r configuration and on a Pi0W/Waveshare3.5 configuration which represent representative extremes. One note regarding the (cheap) Waveshare screen is that it does not dim (not supported in its hardware) so while it is available for only $20 which with a $10 Pi0W makes for a quite inexpensive console, I wouldn't suggest using it in your bedroom unless you sleep well with a rather bright screen on all night. Makes a good living room console though.
aaronball Posted September 21, 2017 Posted September 21, 2017 Well I just created a system from blank SD card on a pi0w using a Waveshare 3.5 screen (trying out a Chinese cheap screen). I see the Bluetooth situation. Interestingly it seems to work fine on my Pi3 after the install. Must be something in the system configuration script that I get from the guy in Australia (which is needed for other reasons for the touchscreens). I have left a message in his forums for him and he is normally pretty prompt at responding modulo timezones. So I'll see what he says and figure out if there is a solution. I hadn't noticed this because I don't use BT for anything. Don't know what the console not showing is. It almost sounds like it that the backlight isn't on which could be something related to the dimming issue that I fixed on the Pi3. Try this: open a vnc session to the pi while it is running the console. Then cd /sys/class/backlight/soc:backlight and then sudo echo 1 > brightness and then sudo echo 0 > brightness. Let me know if either echoing a 1 or 0 to brightness turns on the screen. If a 1 turns on the screen then it would appear that for some reason the dim value is being set to 0 within console on the pi0. Echoing 0 should disable the full power backlight override and use whatever the pi0 PWM is doing which might be the issue. I can't quite try this here easily because I don't have an Adafruit screen handy and the Waveshare screen doesn't dim (or at least I haven't researched if it does yet). Kevin, Haven't had time to try this until today. I am having issues getting into the Pi Zero. Keep getting access denied message. Once I figure how to get logged in to the Pi I'll give it a try. Thanks!
aaronball Posted September 24, 2017 Posted September 24, 2017 Kevin, Quick update. Using your recent update I now have 1 pi3 and 2 pi Zeros up and running. Each is working fine now for 4 days. Thanks for all your help and time. I have printed out the outlet insert and have ordered the micro switch and the voltage regulator and will soon be putting all that togather for some wall consoles. I'll keep you posted on how that goes. Aaron
kck Posted September 25, 2017 Author Posted September 25, 2017 Glad to hear it. If it's any consolation for your somewhat bumpy journey, I think the install script and related stuff is much easier for others than when you started thanks to our joint learnings about where the potholes were. Let me know if you have any suggestions for other improvements to the console or it's install etc. Kevin
kck Posted December 15, 2017 Author Posted December 15, 2017 I just pushed a new release (2.4) that provides cleaner and more flexible options for on/off keys and runprogram keys to allow secondary verification and blinking response feedback. The verification screen came as a result of noticing that some keys map to difficult/annoying to reverse results (typically running a program that does a bunch of things) so this reduces the chance of accidentally executing such a key if desired. I also wanted a quick and simple way to pull data from my WeatherUnderground feeds to an ISY variable - a poor man's weather update. So there is now an alert procedure that defines such an operation that can be executed periodically. The documentation has been updated to reflect these changes and continue to improve clarity. 2
ScottAvery Posted December 20, 2017 Posted December 20, 2017 That would be interesting, a landscape screen. More buttons in landscape would be nice. I have a 7" screen with a pi 3 that I use for programing DCC modules in model trains. If you get around to including the 7" screen selection I could test it for you. I was wondering if there is a way to force the word wrap for the button name. I have seen some other people's files and they show a comma in the Label name. I tried that but it didn't do anything. Not a train enthusiast but I have considered building a decorative train as a permanent installation and was wondering if you have control of your system through your ISY?
gaetanlord Posted December 27, 2017 Posted December 27, 2017 Hi Looking for advise on what I could do wrong. Trying to using softconsole on my PI3 with official 7 inches display. I install softconsole by only running the setupconsole script. That didn't create the config.txt file, so I simply copy the minimaltest.txt file to config.txt I fill the data in cfglib/auth.cfg. Trying to run the console.py by hand. If I do not have a config.txt it report the file not present If I copy the config.txt, syste, start and then crash. I'm suspecting an issue when getting the data from my ISY. it seem to report an error with a device (Veranda), but I do not see anything wrong on my ISY log. veranda is a regular 2477S. I attach my log file if that could help Thank for any advise on what I do wrong Regards Console.txt
kck Posted December 27, 2017 Author Posted December 27, 2017 You ran into a corner case bug in my code - 1 line fix. I have pushed a 2.41 with the fix, or if you want to just keep testing for the moment just add an empty Alerts section to your config file by adding a single line [Alerts] at the top level (if you're using the minimaltest config right after the mainchain definition line). Sorry about that. I'm not sure why you weren't asked in the setup scripts whether you wanted to create the minimal test config which would have set it up without you manually copying/editing the minimaltest.txt file but it sounds like you got that ok. That error message about Veranda is something else at your end. The console queried the ISY for the state of that node and the ISY returned the code "ERR" which I believe means that it doesn't know the state and can't talk to the node. Whatever that is would seem to be at your end. You might try using a different switch for your initial test. One other thing. I have never run the console myself on the 7" screen and don't have one. I think it should run since it tries to self configure to the screen parameters. I'll be interested in knowing how that goes so even if it works great do let me know. If you bump into any other issues let me know. Kevin
gaetanlord Posted December 28, 2017 Posted December 28, 2017 Thank Kevin for the quick reply We are progresssing, but not 100% there Instead of changing the config.txt, I simply edit the console.py and apply your last commit changes and it does work fine, I do see the minimal console Now, I'm facing an input device issue. I could run the software, but when I touch the screen I get the following message selected device is not a touchscreen I understand Also, simple question. I plan to use softconsole with some other tool I display on the screen. The softconsole is grabbing the control of the screen, which is fine until we want to exit. I do kill the process, but the X server of the screen do not come back. That screen is not fullly dedicated to the softconsole, is there a way to give back the control to the display manager. May I suggest to have an exit button. Just a couple more issues in your plate I'm in vacation for the next 2 weeks, so I have time to work on this and help you fixing the software for the 7 inches display. Regards
Recommended Posts