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.