Monday, November 17, 2025

Welcome back KE9V

 Jeff welcome back to the blog sphere I for one have missed your insight, my morning coffee has been enhanced by your read on things....even though at this end I may be to much tech.....:) 

Friday, November 14, 2025

Step one in my Python coding adventure



 

In my first post regarding my Python adventure, I shared how I wanted to use python coding in the shack. As my readers know I am an avid CW contester and before a contest begins I have 5 programs that need to be launched. The issue is if I launch them out of order or if one program has an issue things get all screwed up, and I have to start all over again. In doing so, most of the time I need to go into some programs and reconnect some com ports and clear lots of error messages. My first Python project will be one double-click on a desktop icon that will get all my contest stuff up and running smoothly in the right order. 

The approach I am using is to write python code to start each individual program. Then save those in a file. This will get my whistle wet with python coding, both with success and some head scratching. At this point I have coded out most of my programs so they start. Once that is fully completed, it will be grouping them all together into one process. 

In a nutshell, here is the plan:

- Turn on a Wi-Fi plug which powers on my power supply and Pi4B power supply

- Start my VSPE virtual com port program and minimize it.

- Start my Wn4icom program which also starts my Icom 7610 radio. 

- Start my N1MM contest software.

- Then finally Firefox will start, open Reverse Beacon Network, log me in, set up search for my call and set it to refresh my call sign spots every 10 minutes.   

Lets take a fast look at the python coding for the WiFi plug. 

 import asyncio
from kasa import SmartPlug

async def main():
    plug = SmartPlug("10.0.0.71")  # Replace with your plug's IP address
    await plug.update()
    await plug.turn_on()
    print("Plug turned on"


asyncio.run(main())

For the Kasa smart WiFi plug by TP link to work I had to first download into python the kasa library. I opened up python and entered the code below...well actually cut and paste. 

 pip install python-kasa


Now below in a nut shell is what the code is all about for the Kasa WiFi plug to turn on. 

1. Python loads the  needed modules. (asyncio and SmartPlug)

2. Program defines async functions or in English connecting to the wifi plug could take time and this allows things not to freeze if the process takes time. 

So now modules are loaded and it knows some actions could take time. 

3. Now asyncio.run(main()) runs  and this is what happens.

Smart plug is created for IP address 10.0.071

The plugs state is defined (on or off)

The plug is turned on via network command 

A message printed in python code window "plug turned on" 

Program closes. 

In closing I am not by any means a pythonista regarding code and I am sure many who are can poke holes in the coding or what I left out regarding what to explain. This is my first attempt at this game and I was actually shocked that it worked. BUT your input will and always is welcomed. 

Next post is about the learning curve, hiccups and added lines of code for smoothness and reliable start up.  


 




Tuesday, November 11, 2025

Having a snake of a time.

 


In retirement, I want to keep my mind sharp, and to do that, I have to challenge myself. My latest adventure is learning Python coding.
A little history about Python coding: the founder, Guido van Rossum, a Dutch programmer, came from the Netherlands. His goal was to birth a code that was easy to read general purpose programming language. Why the name Python and not Rossum, you ask? The name came from Monty Python, and he felt that gave it a light-hearted name. In the Zen of Python, this phrase sums up the code experience: "Simple is better than complex." Oh, and those who code in Python are known as Pythonista's and I am striving to become just that.
So why all of a sudden my interest in coding......well, it has to do with my son Ben, who is a whiz kid at this stuff. Funny story.....Ben went to the University of Toronto and majored in cyber security. He wanted to get into a top tier program and had to have some interviews. He was given a few exams and then called in for an interview. The interview was conducted by the department head, the lead professor and the admin for the program. The main purpose he was called in was because the most complex question and the main question on the exam he left blank. When asked, he told them the question had incorrect coding and he was not going to waste time on it! He was asked to explain, and he did, and was told Thank you for coming in. Ben called me after the interview and told me the story. I could not believe what he did and was about to give him a piece of my mind. Before that could happen, he told me the professor called later in the day and told  he was accepted, no more interviews or exams were required, and they were changing the question as he was correct.
In a phone conversation with Ben, he challenged me to pass some of my time learning Python coding. He said it was very user friendly and it could really help with my ham radio adventure. I took him up on the offer, and now I am in the process of coding to make ham radio at VE9KK a little more automated.  More on how that is coming very soon, as I have already produced some coding that has shocked me and is helping VE9KK's CW contesting station become a “Geek shack”

Friday, November 7, 2025

Whats your thoughts?

  

Possible RF magnet
While doing my annual pc cleaning last month, for some reason, I took special notice of my Wi-Fi SMA antenna connectors on the back of the PC. I have disconnected the Wi-Fi antennas as they are not used and get in the way of the cabling they. In my case, to get connected to the internet, I have a LAN cable from the back of the PC that goes to the hallway to a TP Link Wi-Fi extender. I find I get a better signal this way as opposed to using the Wi-Fi antennas on the rear of the PC.

Needed connectors
 Back to the Wi-Fi connectors on the rear of the PC, as I was cleaning, a thought came to me that these open Wi-Fi connectors could be a nice RF magnet. In the past I have issues with RF getting into the PC and to eliminate as much as I could is a bonus. I did have a few 50 ohm SMA male connectors and I thought with that I would be good to go. On closer inspection and a frustrating experience trying to get the 50 ohm to connect to the PC, I found the SMA connector on the PC was a male and the 50 ohm connector is also a male connector. This had to be purchased, and it's called RP-SMA.Once they came in, the connection went very smoothly. So what are your thoughts on this, most if not all PCs have Wi-Fi antenna options and if you're not using it and prefer LAN connections should these antenna connections be terminated with 50 ohm terminators?

Connected and ready to go.