Jump to content

Soft Keypadlinc-like Console from Raspberry Pi


kck

Recommended Posts

For anyone interested in using a RPi as a console of some sort with my or other software, I designed/fabricated a case for my bedside use that you might be interested in.  I have 2 of my soft consoles in use on either side of our bed, each configured differently per the desires of me versus my wife.  I couldn't find a case that would work well with the PiTFT display I was using so I designed one along with a stand for it.  Pictures can be seen at  https://drive.google.com/a/coral-zone.com/folderview?id=0B0VzcK-K28WaQVdheE1vcDdreXM&usp=sharing.  I fabricated it on my 3d printer (Flashforge Creator Pro) in black ABS and it came out well enough that my wife is happy (main criterion :-) ).  Anyone who wants to use and/or modify it is free to do so.  I uploaded both the design files (in case a modification is desired) as well as the STL files.  The design is done in 123D Design (free software from Autodesk).  In case you aren't aware, there is a very large network of folks that will do 3d prints for others at 3dhubs.com that is very easy to use (and even will give you a cost estimate before you contact anyone about the job) so if you don't have your own printer and you want to try out 3d printing that is a good way to go.  The files are up on GitHub.com/kevinkahn alongside the softconsole code.

 

P.S. I have another effort to try to do a version with the smaller display and a Pi Zero that could go into a single gang electrical box.  I think I can make it work but it is still in progress.  That would produce a very flexible controller for the ISY and other info for the cost of a Pi Zero ($5), a small touchscreen display ($35), and a power supply (~$5).  I think there would even be room in the box for an Insteon Micro Switch/Dimmer which would mean it would effectively be a replacement for things like a keypadlink for not much more money.  I'll report back when/if it works out.

Link to comment

I posted about the Pi3 earlier this year when I reused a bit of code and got it working as a proximity detector with my Fitbit. The plan is for my ISY to know where I am in the house when I am wearing my fitbit. Adding a Keypadlinc feature would make it that much more functional. I also want to nest in a wall but I am a little concerned about it not being to code. I would hate to rip things out and patch if I decide to sell.

 

That being said I want to make it happen in at least one location. I have seen a POE adapter for the RPi but it is a little bulky. They make wide and deep gang boxes though so you might could shoehorn it in and since POE is considered low voltage it could be to code. It would also hurt the bottom line cost of the unit. I still think it would be worth it since you could add some additional features that are outside of the realm of Insteon (calendar notifications, security video when the doorbell rings, etc.)

I would love to see how you are mounting it if you have any pictures. I haven't gotten into the 3D printing so I am a little lost on how to make it look good.

Link to comment

Don't have a picture at the moment but I'll try to get one of the prototype next week.  What I am doing it designing a bracket that supports the display and PiZero and a small 120-5V power supply and possibly has a slot to position a micro Insteon.  It certainly wouldn't pass code but what I am doing is making sure that the 5v parts are separated by plastic walls from the 120v parts with just small holes for the necessary wires to pass through.  The display is to big to actually recess into a single gang box but would mount on the surface of the box.  Positioning the screw holes to hold things together is tricky and a work in progress.  It would require a custom faceplate which is slightly larger than a standard size one (more like a midsize commercial plate) and has it's mounting screws in a different place to work with the display dimensions.  The plate may also wind up being slightly thicker (like about 2mm so not really noticeable) than a standard plate.  I think I can make this all work but proof is in actually building one which is my work in progress.  More info next week I hope.

Link to comment

Have you thought about making improving the look of the buttons. I know you want them to be scale-able, but maybe for the specific screen you could whip up some buttons to mimic the look of the KPL. I could even make them for you in Illustrator if you don't mess with the graphic design stuff. Just let me know what pixel size the zero screen needs.

Link to comment

So I found some time to take a few pictures of what I am doing which should give you an idea of what might work.  Pictures are here: https://drive.google.com/folderview?id=0B0VzcK-K28WaYm1VMU5XVWNaSms&usp=sharing.  If you look at image 5141 you can see the display and just barely the edge of the Pi Zero hanging below it.  The black vertical box on the left is the power supply - takes in line voltage and provides 5V.  Its inn a separate compartment so it should be the only place where line voltage and 5V are together.  The white box at the bottom is an Insteon Micro Dimmer.  You can see how the entire assembly fits into a single gang box.  You can't tell but it leaves about an inch for wire connections below the assembly.  The assembly has a screw hole aligned for the standard switch mount position in the box.  At the moment I can only screw it down on one end.  If that isn't enough I can add a friction bracket at the other end to provide more stability - that awaits an actual test.  There are 2 screw holes for mounting a faceplate that are at diagonal corners (only place to put them.  I have a design for a custom faceplate that will work with these.  I hope this gives you a decent picture of what might be done.  I think this version of the assembly bracket is very close to final.  Next step is to finish a faceplate and then try the entire thing in a real box.  I hope to get to that next week as I am away for the weekend.  Comments or other ideas always welcome!

 

Kevin

 

P.S.  The current drawn buttons are pretty arbitrary.  It shouldn't be too hard to improve them (I make no claim to being an artist :-) ).  What sort of things did you have in mind?

Link to comment

Ok that housing is awesome! You must have some serious CAD training. I am going to order the adafruit screen tonight and start trying to figure out how I am going to make this work. I wish I could add something to your design but you are light years ahead of me on that front.

 

I still think the I am going to go Power of Ethernet since I have a switch and Cat 5 close and easy to run. It looks like it will double the thickness, but cut down on the power supply. What is your plan with the Micro Switch? I never turn my Pi off. With the 3 I just keep VNC running so I can remote in as needed.

 

I will work something up on Illustrator and share it with you when I get to my work computer. I think making it mimic the KPL with some features we all wish the KPL had, would be really cool. I use my KPL as a status monitor so I can see at a glance what lights are on where. I think you could even make clicking a button expand in to give you more information on that scene, control, whatever.  I will mock something up tomorrow and share it.

 

Glad you are working on this project. I always thought these Pi's had potential in a home automation setting.

Link to comment

Actually you can pretty much get what you seem to want by just setting the outline offset to 0 and the key color and background color both to white.  Might have to play with the "off" coloration to get it closer but it is not too far off even now.  A couple of items regarding this to think about though.  First off, I use the colors for the bedside units because with glasses off and in the dark it is MUCH easier to see which key to press.  Without the color you actually need to read the label which for aging eyes can get tough when just awakened.  :-)  Second, for the bedroom units you definitely do not want the default situation to be a bright screen of any sort - that throws far too much light.  I actually set my timeout screen to black background (it's a clock with weather) and even then dim the backlight.  Now for use in a wall unit in some other room this might be less of an issue although I suspect you still won't want the idle situation to be like you picture - it will glare too much.  Finally, it is useful to be able to put some other screen up with some info of interest when the pad otherwise idle even in the wall case - if all you ever plan to put up is the keypad you'll be better off just using a real keypad.  So bottom line - I think the current code can get very close to your pictures if that is what you want (and could be adjusted slightly if needed to get the rest of the way there) but I don't think once you actually start using such a unit that will turn out to be what you really want.

 

By the way  - no CAD training for me - the tools are really easy to learn and mostly it becomes something of a puzzle to figure out what you want a gadget to look like.  Still hoping to get to put a full wall unit together sometime later this week.

Link to comment

Yeah I was thinking about the brightness issue and how it might all work better on an OLED screen. I was just trying to give it a "Insteon" look and feel. Certainly don't do anything on my behalf, I am just glad to be putting these Pi's to good use.

I like your ideas and definitely don't want a uni-task device, but as you probably know the more familiar it is for my wife, the more likely she is to use it. So I was thinking standard Insteon interface that can then contextualize where the Keypadlinc is just one button press and done. I.E. My Keypadlinc buttons glow when any light in the scene is on so I can see what's on and turn everything off with a click. A program could allow a long press to bring up the status of each device in the scene to allow more control.

Also, I was thinking about your offset of the Pi from the gang box and you should be able to make that all disappear by recessing in the dry wall a bit. Are you planning on printing a face plate too?

I should have the screen by this weekend so I can give you some feedback about the rest of the program, if you want any.

 

 

Sent from my iPad using Tapatalk

Link to comment

Hey kck,

I got the screen and installed your program (very impressive install package by the way) and just started messing around with it. I noticed that you use https (to protect the plain text user:pass in the config.txt I assume). I am getting a cert warning here because I haven't updated my self signed cert yet. but I then run into an error. I had two disabled devices in the ISY that I think caused the following error. Once I deleted them the error cleared.

 

 

Traceback (most recent call last):
  File "console.py", line 83, in <module>
    config.ISY = isy.ISY(config.ISYrequestsession)
  File "/home/pi/consolestable/isy.py", line 220, in __init__
    n = Node(node['@flag'], node['name'], node['address'], int(node['parent']['@type']),
KeyError: 'parent'

 

I think they kick back the error because they don't have a parent listed like all the other nodes. Just FYI.

 

I am working through a few more issues, but I will try and solve them before I hit you back up.

Link to comment

Looks like you are running an old version - my bad because I thought I had made the fixes for what I think this was a real release but it looks like I didn't.

There were 2 issues that got fixed at that point.  One had to do with zwave devices that don't have properties (I don't have any zwave stuff so didn't know these existed) and the other was for devices at the top level of the ISY tree.  To the latter, all my devices are in folders so I hadn't bumped into the bug.  In any case, the version that I had released earlier today as 1.22 should have fixes for these both.  There have been a bunch of other bug fixes along the way so I'd suggest that you pull release 1.22 and use that.  That release should also make it easy to pull future beta or real release code from the maintenance screen.  

 

By the way the https warning were driving me crazy.  I have not been able to figure out how to get the cert stuff right at both the ISY and console ends.  So the release 1.22 also just uses http.  This only is meant to run on an internal house network so the security shouldn't be too big a deal.  I had only switched to https because I was away from the house for 6 weeks and wanted to be able to still debug things through my firewall and I couldn't do that on port 80.  So you shouldn't see the warnings any longer though someday it would be nice to sort out Python, ISY, and certificates.

 

You are correct that the key names in the sections being the device/scene name from the ISY.  The label field lets you override how the key on the console displays the device/scene name if the one in the ISY isn't what you want.

 

Thanks for the feedback - sorry about the bug (especially since they were fixed when someone else reported them months back - ugh).  I'll try to respond on anything else you happen upon.  It is always tough to find issues that don't occur in the way one uses the code oneself so I don't doubt that you'll trip over other stuff I have missed.

Link to comment

Thanks for the quick response kck!

 

There is probably no way to come up with every eventuality of a program you didn't create. I commend you on your efforts.

 

I am having a pretty hard time with the config file and getting it to load. I keep ending up with a Daemon died error, but the Pi screen turns off too fast for me to see what the error is. I am trying to keep it real simple, but I must not be reading the usage notes correctly. Let me know if you have some time to debug it with me.

Link to comment

That daemon died is an old print statement for debug that happens if a signal occurs for the spawned daemon and it isn't alive.  It may be misleading in that the main process could be having the error and the daemon death is just part of the crash of the main program.  When things start you should see a blue screen with a bunch of log messages starting with the program id and copyright and listing stuff as the program sets up.  All that should also be in the current Console.log file in the Console directory.  The program keeps the last few under serial names.  If you can tell me how far that log gets that might help.  I suspect that the program is simply not robustly handling an error in the config.txt file and blowing up rather than politely saying something useful.  That is one are of the program that I know is fragile since as I built things I wasn't generally making errors in the config file but those are exactly the kinds of errors that a new user would have.  Can you send me your config.txt file?  I can try to see how it is getting parsed and, I hope, id the issue.

 

Kevin

(I'm on Pacific Time if we need to coordinate anything deeper - I would like to diagnose this so I can make the program more robust.)

Link to comment
  • 2 weeks later...

It was just pointed out to me that the link in the first post of this thread dates from when I was using bitbucket. The code now lives on github.com/kevinkahn/softconsole

Link to comment

If you look in the docs directory at github the usage notes document has most of that.  Also, the prepsystem script is designed to take a raw RPi and install everything but if you look through it you can see all the steps etc.  If you have questions after that I can try to answer them (and use the questions to update the docs).

 

Kevin

Link to comment
  • 2 weeks later...

Hello Kevin,

 

As always greatly appreciate your on going efforts and development with this fantastic project. I am hoping to get into this project at some point but life has been trying.

 

Perhaps, I may have to weigh out the time vs reward ratio and just send you money for a complete unit!

 

Ha . . .

Link to comment

Yikes! I'm doing this for fun!  Don't turn me into a production house!  :mrgreen:​  I want to stay retired!

 

Seriously - willing to help as necessary short of that. Thanks for the kudos. 

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...