G W Posted July 1, 2016 Posted July 1, 2016 This is a great project and I am going to look I to building several. The only issue I have is with the case. Best regards, Gary Funk
kck Posted July 1, 2016 Author Posted July 1, 2016 Gary, Do you not like the case (you can probably find other designs by now - there weren't any I could find when I started doing this) or do you mean issue with getting one built? If the latter one thing to look at is 3dhubs.com. They are sort of an Uber for 3D printing and are how I got started. You upload a design file to their site and they will immediately provide quotes from folks in your area who will print it given a material choice. If you like one of the quotes they forward the info to that maker and if he/she accepts then 3dhubs handles escrowing payment until you get the part. I had a few things done that way - always just picking up the item although many makers will ship if needed. My experience was pretty good - of 4 guys I had print something 3 were great and one (an overly cheap option) wasn't. The last guy I dealt with I have remained in contact with and exchanged advice about printing after I got a printer of my own. Kevin (If you were near Portland I'd print one for you. The case prints in ABS in a few hours and a few bucks worth of material.) 1
G W Posted July 1, 2016 Posted July 1, 2016 (edited) Kevin, I like the case but obtaining them in a quality is going to be a problem. I'd be willing to order parts in quantity if I was assured the case could be produced in quantity. Would you be willing to assist me in putting together everything necessary? I'm willing to order in large quantities, package the parts and ship it out. Best regards, Gary Funk Edited July 1, 2016 by GaryFunk
kck Posted August 12, 2016 Author Posted August 12, 2016 For anyone who is using or dabbling with softconsole, I just updated it to a new release 1.3. Release notes: Adds include capability to config files. Cleans up/improves the reboot/restart scripts that are used to support the maintenance screen. Adds multiple idle screens that cycle. Improves some weather formatting and allows long weather descriptive phrases from weather underground to be shortened to display more nicely. Moves to use the hardware PWM for screen dimming which eliminates the periodic flicker when the screen is dim. Other random bug fixes.
mattavila Posted August 15, 2016 Posted August 15, 2016 Kevin, THis one really caught my attention so I gathered the remaining parts I needed over the weekend. I'm NOT a coder, but can follow along to a limited extent. What I keep getting is similar to what was posted earlier; pi@localhost ~/consolestable $ sudo python -u console.py CSignal: 17 Screensize: 320 480 CSignal: 17 /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:732: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html (This warning will only appear once by default.) InsecureRequestWarning) 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 206, in __init__ configdict = xmltodict.parse(r.text)['nodes'] File "/usr/local/lib/python2.7/dist-packages/xmltodict.py", line 311, in parse parser.Parse(xml_input, True) xml.parsers.expat.ExpatError: no element found: line 1, column 0 Any idea what this may be? Ive grabbed the release as of today, reinstalled and this keeps popping up. the config file has been slimmed WAY back, hopefully enough to get started with rudimentary communication (pasted below). I tried with YOUR config example and same results. Putting in IP of my ISY obviously helped - also had my ISY on different ports, so I changed them to defaults of 80 & 443 (seemed to eliminate more errors) pi@localhost ~/consolestable $ cat config.txt ISYaddr = "10.10.1.124" ISYuser = admin ISYpassword = password HomeScreenName = BR HomeScreenTO = 90 DimLevel = 5 DimTO =25 DimHomeScreenCoverName = MyClock MainChain = "Office", Local, "Main", MyClock .... (few trivial (i think) things afterwards Appreciate any assistance Matt
kck Posted August 15, 2016 Author Posted August 15, 2016 Matt, Quick answer is that it looks like your username or password are incorrect. I'll improve the checking to issue an actual human intelligible message new release . Longer answer. Looks like the output you attached came from an earlier release since the code line numbers aren't those of the current one but that isn't a problem. There are actually 2 different messages you are seeing. The first is the warning about SSL - I haven't been able to figure out how to get the SSL stuff to work and since this runs within a house behind a router firewall I've just left things without the https improvement. That warning is annoying and I think I've suppressed it in recent versions. The real error message is the one starting at the "Traceback". The program queried the ISY for the nodes and instead of getting an xml response it got an empty message. Since I don't check or list a status code in the current version I can't be positive but the most likely case is that the status response was 401 which is an authorization error - i.e., name or password wrong. If you are sure they are correct in you config.txt file I'll generate a beta version on GitHub that you can pull and run ("currentbeta" tag) that will exit with a clear message and status code and we can see why the ISY isn't returning good information. Basically I just take what the ISY returns and had it to a library xml parser and that parser is what is complaining that it got bad xml. Let me know if this sorts it out or if we need to look further. Kevin
mattavila Posted August 15, 2016 Posted August 15, 2016 After reading some of your earlier responses I kind of figured there may be a version issue - and continued to poke around your documentation. Im running the "wget https://raw.githubusercontent.com/kevinkahn/softconsole/master/docs/consoleprep.sh" command and executing the script from there. I DID happen to see the install script appears to be calling for v1.1.tar.gz - what I cant figure out is where to point it for current release of code (not sure what the directory structure is for your releases. That may be some of the issue? Ill jump into it later this evening... wife want to go out for dinner so Im offline for awhile - Thanks for the assist Matt
kck Posted August 15, 2016 Author Posted August 15, 2016 Good catch on the consoleprep script - definitely a bug since it should grab the current release. I'll fix that. To get the current release at any time use: wget https://github.com/kevinkahn/softconsole/archive/currentrelease.tar.gz To get the current beta use: wget https://github.com/kevinkahn/softconsole/archive/currentbeta.tar.gz Actually, once the console is installed there are commands on the Maintenance screen to do either of these fetches for you and to specify whether you want to use the beta or release. (If you select beta but things fail in a subsequent start of console it will revert to the release.) So to your issue: if you would grab the beta and make it run, then if it wasn't that you had an error in your user name or password you should get some error exit with some additional information that may help track down the issue. Kevin 1
mattavila Posted August 17, 2016 Posted August 17, 2016 Kevin Appreciate your willingness to dig deeper. I did change my password as it contained special characters, also for "good measure" did a full reinstall on the Raspberry Pi from your script. So I found a "rookie" mistake I was making... the config file! While I did have stuff in there that WAS valid (being my ISY address & password), I had the file NAMED..... (can you guess..... "exampleconfig.txt" - DOH). At this point I have it working, albeit just your example. Im re-working that now and re-thinking MY naming convention on the ISY as well. Going to play the next couple evenings and help a couple new users out that just got their ISY's today.Next purchase is a book on python - then again I do have a subscription to Safari online through my company... now only to save them as PFD's Thanks again for the assist - appreciated Matt
kck Posted August 17, 2016 Author Posted August 17, 2016 Glad you got it working - I hate being the cause of frustration for other folks. Just so I understand (and can perhaps improve the error messaging) were you running the console with no "config.txt" file so that the program was trying to open a non-existent file? I would have expected that to produce a different (albeit not friendly) behavior. Or did you have a config.txt file but it didn't actually have the correct user/passwd in it (i.e., you had edited the wrong file). If you had wound up with a config.txt file that had the right ISY IP address but bad user/passwd that would explain things exactly. By the way - you actually can use a different config file name by passing the name in on the console command line. Happy to be of any help - let me know if you need any other info/assistance. One of the downsides of mostly using code yourself is that you don't see a lot of these kinds of error behaviors because you aren't generally creating bad input files. So getting reports of issues like this helps find those for the next guy - so thanks. Kevin
mattavila Posted August 17, 2016 Posted August 17, 2016 Kevin - I believe that I was running without a confi.txt file previously, then again as I re-installed its difficult to verify. One note that I haven't re-tried... my ISY password used to contain a special character - a comma. Ive actually found a couple of instances where that has been problematic (one being my trading account password) so I decided to change it while I was re-imaging the raspberry pi.... short answer is Im not 100% sure as I made two changes simultaneously. I did verify the password issue however - you cannot have a comma in your ISY password with THIS project, it behaves badly! Appreciate the tip on using multiple configuration files from the CLI. I was just able to show this to my wife and her response was "WOW.... that's fantastic!" We can actually see this without our glasses and that's huge for the "over 50 crowd" In other words I just got a shopping pass to buy some more raspberry pi kit and work with your code a bit more. My only real issue is I still have a day job. At any rate, now its time to dig in, read your documentation, read more on python... then start having a bit of fun. Appreciate the opportunity to learn, create , and contribute. Cheers! Matt
kck Posted August 17, 2016 Author Posted August 17, 2016 There are definitely advantages to being retired - I can attest to that! Glad it will help you with the "boys and their toys" effort. I think I am up to 2 Pi3s, 2 Pi2s, and 2 PiZeros at this point and I keep toying with getting one more just to have one purely for development. I've been working "hardening" the software load on 2 of them so that I can reliably maintain a VPN that will merge my home network with a home network in a winter house we recently bought. I have watchdog code now that reacts to network or other outages by rebooting itself and if that isn't enough rebooting my router and/or my cable modem. See - so many fun projects you can do when you don't have one of those pesky day jobs. So by all means, should you need other assistance or have enhancement ideas drop me a not either in the forum or via private message. Kevin
kck Posted September 30, 2016 Author Posted September 30, 2016 FYI - I just pushed a new general release (v1.4) that picks up a bunch of bugs and cleanups including the issue from a while back were the ISY was providing bad results when queried repeatedly for status (this ISY issue should be now fixed in UDI's code in any case). The main change in 1.4 is that Adafruit's PiTFTs don't install drivers correctly using Adafruit's own scripts if you are using a release of Raspbian newer than March. This is significant for folks with RPi3s because releases from March don't support the included RPi Bluetooth so using Adafruit's versions you can have either touch screen or BT but not both. Luckily there is another user on the net (in Australia it appears) who has install procedures that do work with the latest Raspbian releases so there is now a new install script consoleprep2.sh that will basically take a clean install of current Raspbian and get you to a functioning console that will start automatically on boot with minimal user intervention. Basically you have to provide a few passwords and an intial config script to get up and running. I've tested this script with the current September Raspbian release on a Pi3 and while installing everything takes a while it seems to get the job done with little user effort. 1
kck Posted December 15, 2016 Author Posted December 15, 2016 For anyone using or thinking of using my softconsole system there is a major new release now up (2.0). This release is a major restructuring of the system's architecture that permits me to now do things like alert screens and procedures. Something I had wanted to have for a long while and that was also requested by others was an ability to grab the screen with a very visible (from a distance) image if some condition arose (e.g., water sensor went off or garage door left open etc.) This is now possible. The system allows you to define an alert condition based a state change of a node or a variable, or periodically. It allow the condition to be delayed some period after the change (e.g., so I can alert if the garage door is open for 10 minutes but ignore normal open/closes). Alert conditions can either cause a screen to appear on the console with an (optionally) flashing message and an (optional) key that is expected to clear the alert condition. Alerts can also be deferred for a predefined period of time if so configured so that you can choose to ignore the condition but still have it reappear if not dealt with. Multiple alert screens defer to one another cyclically. If the condition clears via other means the screen returns to normal in response to the corrected condition. An alert can alternately cause a python procedure to execute quietly. I am currently using this at my house to check periodically for new releases on my "production" units and download/install any new release (I got tired of trying to remember if I had loaded the most recent code on the units). An alert procedure is just a python class/procedure so easy to construct if you have a new one. This release is also much more robust against network failures and things like badly formed answers from weather underground about weather. My experience is that this version pretty much stays up with few exceptions and restarts itself if it does encounter odd errors. The overall structure of the code is a lot more straightforward as well for anyone who might want to play with the source as it is now essentially a single control loop that reacts to a variety of events and dispatches screens, procedures, etc. based on time/events/variables and the like. For you info I typically have 4 units running in my house and my experience with them has been pretty good. As always, if anyone wants to play with this stuff or has bugs, requests, or whatever feel free to pass along. I'd been wanting to work on this version for quite a while but it took the return of Oregon fall rainy weather to justify being indoors enough to get it done. Feedback always appreciated. 2
Michel Kohanim Posted December 15, 2016 Posted December 15, 2016 Hi kck, This is wonderful! Any intentions of making this into a commercialized product? With kind regards, Michel
kck Posted December 16, 2016 Author Posted December 16, 2016 Michel, Thanks. I do this as a hobby since I'm happily retired after a lifetime in high tech, so no plans to commercialize. I think it would be pretty easy to do if someone wanted to and I'd be supportive of that and happy to assist but I'm not up for being the driver of the effort since I've got a lot of retirement pursuits elsewhere. But since it is a hobby I'm also happy to try to add things that folks might want to it and it is open sourced on GitHub so doesn't really depend on me for ultimate support. Also, I haven't looked closely at your v5 stuff and node servers yet (running v4 at my house) but I think that using the node server structure might allow better communication with the ISY for scene information which right now I have to monitor via a proxy device. So at some point I'll probably try to see if my guess is true - just not wanting to make the house depend on v5 quite yet. (May try getting a v5 unit at some point for our winter place and try a small scale experiment there.) Kevin
Michel Kohanim Posted December 18, 2016 Posted December 18, 2016 Hi Kevin, Thanks so very much for the update and contributions. I sure hope someone will pickup your code and commercialize it (we would do it had we had resources). With kind regards, Michel
EVictory Posted January 2, 2017 Posted January 2, 2017 Kevin, I am attempting to install the Soft-Console onto a Raspberry Pi 2 B+ with a 3.5in PiTFT. I have created a config.txt file, a cfglib directory and several .cfg files based on your examples. When I try to start the console, the little screen turns blue, it loads all of my configuration files. At the end of this, it looks like it is attempting to login to the ISY and I believe that is where it is failing. The little display shows the http://192.168.x.x/rest/ URL right before it fails. I can use a browser on my PC to query the ISY using rest commands with no issue. If I change either the ISY username or password to a known bad value, the Soft-Console fails differently as it displays a red page indicating an incorrect username or password. I am using the auth.cfg file to hold the ISY logon information. ISYaddr = "192.168.x.x" ISYuser = "myuser" ISYpassword = "mypassword" I have tried the above lines with and without the double-quotes. My ISY password has an asterisk (*) within the password. Thinking it was the culprit, I temporarily removed the * from the password but had same results. My ISY does NOT have the self-signed cert installed as its behind NAT and I do not need it. Attached are the log.txt and console.log files. They were zipped using 7zip. Do you have any ideas as to what is wrong? PS: Looks like a great program. Thanks for all your hard work! Mr Emile Victory Logs.zip
EVictory Posted January 2, 2017 Posted January 2, 2017 Forgot to mention, I am using version 2.0 that I just downloaded over last few days. Thanks
kck Posted January 2, 2017 Author Posted January 2, 2017 Sorry for the problem. You are reading the ISY fine. The problem seems to be when I am building the internal graph of ISY nodes by parsing what the ISY sends me (i.e., certainly a bug of some sort). I am traveling at the moment and won't be able to take a detailed look until Wednesday but some starting stuff. It fails while processing some scene that has a node with address FF 0C 07 2. What kind of device is that (I'm guessing it may be a KPL given the subnode 2). Is there anything special about any scene it is a part of? Also, which ISY firmware series are you running v4 or v5? Also, do you have any zwave devices? The last 2 questions are because I run v4 and no zwave right now and I have seen some previous issues where I just didn't know about a quirk of some sort related to those that made my code wrong. Just for your context where it is blowing up is in trying to add nodes to the member list of a scene. For some reason it looks like it isn't finding the node it wants to add (which from a code perspective shouldn't happen so it is definitely some sort of but). So anything you can tell me about the device and scenes it is a part of may help diagnose. Kevin
EVictory Posted January 2, 2017 Posted January 2, 2017 Kevin, I have an ISY 994i/IR PRO running firmware v4.5.4. I have the Networking Module, the X10 Module, and the Z-wave module. I do not have any Z-wave devices as of yet. Yesterday I also saw the FF 0C 07 2 posted in the log.txt log file as well. Yesterday I searched through my entire ISY setup and could not find an Insteon device with that address in use anywhere. However, after reading your post I went back looking again and found the offending device. With the X10 Module, you can create A10/X10 devices that can then be used within programs. ISY will track the status of the X10 device as best it can. You cannot add X10 devices to scenes though. The offending device is an X10 device called 'L7- TV Scene'. Apparently, the ISY assigns these A10/X10 devices an Insteon type address because as you can see this device has the address FF 0C 07 2. (Looks like the FF is on all X10 devices, the 0C equates to the house code L, and the 07 equates to the device code 7.) Please see the attached image showing what the X10 type device looks like in the ISY admin console. I cannot assess the Raspberry Pi now as I am at work and the Pi is at home and powered off. I am pretty sure I have not tried to map to the name 'L7- TV Scene' device in my cfg files. This ISY X10 device object is left over from the past. When I first moved to ISY, I had a lot of X10 devices, which is why I purchased the X10 module. However, today the only X10 devices I have are 8-button RF remotes, 2-3 RF motion sensors, and a whole-house X10 RF transciever. This particular device was added as an alias, meaning I do not actually have an X10 appliance or switch device using code L7. I have a program that listens for a change in the 'L7- TV Scene' device and then executes a program to turn on TV, dim lights, etc. I used the X10 alias device in the ISY program instead of testing for X10 signals directly in programs for convenience. I am phasing out the X10 devices. Could it be that your program is encountering the X10 device and does not know how to deal with it? If there is anything you need me to provide, just let me know. -Emile
kck Posted January 2, 2017 Author Posted January 2, 2017 I'm sure that's it. I suspect what is happening is that the node ISY creates for that X10 device has no properties and so I don't know what to do with it and don't add it to the list of nodes I create. Then later in processing some scene I find that address as a member of the scene but then can't find it in the node list. I think there is a background scene that ISY creates that has all the nodes in it - don't remember right now and not at home to check. So it may be that is the scene. Otherwise it is appearing in some scene of yours. If it is the latter and you don't use it any more then getting it out of the scene or just deleting the node should avoid the problem. If it is a node that you use and want to keep then I'll have to figure out in more detail what is going on so that I can avoid tripping on it when I encounter it. Kevin
EVictory Posted January 3, 2017 Posted January 3, 2017 Kevin, With your help, I have managed to get the Soft-Console functioning. The issue was with the X10 'L7- TV Scene' device as you suspected. Although I have the word 'Scene' in the name of this device, it is NOT a member of any ISY scene. X10/A10 devices created with the X10 Module cannot be added to ISY scenes. The first thing I did was open a browser and run a .../rest/nodes page. Please see the attached 'Before Changes.png' snapshot. The X10 device (FF 0C 07 2) had a node flag="0" value. I have 30 X10 devices added to my system. The majority of them are used as aliases for X10 8-button RF keypads. All of the other X10 devices have a flag="128" value. Also, this was the only X10 device that had a node number in the address of 2 as all others had a node 1. As I mentioned earlier, I have had the X10 Module since I purchased the ISY many years ago. This particular device has probably been part of my configuration for many years and has been carried forward through many ISY firmware upgrades. I suspect that somewhere along the way, it became corrupt. What I did to fix it was delete this X10 device then recreate it. Once I recreated it, the device showed up differently in the node list. Please see the attached 'After Changes.png' image. After re-creating the X10 device, it now has a flag="128" like all of the other X10 devices. The Soft-Console now runs. ISSUE #2: I am having an unrelated issue. I am having trouble adding a thermostat. I have two ISY (2441TH) thermostats in my system named Downstairs-AC and Upstairs-AC. I have attached the two cfg files I have configured for them. When I attempt to add either thermostat into Soft-Console, the button does show up in the console. However, if I tap the thermostat button, the Soft-Console briefly displays a screen showing two buttons and then crashes. QUESTION: I have an unrelated question. My Console.log file is showing a line (in red here) as follows: 01-02-17 20:02:34 Sev: 3 ---MAN-Weather 01-02-17 20:02:34 Sev: 4 Not on a screen list (unavailable) What does this mean? The Soft-Console appears to run anyway. From what I can see so far, Soft-Console is great!. I may build one of the wall-mounted versions in the future. Thank you for your help and for sharing this application. -Emile Thermostats.zip
kck Posted January 3, 2017 Author Posted January 3, 2017 Quick answer on the last question: that's just a header for a log section that lists screens that aren't on one of the screen lists - I should suppress that line if there aren't any actual items that will show below it. I'll take a look at the Tstat issue when I get home later this afternoon. Just so that I understand: when you say you tap the Tstat button I assume you mean the navigation button at the bottom of the previous screen that should take you to the thermostat screen? It then crashes attempting to display the thermostat? (By the way the thermostat screen should look more or less like the display on the actual thermostat with red/blue temp up down arrows and mode and fan control buttons.) Do you happen to have the log.txt file and Console.log from when it crashes. That would probably point pretty clearly at what is happening. Interesting on the X10 stuff. As I said I haven't got any of those or that module so running blind there. I could probably at least try to catch any anomalies from that and try to be more graceful. Do let me know if there is functionality there that I can support that you need and maybe I can figure something more out for you. Kevin
EVictory Posted January 4, 2017 Posted January 4, 2017 You are correct regarding the thermostats. When on the screen before the thermostat screen, the right navigation button shows the label of the next screen. I am pressing the navigation button for the thermostat. The console quickly tries to start display something but quickly crashes, All I can catch is that its a relatively dark screen with two lighter buttons laid out in the center of the screen. Could very well be the thermostat display. Thinking this was related to the Section name I gave the screen being able to link to the thermostat name in the ISY, I tried experimenting with the names. In my ISY the thermostats were named Downstairs AC and Upstairs AC. Therefore I named the thermostat sections [Downstairs AC] and [upstairs AC] respectively. Thinking that the space character was messing up the linking, I renamed the thermostat to Downstairs-AC and even DownstairsAC in both ISY and SoftConsole Section names. None of this made any difference. I am at work and the raspberry pi is setup on my bench at home. It is unplugged at the moment so I will have to get this for you later tonight. -Emile
Recommended Posts