Recent Posts

Pages: [1] 2 3 ... 10
1
Advanced Topics / Re: How to send a single terminal command via an app.
« Last post by NeilP on June 21, 2021, 01:53:29 pm »
I'll take a look thanks

but it seems the issue might be with the HA-Bridge software deals with these commands

All of the below do work exactly as intended from teh command line...sending the lighting control codes to the telnet server and onwards via the software on to the HomeVision device.

Put any of these in to HA-Bridge..and nothing.  SO part A of this issue solved..now to work out why the HA-Bridge software is not sending them. 

Off to bed now will look again when I wake at stupid o'clock ...

Code: [Select]
Last login: Mon Jun 21 20:45:34 2021 from 192.168.1.71
pi@x-10:~ $ echo -e ",g0A3C2C31\r" > /dev/tcp/192.168.1.56/1034
pi@x-10:~ $ echo -e ",g0A3C3f31\r" > /dev/tcp/192.168.1.56/1034
pi@x-10:~ $ echo -e ",g0A3C0f31\r" > /dev/tcp/192.168.1.56/1034
pi@x-10:~ $ exit
logout
Connection to 192.168.1.49 closed.
neil@neil-linux ~ $ bash -c 'echo ,X0A03 | nc -NC 192.168.1.56 1034'
HomeVisionXL version 2.4 -- telnet connection started.
neil@neil-linux ~ $ echo ',g0A3C2C31' | nc -NC 192.168.1.56 1034
HomeVisionXL version 2.4 -- telnet connection started.
neil@neil-linux ~ $ echo -e ",g0A3C0931\r" > /dev/tcp/192.168.1.56/1034
neil@neil-linux ~ $ bash -c 'echo ,X0A03 | nc -NC 192.168.1.56 1034'
HomeVisionXL version 2.4 -- telnet connection started.
neil@neil-linux ~ $
3
Networking / Re: Looking for a WiFi USB- stick working well with Peppermint
« Last post by murraymint on June 21, 2021, 08:19:58 am »
That's an error. The command should be

Code: [Select]
dmesg | grep 'microcode'
4
Networking / Re: No Internet
« Last post by jozefmw on June 21, 2021, 04:34:14 am »
At last I got the opportunity  to work on this again:

Code: [Select]
  elias@elias-mate ~ $ sudo lspci vnn | grep -i net
[sudo] password for elias:
 
Usage: lspci [<switches>]

Basic display modes:
-mm Produce machine-readable output (single -m for an obsolete format)
-t Show bus tree

Display options:
-v Be verbose (-vv for very verbose)
-k Show kernel drivers handling each device
-x Show hex-dump of the standard part of the config space
-xxx Show hex-dump of the whole config space (dangerous; root only)
-xxxx Show hex-dump of the 4096-byte extended config space (root only)
-b Bus-centric view (addresses and IRQ's as seen by the bus)
-D Always show domain numbers

Resolving of device ID's to names:
-n Show numeric ID's
-nn Show both textual and numeric ID's (names & numbers)
-q Query the PCI ID database for unknown ID's via DNS
-qq As above, but re-query locally cached entries
-Q Query the PCI ID database for all ID's via DNS

Selection of devices:
-s [[[[<domain>]:]<bus>]:][<slot>][.[<func>]] Show only devices in selected slots
-d [<vendor>]:[<device>][:<class>] Show only devices with specified ID's

Other options:
-i <file> Use specified ID database instead of /usr/share/misc/pci.ids.gz
-p <file> Look up kernel modules in a given file instead of default modules.pcimap
-M Enable `bus mapping' mode (dangerous; root only)

PCI access options:
-A <method> Use the specified PCI access method (see `-A help' for a list)
-O <par>=<val> Set PCI access parameter (see `-O help' for a list)
-G Enable PCI access debugging
-H <mode> Use direct hardware access (<mode> = 1 or 2)
-F <file> Read PCI configuration dump from a given file
elias@elias-mate ~ $ sudo lshw C network
Hardware Lister (lshw) - B.02.18
usage: lshw [-format] [-options ...]
       lshw -version

-version        print program version (B.02.18)

format can be
-html           output hardware tree as HTML
-xml            output hardware tree as XML
-json           output hardware tree as a JSON object
-short          output hardware paths
-businfo        output bus information

options can be
-class CLASS    only show a certain class of hardware
-C CLASS        same as '-class CLASS'
-c CLASS        same as '-class CLASS'
-disable TEST   disable a test (like pci, isapnp, cpuid, etc. )
-enable TEST    enable a test (like pci, isapnp, cpuid, etc. )
-quiet          don't display status
-sanitize       sanitize output (remove sensitive information like serial numbers, etc.)
-numeric        output numeric IDs (for PCI, USB, etc.)
-notime         exclude volatile attributes (timestamps) from output

elias@elias-mate ~ $ iwconfig
lo        no wireless extensions.

enx000000000428  no wireless extensions.

elias@elias-mate ~ $ ifconfig
enx000000000428: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.14  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::4ae6:34c6:9bca:aea8  prefixlen 64  scopeid 0x20<link>
        ether 00:00:00:00:04:28  txqueuelen 1000  (Ethernet)
        RX packets 3166  bytes 865579 (865.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2247  bytes 392152 (392.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 3189  bytes 313087 (313.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3189  bytes 313087 (313.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

elias@elias-mate ~ $ sudo iwlist scan
lo        Interface doesn't support scanning.

enx000000000428  Interface doesn't support scanning.

elias@elias-mate ~ $ rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
elias@elias-mate ~ $
5
Networking / Re: Looking for a WiFi USB- stick working well with Peppermint
« Last post by jozefmw on June 21, 2021, 04:02:55 am »
I did follow the commands and got this output;

Code: [Select]
  elias@elias-mate ~ $ sudo # dmes | grep microcode
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt]
            [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt]
            [-T timeout] [-u user] file ...
elias@elias-mate ~ $ ^C
6
Networking / Re: Looking for a WiFi USB- stick working well with Peppermint
« Last post by jozefmw on June 21, 2021, 03:42:32 am »
As far as a Wifi - stick is concerned, I ordered the Fideco AC-1200 Mbps adapter, which was tested on linux, successfully.
7
Networking / Re: Looking for a WiFi USB- stick working well with Peppermint
« Last post by jozefmw on June 21, 2021, 03:39:32 am »
Thank you for your reaction!
I had a look at 'How to install/update Intel microcode firmware on Linux'
There is a warning: 'How to install/update Intel microcode firmware on Linux'
from an experienced sysadmin:
'Warning: In some cases, microcode update may cause boot issues such as server getting hang or resets automatically at the time of boot. The procedure worked for me, and I am an experienced sysadmin. I do not take responsibility for any hardware failures. Do it at your own risk.'

Since I still consider myself a Linux beginner, I don't really dare to do this.

I also have a question: is this necessary to get the laptop's internal WiFi working or for an external USB WiFi stick?
8
Advanced Topics / How to send a single terminal command via an app.
« Last post by NeilP on June 21, 2021, 12:45:46 am »
I need to send commands to a telnet server.
I can send the command(s) directly from the terminal, in an open telnet session, and it works fine.

But I need to format those commands to be put in another app that will open a telnet connection, send the command and close the telnet. 

This is the codes being sent via an open telnet session
Code: [Select]
neil@neil-linux ~ $ telnet 192.168.1.56 1034
Trying 192.168.1.56...
Connected to 192.168.1.56.
Escape character is '^]'.
HomeVisionXL version 2.4 -- telnet connection started.
,X0A01 
28 Cmd: Done

,g0A3C3231
37 Cmd: Done
,X0A03
28 Cmd: Done
^]
telnet> QUIT
Connection closed.
neil@neil-linux ~ $

So the telnet server is up and running and receiving and correctly actioning the commands
The commands above, turn on bedroom light (,X0A01) Set brightness to level 32 (,g0A3C3231) and turn it off (,X0A03)


I need to put these commands, in to the WebGUI, of an app (HA-Bridge) 
Four  sections per device  (On call / Dim Call/ Off Call, Colour Call)  of command Type   Execute Command/Script/program. I only use on /off/dim

The Dim command will need modifying later with a bit of a computation to insert the required brightness level 
(${intensity.math(((X*63)/255)).hex}  )   ..but we will get to that later once the basics work.


So I need the syntax that will send each command individually to the telenet server.
have tried various combinations of echo  / nc and others and drawn a blank...see below.  all the things i tried are what I managed to trawl up from internet examples, but not one worked.  Did about 2 hours on this, this morning from about 0200 till 0400 when I woke during the night  Ruddy thing is permeating my dreams now!  :(


Code: [Select]
neil@neil-linux ~ $ telnet 192.168.1.56 1034
Trying 192.168.1.56...
Connected to 192.168.1.56.
Escape character is '^]'.
HomeVisionXL version 2.4 -- telnet connection started.


HomeVisionXL version 2.4 -- telnet connection started.
,g0A3C2C31
37 Cmd: Done

telnet>
^]
telnet> quit
Connection closed


SO the above works...I can telnet in and send manually but as below..getting it ti send and action in a 'one liner'..no chance

Tried various direct from the terminal on the local machine


   
Code: [Select]
neil@neil-linux ~ $ telnet 192.168.1.56 1034 < ,g0A3C2C31
bash: ,g0A3C2C31: No such file or directory
neil@neil-linux ~ $ telnet 192.168.1.56 1034 ,g0A3C2C31
Usage: telnet [-4] [-6] [-8] [-E] [-L] [-a] [-d] [-e char] [-l user]
[-n tracefile] [ -b addr ] [-r] [host-name [port]]




   
Code: [Select]
neil@neil-linux ~ $ echo -n',g0A3C2C31' | nc 192.168.1.56 1034
HomeVisionXL version 2.4 -- telnet connection started.
^]
,g0A3C2C31
quit
^]^]^]
exit
^A^C


   
Code: [Select]
neil@neil-linux ~ $ echo ",g0A3C2C31" > /dev/tcp/192.168.1.56/1034
neil@neil-linux ~ $ echo ",g0A3C2C31" > /dev/tcp/192.168.1.56:1034
bash: /dev/tcp/192.168.1.56:1034: No such file or directory
neil@neil-linux ~ $ echo ",g0A3C2C31" > /dev/tcp/192.168.1.56 1034
bash: /dev/tcp/192.168.1.56: No such file or directory
neil@neil-linux ~ $ telnet 192.168.1.56 1034








Further info  (waffle) of why i need to do this...

Currently I have a system that allows Amazon Alexa to control older x-10 home control devices. 
a program called HA-Bridge emulates a Phillips Hue hub and each device you create in HA-Bridge is 'presented' and seen by Alexa as a device that can be turned on/off or dimmed.
So I tell Alexa to bedroom light on/off/ dim to 50% or whatever.
Alexa sends a command to HA Bridge
HA Bridge sends this via a one of its device options which are set to Type   Execute Command/Script/program.
HA-Bridge first computes the intensity.math section
max brightness is 255 ..50 % is 128..so if i ask for 50% brightness it does  ((128*63)/255)  = 32
heyu xpreset A7 ${intensity.math(((X*63)/255))}

and sends
heyu xpreset A7 32

which sets the light at level 32  of a max of 64

and the next app in the chain (heyu) accepts this command and sends the correct signal via RS232 USB-serial interface that is connected to the X-10 CM11 Powerline interface ..that send the command down the power line to dim the light.


That all works fine...BUT

I am changing the CM11 unit for a more capable device...a HomeVision Home Control board which instead of the heyu program uses another bit of software HomeVisionXL.  That unfortunately DOES NOT accept the commands that are currently in each device on the HA-bridge.

It DOES accept control for on/off sent from HA-Bridge via its own webserver ..  But that brings a new problem as HA-Bridge does not 'do' the intesnity calculation when the command type is set to http device instead of Execute/Script type

It might work with MQTT...but that requires setting up each device yet again...50 odd devices each needing manual re-entry :( of three or four codes)


I know I can send commands that HomeVision accepts via talking direct to the serial port  screen /dev/ttyUSB0   
But again opening a session..not a single lien command...AND cant connect to same serial port at same time as the HVXL software that also needs that com port open.

So enter the telnet server built in to HVXL software. 
that acts as a pass through..so i send the serial commands to the HVXL telnet server and that passes the commands on to the HV hardware

That leaves us with the third option that the HomeVisionXL software offers
9
General Discussion / Re: The 'obligatory' forum members Introduction topic
« Last post by VinDSL on June 20, 2021, 01:55:41 pm »

Still have my SWM 320TL trials bike, stored in the shed. ;D

Got my Mugen Honda in the shed, too :))

Nice looking bike: https://www.motoswm.co.uk/models/models-2/   8)

As a side note (another one of those oddity of language things) SWMs were made in Italy... and there is no double-U in the Italian language... they use double-V instead. So, technically, it's a SVVM.

I am just saying...  ;D
10
New Users / Re: How To Re-Install Postgres
« Last post by insight on June 20, 2021, 11:52:33 am »
Hmmm bummer.... here is a good one for your pocket:
https://kb.objectrocket.com/postgresql/how-to-completely-uninstall-postgresql-757

The directories are probably not getting removed, sometimes you need to explicitly rm them.....
 
By chance are you using PGAdmin?

Before you uninstall it what does this show...just curious ;)
Code: [Select]
sudo service postgresql status

Hello grafiksinc,

Thank you for the followup.  I'm sorry to be responding so late.  I was dealing with Joomla 3.9 installation issues on the same system.

I'm not running PGAdmin.  I tried to get version 4 to run on my 32-bit system, and it didn't work.  I'm running Peppermint 10 on a Lenovo S10e with an i386 processor.  It has brought *new* life into the old man.  The keyboard and monitor are shot, but I've used workarounds for these minor issues.  :)

Now, I did follow the instructions in the link, you were so kind to include.  However, the "dpkg -l | grep postgres" command showed a few files I couldn't even delete as the root user.  Try that on for size.

insight@me ~ $ dpkg -l | grep postgres
ii  pgdg-keyring                           2018.2                                           all          keyring for apt.postgresql.org
ic  postgresql-13                          13.3-1.pgdg18.04+1                               i386         The World's Most Advanced Open Source Relational Database
ic  postgresql-client-common               226.pgdg18.04+1                                  all          manager for multiple PostgreSQL client versions
ic  postgresql-common                      226.pgdg18.04+1                                  all          PostgreSQL database-cluster manager
******

I'm so tired mentally from my Joomla adventures, I don't want to even try a fix of this right now.  I do want to get postgresql working with PGAdmin4, because I want to follow a django tutorial I have.  I know I could do the course without postgresql or PGAdmin4, but I want consistency with the instructions.

I'm not giving up.  I'm just not mentally in the mood right now.

On the bright side, I did fix ALL of my Joomla 3.9 issues.  ;)

Thanks bud.

Insight
Pages: [1] 2 3 ... 10