Jump to content

Soft Keypadlinc-like Console from Raspberry Pi


kck

Recommended Posts

Posted (edited)

kck

I think I created a switch config for the soft console. But now the question is how I get it in the pi and where is it put. After this I should be all set to create more. The first time is always hardest.

I can put it on a thumb drive but maybe easier way. Thanks for your expertise.

Thanks Gary

Edited by garybixler
Posted

I get permission denied.

 

PS C:\Users\garyb> SCP config.txt pi@192.168.20.5:~\Console\
pi@192.168.20.5's password:
scp: /home/pi/Console//config.txt: Permission denied

Posted

SSH into the rpi.
cd Console
ls -la
There will be 2 columns of data after all the drx- data either pi pi or root root.

If it's root root the sudo chown -r pi pi *.*

That will change ownership to the pi user.


Sent from my iPhone using Tapatalk

Posted

I am seeing this

total 1160
drwxr-xr-x  9 pi   pi     4096 Jul  1 20:24 .
drwxr-xr-x 24 pi   pi     4096 Jul  1 20:24 ..
drwxr-xr-x  3 root root   4096 Jul  1 11:07 cfglib
-rw-r--r--  1 root root   4389 Jul  1 11:07 config-rpi-dev7.txt
-rw-r--r--  1 root root   3419 Jul  1 11:07 config-rpi-dev.txt
-rw-r--r--  1 root root    628 Jul  1 11:07 config-rpi-garage.txt
-rw-r--r--  1 root root   1556 Jul  1 11:07 config-rpi-kck.txt
-rw-r--r--  1 root root   1158 Jul  1 11:07 config-rpi-lr.txt
-rw-r--r--  1 root root    952 Jul  1 11:07 config-rpi-lrwall.txt
-rw-r--r--  1 root root    529 Jul  1 11:07 config-rpi-pgaslk.txt
-rw-r--r--  1 root root    746 Jul  1 11:07 config-rpi-pgaw1.txt
-rw-r--r--  1 root root    613 Jul  1 11:07 config-rpi-slk.txt
-rw-r--r--  1 root root    272 Jul  1 12:55 config.txt
-rw-r--r--  1 root root    272 Jul  1 14:17 config.txt.save
-r-xr-xr-x  1 root root   4816 Jul  1 21:34 Console.log
-r-xr-xr-x  1 root root   6616 Jul  1 20:23 Console.log.1
-r-xr-xr-x  1 root root   5091 Jul  1 18:36 Console.log.2
-r-xr-xr-x  1 root root   4398 Jul  1 18:29 Console.log.3
-r-xr-xr-x  1 root root   3567 Jul  1 12:58 Console.log.4
-r-xr-xr-x  1 root root   3518 Jul  1 12:43 Console.log.5
drwxr-xr-x  2 root root   4096 Jul  1 20:24 .HistoryBuffer
drwxr-xr-x  2 root root   4096 Jul  1 18:37 .HistoryBuffer.1
drwxr-xr-x  2 root root   4096 Jul  1 18:33 .HistoryBuffer.2
drwxr-xr-x  2 root root   4096 Jul  1 18:26 .HistoryBuffer.3
drwxr-xr-x  2 root root   4096 Jul  1 12:58 .HistoryBuffer.4
drwxr-xr-x  2 root root   4096 Jul  1 12:41 .HistoryBuffer.5
-rw-r--r--  1 root root   1666 Jul  1 20:23 hlog
-rw-r--r--  1 root root 731964 Jul  1 22:00 isystream.dmp
-rw-r--r--  1 root root 196810 Jul  1 20:24 struct.dmp
-rw-rw-r--  1 root root   1288 May  7 12:29 termshortenlist
-rw-r--r--  1 root root   3355 Jul  1 11:07 Xconfig.txt
-rw-r--r--  1 root root 108243 Jul  1 20:24 xml.dmp
pi@PiConsole:~/Console $ sudo chown -r pi pi *.*
chown: invalid option -- 'r'
 

 

Posted

Gary,

If you plan to do most editing on the Windows side and then move stuff to the Pi let me suggest you download/install WinSCP ( https://winscp.net/eng/index.php ).  This gives you a very simple graphical interface to copying file across machines.  It will remember your login info and then you can just open it and have 2 panes one into your PC and one into the remote machine and do drag/drop between them.  You might also get Notepad++ ( https://notepad-plus-plus.org/ ) wich is a nice text editor for Windows and you can right click along the bottom and change the line termination from Window/Unix.  So this way you can safely edit your Linux files on Windows and never worry the termination question again.  While both have tons of features you can happily ignore most of them and they provide simple editing and transfer in a "Windows" style.

Kevin

Posted

If you do get WinSCP I have one "advanced" suggestion:

When you first use it you will do a New Site to enter the host name you want to work with (it can remember any number of hosts so you can use it to get to any of a bunch of systems easily).

After you enter the host name and user name and password, hit the advanced button and you'll see a list of option groups down the left side.  Pick SFTP and now on the right side you'll see protocol options.  Next to SFTP server it will say Default.  Replace that with "sudo su -c /usr/lib/openssh/sftp-server" (without the quotes).  OK it and save the site.  Now you will always be able to transfer files even if they are root owned on the remote machine.  It will make your life much easier.

Posted

I just pushed a new release of the console as the current stable release.  Short description here and usage notes have been updated:

V3.4 is a moderate update. The major functional addition is GOTO keys which now allow you to specify a tree structured relationship among screens in addition to the chain of screens supported to this point. This was a user request in the discussion thread and is documented in the usage notes. Following on to the previous release a number of console activities that can take a while have been made asynchronous including fetching weather, network health checks, checking the sha for automatic updates, and some internal debug logging. These changes further reduce any console responsiveness lag. The only visible impact is that on the first access to a weather screen for which weather has not yet been fetched you may see a momentary message that a fetch is in progress whereas previously the screen would be effectively locked while this was happening. Some console performance stats are now reported via MQTT. This release supports the Pimoroni 4" display as you may have noted from the lengthy remote development effort above in the thead. In doing this, I reorganized how screens and touch information are input into the console which should make it easier to incorporate other screens in the future, as well as to handle differences between Stretch and Buster versions of Raspbian (which have frame buffers named slightly differently). There are changes to the install scripts to allow for user intalled screens versus the set the script handles, to allow installation on Buster systems. This version has been tested to run on Buster, though since that version has only been available for a few days its use has been somewhat limited. One other small change: previously key color for a key in the off state would be dulled even when specific colors were provided for KeyColorOn and KeyColorOff. Now if both of these are specified they are used as is and not dulled.

Posted (edited)

Hi Kevin

Just a quickie. I am trying to have a variable set a key green or red. Copied from example garage but it doesn't seem to work.

[MB]
type = Keypad
label = PiSwitch,
[[Master Bedroom Lamp]]
KeyColor = royalblue
label = Bedroom Light,
[[LR Dual Spots]]
KeyColor = royalblue
label = Dual, Spots
[[LR Pict Spot]]
KeyColor = royalblue
label = Art Spot,
[[Up Lights]]
KeyColor = royalblue
[[Main Hall]]
KeyColor = royalblue
[[DR Wall Wash]]
KeyColor = royalblue
[[Air Filter Control]]
KeyColor = royalblue
label = Air Filter,
[[Newspaper]]
type = VARKEY
Var = ISY:State:Newspaper
ValueSeq = 0,1
Appearance = 0 green,1 red

On the screen display  I get the message key binding missing on the other buttons.

Thanks 

Gary

Update I found that I indeed need to to label the buttons ion the Appearance line.

Thanks 

 

Edited by garybixler
Update
  • 2 months later...
Posted

I just pushed a new update of the soft console.  As usual it squashes various bugs but it is mainly for improving multiple console administration (which I do since I have about 9 consoles running).  Release note:

V3.5 is primarily aimed at simplifying administration of multiple consoles on a network. It completely reworked the multi-console error indicator and command structure. If you are running multiple consoles with MQTT, when you enter the Maintenance mode you will see an additional option for network consoles. That will provide access to screens that report all available status for other consoles on the network, including the error status of their logs, the versions of hw and sw they are running, their up-time, etc. It also provides access to issue commands to other consoles (or for commands that make sense, all consoles). You can display error logs (either all or just recent errors), clear error indicators, request restarts, etc. Note that as part of this rework, the meaning of the error indicator in the upper left corner of the screen has been changed. A solid circle indicates an error report on some other console on the network while a cross indicates an error on this console. Both may be present if appropriate. Also, remote errors are no longer reported in the local log since they are directly available via the remote screens. Also note that some advanced commands for administration (accessing development versions for example) have been moved to behind double taps on the main select version and network console name buttons to reduce normal clutter.

This release also adds HorizButtonGap and VertButGap parameters to allow separating the buttons on the display. It incorporates a number of structural changes to how Home Assistant hubs are handled but none of these should be user visible. This version has been tested and runs fine on Buster. However, be aware that some Buster installations seem to locate the frame buffer at /etc/fb0 and others as /etc/fb1. The code attempts to get the right buffer but if you find that the console seems to start but does not display anything, use the screendefinitions (as described in the usage notes) to force the display to what you need. The release also is more tolerant of weather outages at APIXU by waiting longer to post errors to the log when the service is not reporting meaningful weather, since APIXU seems to sometimes go autistic for a few hours.

  • Like 1
  • 4 weeks later...
Posted

I just noticed that APIXU which is the weather provider that the console uses has decided to change their name and create a much more restrictive free usage limit.  Unfortunately they claim to be shutting down the old api 10/14 which, unless I missed a long standing notice, is rather short notice.  In any case, it looks like my best alternative is to switch to DarkSky since they have a sane personal use policy.  I'll try to get something updated quickly but it may be a day or two after the shutdown if I have any trouble since I'm going to be out of town for the next couple of days with limited opportunity to work on it.

Kevin

Posted
I just pushed a small release V3.5.1 to add DarkSky as a weather provider given the demise of APIXU.  Release comments below:

V3.5.1 is a quick release to add DarkSky as a weather provider given that APIXU is going away.  Use of DarkSky is pretty much the same as use of
APIXU was with one notable difference:  DarkSky only accepts lattitude/longitude as a location.  To convert existing weather to DarkSky: go to 
their website and create a (free) account.  Change the name of the weather provider in your config files from (probably) [APIXU] to [DarkSky].  
Change the location parameter for each place from its current name to the lat,lon pair for the location.  An easy way to get that is to go to 
latlon.net where you can input a place name or use a map to quickly get the coordinates.  This release has gotten a bit less testing at my 
house than the usual release because of the urgent nature of getting it out but it has shown to be solid.  One thing I have noticed about 
Dark Sky is that their condition summary phrases tend to me a lot wordier than the previous weather guys.  I beefed up the term shortening logic 
a bit to help but you may still see more long phrases than in the past.  Of course you can, as before, manually change those via the termshortenlist.

 

 

Let me know if you encounter any issues with this.

 

Kevin

  • Like 1
  • 2 weeks later...
Posted

I have 3 consoles running, one with a 7" screen and two with Adafruit's 3.5" screen.  I just tried to manually upgrading one of the  3.5" screens to softconsole v3.5.1 by using the maintenance screens.  I now get a raspbian desktop screen upon startup.  I can SSH into the console using Putty and can connect using WinSCP.  I read your comments on the buster support messing with the screen and the usernotes on forcing the screen to a certain type (fb0 or fb1) but I am unclear on what to do or if this is my issue or not. I have attached the last console.log.  

 

Is there any guidance you can give?  

Thanks

Console.log

Posted

That doesn't look like a Buster issue. You are getting tons of exceptions from the ISY stream. I don't think anything has changed recently in ISY support. Have you done any big changes to your ISY stuff?  If you see the startup log appear on you Pi console (the blue background scroll) then screen access is fine. Unfortunately I am traveling until next Sunday so can't help too much while limited to my phone screen.  

Posted

Additional Information:
The following was done via SSH (using Putty).

I used sudo systemctl and saw that softconsole was listed. I stopped and restarted but this did not help.
I then ran sudo systemctl stop softconsole to stop console.
I verified that softconsole was no longer listed when I ran sudo systemctl.

Then I used the sudo python -u console.py to manually start.  Below is what I received.

pi@console-24:~/consolestable $ sudo systemctl stop softconsole
pi@console-24:~/consolestable $ sudo python -u console.py
10-27-19 16:19:21 Console ( 4529) starting in /home/pi/consolestable
10-27-19 16:19:21 Environment initialized on host console-24
10-27-19 16:19:21 Exdir: /home/pi/consolestable  Pid: 4529
10-27-19 16:19:21 Version/Sha/Dnld/Commit: currentrelease 0d59064aa7929cbc8a5caeef6d779c8c81edeff1 Maint Dnld: 10-27-19 13:18:17 Commit of: 2019-10-14T17:09:43Z
10-27-19 16:19:21 Screen types imported
10-27-19 16:19:21 Alert Proc types imported
Traceback (most recent call last):
  File "console.py", line 231, in <module>
    importlib.import_module('stores.weathprov.' + splitname[0])
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 673, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/pi/consolestable/stores/weathprov/darksky.py", line 13, in <module>
    from darksky.types import languages, units, weather
ImportError: No module named 'darksky'
exitlogging
10-27-19 16:19:21 Exiting with history trace (0)
10-27-19 16:19:21 Suppressing History Buffer Dump for Exit Trace
4536(1572211162.8550327): Logger loop ended
Process AsyncLogger:
Traceback (most recent call last):
  File "/usr/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/usr/lib/python3.5/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/consolestable/logsupport.py", line 248, in LogProcess
    disklogfile.write(
AttributeError: 'NoneType' object has no attribute 'write'
pi@console-24:~/consolestable $
 

Posted

I believe that the 'Exceptrion in QH...' messages are caused from the NodeLink server I am running with my ISY, v5.0.15A.  See: https://forum.universal-devices.com/forum/58-automation-shack/.

I think NodeLink reports in such a way that SoftConsole does not understand.  Under NodeLink I have a series of 1-wire temperature sensors, humidity sensors, and 2 1-wire counters.  What makes me believe it is related to NodeLink is the QH messages include temperatures and the names Temperature, Counter, Heartbeat which are all names of Nodelink items.  These errors have been present for a while on all three SoftConsoles.  I do not think these log entries are related to the failure to upgrade.  Attached is the console.log from my second 3.5" display SoftConsole.  This SoftConsole is running fine but still is configured for APIXU.  Notice it has the QH exceptions as well.

In the console.log I sent you earlier (from the softconsole I tried to upgrade), you will notice that towards the end (line 9986) you can see where I selected the download currentrelease function from the maintenance screens.  

Console-23.log

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.1k
    • Total Posts
      371.5k
×
×
  • Create New...