Made It To Molokai

What a journey, not as bad as the Phlippines though.

Gonna be tough the next few days.

Internet is decent, but not really comfortable, wouldn’t want to be working without a proper desk.

My laptop is teetering on a chair.

I need to shower long when I get home.

Weight: 343.6

Posted in Training, Weigh In | Leave a comment

Trip To No Man’s Land

OK I am exaggerating, but I am headed to my home Island of Molokai, last time was over 5 years ago in 2018.

Going to be interesting to see what has changed.

Doing something different, travelling lighter than usual.

Going to hang out on Maui for a night afterwards with a friend though.

Just my sister, her husband and I are going.

My kids and wife are staying.

Weight: 343.0

Posted in Training, Weigh In | Leave a comment

Checking My Code

Learned something IT from my son.

He taught me pylint to be used to check my code.

That was cool.

Been super tired today, I had ok time for sleep. Hoping tonight I will sleep better.

Weight: 343.4

Posted in Fitbit, New Toys, Technical, Training, Weigh In | Leave a comment

First MRI

Had an MRI done on me today, it was an interesting experience.

I thought I was only go be gone for half an hour, ended up being two.

When I was in the device felt like a burrito getting warmed up in a microwave oven.

This was interesting.

Weight: 346.6

Posted in Training, Weigh In | Leave a comment

Couple Advances In Script

I was able to figure out how to subscribe in Paho-MQTT multiple Topics, I am pretty sure I can have it inspect for stuff coming in from a independent units and even Zigbee via Home Assistant.

So it may be possible to have 1 monitored script to watch all this.

Just to confirm, I was able to view Home Assistant submitted mqtt messages over multiple topics.

So I may be able to do more.

Getting cool.

Another confirm, yesterday I got my fitbit steps in.

Weight: 342.8

Posted in New Toys, Technical, Training, Virtualization, Weigh In | Leave a comment

Script Working Well

Posting a bit early today, gonna have a busy evening. It looks like I will make my fitbit goals so I will log as such. Will update this post if anything changes.

Looks like my scripts are working. Going to keep an eye on it remotely to see if it produces the right results.

Watching son run a big race today, Nike Twilight, hoping he crack 19:30 today.

Last of two weekend races.

Weight: 343.2

Posted in Fitbit, Technical, Training, Weigh In | Leave a comment

Its a Trap

Insert Star Wars Meme Here

Anyway, I was going to edit a media wiki entry. But I got an Exception TypeError.

I know this is related in the upgrade from CentOS 7 to Rocky 9. Basically the PHP version was not compatible with the Mediwiki version.

So I know I have to upgrade media wiki. It is 10:25PM, and I am tempted, but I know when I do the upgrade, things gonna break.

Anyway, I had a really long day yesterday. So boss let me cut out early so I did.

But I was still sleepy at the end of the day.

I am rethinking my scripts to broker 433Mhz RF devices.

I made some good headway. Drawing it out really helped

I got it sending email and zoneminder. Also getting it to log to a Maria DB server. I ran out of gas and had to rest.

Weight: 344.0

Posted in New Toys, Technical, Training, Virtualization, Weigh In | Leave a comment

Replacing UNO with Tasmota Devices

I actually got quite a bit of amount of steps going back and forth from the mailbox trying to get Tasmota to see the mailbox getting opened.

Recall I have these UNO boxes sensing 433Mhz

But recently moved to Tasmota

This new Tasmota system is better, but the older Uno are more established.

At least they all talk MQTT just that they have different protocols.

The uno simply sends what just sent a message, say FRONTDOOR or MAILBOX, the code has it preprogrammed in and makes it easier.

The Tasmota payload is a JSON structure. It works well with Python but I only need to know the data.

Anyway, tomorrow I will take a stab at converting the door script. Yesterday I mentioned how I was able to have python as a systemd unit (service)

I am also moving stuff out of my home to completely run in /opt.

Lot of changes.

Weight: 344.4

Posted in Arduino, New Toys, Technical, Training, Virtualization, Weigh In | Leave a comment

Python As A Service

In Centos 7 I have been running screen on reboot (via cron) to start a script like this.

@reboot screen -d -m -S pir /opt/bin/myscustom.py

But wanted to be more modern and use systemd unit files and as of Rocky 8 (Recall I am moving things to Rocky 9) I can run a python script as a systemd service and output the contents to a file for tracking.

So I went off and created a system service (unit) file

vi /etc/systemd/system/mycustom.service

In it I placed

[Unit]
Description=Home Node PIR MQTT
After=network.target

[Service]
User=larry
Group=larry
Type=simple
StandardError=journal
StandardOutput=journal
StandardInput=null
StandardOutput=file:/var/log/myscustom/stdout.log
StandardError=file:/var/log/myscustom/stderr.log
ExecStart=/opt/bin/myscustom.py

[Install]
WantedBy=multi-user.target

Note instead of file I could have used append so the file just grows instead of getting replaced everytime things are restarted.

I did create the folder and chown it with larry:larry but it created the files on restart with owner root so I chowned the files themselves afterwards.

Another change is the python script itself

I need to add a -u to the first line like this

!/usr/bin/python -u

That tells python to not buffer standard out and send it immediately, that way systemd can see it.

On the personal front, son had his Senior day for cross country, where they celebrate the seniors. He did OK today, last year rocking something under 21 would be awesome but I guess I expect more.

Not getting my steps in, been super tired. I need to sleep earlier.

Weight: 344.2

Posted in Fitbit, New Toys, Technical, Training, Virtualization, Weigh In | Leave a comment

Guilty of Little Documentation

Last box I need to migrate has so much custom python scripts. Kind of a pain to convert.

Some stuff ran, but had libraries that produced different results (paho mqtt).

As I was going through this a lot of this is so deprecated, I am just picking one or two and scrapping the rest.

Weight: 342.8

Posted in Technical, Training, Weigh In | Leave a comment