Microsoft PowerShell – Surprised!

Having taking programming Decades ago as a possible career, but going in a different direction. Dabbled in many languages from Atari Basic, Apple Machine Language to LiveCode and many other odd short lived ones. I was putting so much effort not to use PowerShell, thinking it was just for scripting. Boy was I wrong. Today I compiled my first script.. Oh and by the way, that was on a Mac.

Think I’ll be using it more and more.

Thanks for the pleasant surprise Microsoft!

OH, and it is free!

MQTT – How simple …

Was able to add MQTT server using Mosquitto, as simple as they attempt to make it sound to setup and operate, it isn’t.

Using BREW to installed sounded simple, but never worked as all the instructions I could find. Doing a mix install using Brew and other installers I was able to get it working. You couldn’t just start and stop the service thru Brew you had to Force Quit using Activity Monitor, then use:

/usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf to restart.

Adding users was confusing but after a few tries I got it working.

mosquitto_passwd -b passwordfile admin mqttadmin1

Monitoring the server was make very easy using MQTT Explorer, thought understanding the data was a bit more of a challenge. Couldn’t tell when of of my devices was online or not, till about the 15th try. The it just showed up and started working.

My first device was a weather station by Pimoroni:

Having purchased the sensors a few years ago from SparkFun. When I finally saw the sweet data appear I was overjoyed.

{
“device”: “nature-weather”,
“pressure”: 951.99,
“temperature”: 25.8,
“humidity”: 42.61,
“wind_direction”: 90,
“light”: 334.98,
“rain”: 0,
“timestamp”: “2022-08-21 15:51:03”,
“wind_speed”: 0
}

My next project is using Red-node to display the data as it is published to my broker (Can’t understand why they don’t just call it a server).

OH a note about Red-Note, don’t attempt to use Safari on a Mac, it doesn’t work. (See Photo Below) Wasted half an hour thinking i needed to install Modulars or something. Tried in chrome and it opened right up. Apple is become a real pain, IMHO.

Nature-Weather and Nature-Cam

Problem with Safari on Right VS Chrome on Left

Server Upgrade (sic)

The OLD Xserves we were using were starting to be difficult to upgrade. We tried to upgrade the OS, no go. Tried to upgrade services, no go. Mostly because the hardware was no longer supported, which caused the upgrades to state that hardware wasn’t supported. Even minor upgrades were becoming major headaches. SO we upgraded, from 10.6 to 10.12 Sierra. LOL. Not the end all but so far it has paid off. Also the hardware had to be upgraded, xserves, ALL of them, gotta go. Now we are using MacMinis, must admit is is quieter.

The effects kinda snow balled. Hard drives format weren’t readable, services needed to be upgraded, some things don’t work. Trying to find workarounds is the biggest pain. Jabber/Messages is a big one, however now there is something called MQTT. We are trying.

On a positive note our Raspberry Pico W’s have started to arrive. Weather station conversion finished and posting data. We are working on another one that’ll be mobile.

Expanding Network

After having to run cords across the floor to get to our test bench, we’ve opted to have new jacks installed.. IN WALLS.. A little more work, but much neater for the long run. New cat6 wire, all the way back to the gig switch.. NICE..

Thanks for all those that helped in the effort.

Server Upgrade

After running non-stop since 2007, we are finally replacing our Apple Xserver, which has acted as our in house web and develop server. We were getting to the point that we just could upgrade/update it, and application were suffering. So we finally started the move. First we tried other computers we had laying around, MacMini DualCore i5 running Lion Server, failure. Even tried using a MacMini i7 running Catalina, also a failure. So we have upgraded to an i7 running Monterey, moving away from the Apple Server totally (since they forced us) and trying new systems. Hopefully we will be able to start it up in a week or so.. Crossing fingers..

DNS Blocking

Had a user bring us a Windows 10 HOME computer that wasn’t able to get on the internet using Wifi or Ethernet. After toying around with it for some time here is what we notice.

  1. Would receive and IP address from DHCP server, but no Internet access.
  2. Could add a new port, usb ethernet, gets IP but still no Internet.
  3. Went through Google search finds to reset network, still nothing.
  4. Removed all the ports, drivers etc.. Still, nada

We found it odd that the computer would get an IP number from server, but then not do anything else with network. We found the user had install AVG anti-virus, took some work to remove without internet, but finally won over. However even after repeating all the steps above, no Internet. Checked resources and system apps, couldn’t see anything that stood out..

We figured it was a typical virus that ransomware the system, but none of the normal flags popped up..

So we finally just reinstalled the OS, oh we did try recovery, that failed. After the reinstall of course everything worked fine. A bit more digging and we found out this ‘issue’ is called Gateway or DNS blocking. Nasty beast. Anyclues how to get around it without rebuilding the whole system?

Apple Server Repair

It has been a while since I got to play with our Snow Leopard server. We were trying to upgrade the jabber server, and ended up totally trashing it. Attempted to use Time Machine Restore, but that failed.

Ended up booting on an Mountain Lion thumb drive purchased from Apple. Was then able to do a recovery from a Time Machine Backup and restart server back to it existing condition. No data lost. SWEET.

We are trying to integrate our Windows boxes into the Jabber network. We are able to get Windows 10 and Windows 98 working. Not the greatest, but it works. Now just want to see if I can get a DOS 6.22 box sending messages. Any ideas?

Moving Backwards

Back in the early 90’s I programed in Microsoft QuickBasic, and after that I started using Visual Basic, then finally I’ve been using LiveCode.

Just for laughs I started building a machine able to run DOS 6.55 and Windows 3.1, brings back memories. After a couple of months assembling the needed parts I finally got the tiny HP T5000 running. It was like an old friend.

It took some time to reacquaint myself with the OLD and how I setup the computers back in the day. I was impressed, my code and batch files were commented and easy to follow. The things we did with serial communication and NO Networking. The newer programs had limited networking, but nothing we find on today systems.

There were full collections of QuickBasic libraries, with manuals, ranging from “windows” and dBase III, speech and even code to create background functions. Those were the days, one person could provide a whole company with software that wasn’t filled by off the shelf programs. All customized for their needs.

Lately I’ve been also revisiting PowerShell and the power of Active Directory, having adding both a Windows Server configured as a Domain Controller and a few Windows 10 machines as Clients. Trying to get both the old and new to communicate has been, frustrating.

Was thinking about using Jabber, or XMPP, to issue small commands to a server/controller/monitor. But as with all projects of this nature, it seems I busted my server by installer a newer version, that wasn’t supported by the hardware I have. Oh well, time to rethink and reproach what I am trying to do.

Ring – Spotlight Cam Battery

Currently we have three “Right Spotlight Camera Battery’s” cameras. They are neat cameras that we move around our property for security and to monitor wildlife. We even went the extra mile and order a second battery for each camera and a couple of spares. They last between 2-3 weeks without issue, until.

One camera dropped off the network, no big just change the batteries, not blinking lights, nada. Tried a few batteries, brought whole camera into the office where I am sure the network single is strong, nothing.

We pay for the monthly “Protect Plus”, which is supposed to support online storage of all recordings for more than one device, and extended warranty.

So I tried the online chat support, first they want to link your Ring Account to your Amazon account, and want your mobile phone number. Personally I don’t trust Google as far I would throw anything they make. Such as the Next Protect, which EXPIRES and is worthless after a few years become, according to them, a sensor life expectancy. However that wasn’t noted anywhere before the sale.. Anyway, so after trying their online help, and being required to link to Amazon and give them my cell phone I told him to shove it (in a nice way). I PAY for service and I expect service. So I am told to call their 800-656-1918 for support. I bet you can guess how this is going to go.. But keep everyone updated.

UPDATE 01: Phone call with Ring Tech support took 35 minutes, including repeating all he steps already performed, replace battery, hold button for 1 second, repeat. Replace battery hold button for 20 seconds, repeat. Did however learn there are little LEDs inside, by hinge. In my case, NOTHING.

There is a $1 to send you a replacement, which will be refunded (will monitor), and you will be charged the full price of a new camera if you don’t send back broken unit within 13 days. Expensive junk! Again will keep everyone updated.

UPDATE 02: New Ring camera arrived, basically a WHOLE new camera. After setting up as a new device, it has been working fine. Sent the old one back by giving to UPS driver at out local Staples. Now have to see if I get the $2 back that they took, and make sure they don’t charge me for a NEW camera.

Synology NAS DS419Slim

Provide information and insights into new NAS. (TO DO)

DS419Slim

After a few months using the drive, I can now report on its overall operation.

One, don’t let the photos on Amazon fool you, this is a MINI NAS which uses laptop drives, not the normal desktop drives. Which was surprising when it arrived. Plus the description said it came with drives, but didn’t. Amazon likes to embellish its descriptions and mix all the “like”/”similar” drives. So don’t bother reading them, get your reviews elsewhere.

After the second order with drives arrived, install and setup was easy. Left the drives formatting/partitioning overnight. It comes with internet access to manage, configure and monitor.. HOWEVER, it isn’t free, SURPRISE. Locally accessing, does work and is free.

There are two pieces of software that can be installed on Synology Cloud Station Backup and Synology Cloud Station Drive. Station Backup does a backup as is per configured on each station. Station Drive syncs file as they are opened and closed. Users complained of slower computers, but was kind of expected.

You log into the NAS with each users account and can recover files easily. I don’t expect users to be able to do this.