madebot https://madebot.com daily diy Mon, 14 Feb 2022 22:04:04 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 185483661 Reset your Honeywell thermostat Batt Lo https://madebot.com/reset-your-honeywell-thermostat-batt-lo/ https://madebot.com/reset-your-honeywell-thermostat-batt-lo/#respond Mon, 14 Feb 2022 22:01:39 +0000 https://madebot.com/?p=64 Continue reading Reset your Honeywell thermostat Batt Lo]]> Is your Honeywell thermostat stuck on “Batt Lo”? I was recently wondering why it was so cold in my house, so I went to check the thermostat. Lo and behold, the display was showing nothing. The heat did turn on if I moved the sliding switch, but the thermostat was not programmable.

After examining the thermostat, I realized that it actually takes 2 AA batteries. Go figure, I don’t recall every changing them. After removing the dead and leaky batteries, I replaced them. The display lit up but it still showed “Batt Lo” and would not let me set the schedule. After cleaning the contacts on the leads and trying various batteries I still couldn’t get it to clear. In order to get it to get rid of Batt Lo, try this:

  1. Set system switch to OFF.
  2. Located and remove the battery cover (If it’s like my Honeywell T8112D1005 use a coin on the bottom of the left-side panel.)
  3. Insert both new batteries backwards (+ to – and – to +).
  4. Wait 5 seconds. (Steps 3 and 4 are what clears the Batt Lo condition. Alternatively, you can reset the circuit breaker that your thermostat is attached to, but I found this to be easier.)
  5. Flip the batteries and install them the correct way (+ to + and – to -)
  6. Set system switch to HEAT or COOL
  7. Re-program and set the schedule.
  8. Enjoy your heat – or cold.
]]>
https://madebot.com/reset-your-honeywell-thermostat-batt-lo/feed/ 0 64
Upgrading Passenger on Ubuntu https://madebot.com/upgrading-passenger-on-ubuntu/ https://madebot.com/upgrading-passenger-on-ubuntu/#respond Wed, 02 Jun 2021 22:31:32 +0000 https://madebot.com/?p=51 Continue reading Upgrading Passenger on Ubuntu]]> I decided to upgrade the Passenger application server today on servers with Ubuntu 18.04. I ran the following in our staging environment first and after testing the app, all was well. The standard upgrade process using APT (and other package managers) for Passenger on Ubuntu and other distros is here.

sudo apt-get update
sudo apt-get upgrade

For some reason (due to repo move?), in our production environment the same result produced the following errors:

Ign:10 https://oss-binaries.phusionpassenger.com/apt/passenger bionic InRelease                           
Get:11 https://oss-binaries.phusionpassenger.com/apt/passenger bionic Release [8200 B]
Get:12 https://oss-binaries.phusionpassenger.com/apt/passenger bionic Release.gpg [833 B]
Reading package lists... Done                                  
E: Repository 'https://oss-binaries.phusionpassenger.com/apt/passenger bionic Release' changed its 'Origin' value from 'packagecloud.io/phusion/passenger' to '. bionic'
E: Repository 'https://oss-binaries.phusionpassenger.com/apt/passenger bionic Release' changed its 'Label' value from 'passenger' to '. bionic'
N: Repository 'https://oss-binaries.phusionpassenger.com/apt/passenger bionic Release' changed its 'Version' value from '1' to ''
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

In order to resolve this, you can do the following:

sudo apt-get --allow-releaseinfo-change update
sudo apt-get update

Huzzah, enjoy the latest release of your Passenger 6.0.9 install. For more detailed info, you can refer to the following issue in the Passenger github. Off to drink my coffee.

]]>
https://madebot.com/upgrading-passenger-on-ubuntu/feed/ 0 51
setup a redirect for ads.txt in nginx https://madebot.com/setup-a-redirect-for-ads-txt-in-nginx/ https://madebot.com/setup-a-redirect-for-ads-txt-in-nginx/#respond Fri, 21 May 2021 18:09:26 +0000 https://madebot.com/?p=48 Continue reading setup a redirect for ads.txt in nginx]]> ads.txt is the file that is used by ad providers to determine what ads should be served on what sites. It is a form of verification and helps to prevent fraud.

If you run your own ad waterfall, or use a third party ad provider you may have to frequently update your ads.txt file in order to keep up to date with the latest providers. Keeping ads.txt up to date ensures that you are paid for the most up to date list of advertisers and networks.

I have just updated this file manually when a new file is released. On our blog we have a Mediavine plugin from our ad provider that does this automatically, so when it changed I would just update it on our main www site. The IAB ads.txt 1.02 standard allows you a single redirect, so now that our ad provider Mediavine supports this standard I thought I would finally automate it and stop adding it to our source code checkins on our main www site. In nginx, it’s a simple redirect or rewrite.

You can add this location directive to your nginx server block config:

location /ads.txt {            
return 301 https://adstxt.mediavine.com/sites/{YOUR-SITENAME}/ads.txt;
}

Alternatively, you could add a rewrite rule:

rewrite ^/ads.txt$ https://adstxt.mediavine.com/sites/{YOUR-SITENAME}/ads.txt permanent;

Test the redirect by loading yourdomainname/ads.txt in a browser. Huzzah, yay for redirects.

If you’re not editing your web config directly, you could also use cpanel, your wordpress redirections plugin, rankmath redirections, or other admin tool.

If you want a list of more comprehensive steps to check that your ads.txt is working correctly, check out google’s admanager post.

]]>
https://madebot.com/setup-a-redirect-for-ads-txt-in-nginx/feed/ 0 48
Fix your macOS Big Sur mail.app https://madebot.com/fix-macos-big-sur-mail-app/ https://madebot.com/fix-macos-big-sur-mail-app/#respond Fri, 18 Dec 2020 22:15:11 +0000 https://madebot.com/?p=36 Continue reading Fix your macOS Big Sur mail.app]]> Why is macOS Big Sur mail.app so awful? Why can’t I find that message I know is there using search?

One of the things I’ve always loved about macOS has been the spotlight search functionality. A quick command-space, a few strokes of the keyboard, hit return, and voila an app launched or a file found. However, in recent times spotlight has seemed to get funky or unresponsive, especially when using search within mail.app.

The most annoying spotlight failures are in mail.app. I use mail.app as my main email client to pull my various gmail accounts together in one inbox. So, today I am looking for an email, I type from:person name fwd sell and it comes up with ZERO results. I try various incarnations and cannot find a stupid email from less than 2 months ago. I mention this to my wife and she tells me she just searches in gmail on the web. We use mail.app with google gmail. I’ve never used it with iCloud, maybe it’s better, same walled garden ecosystem and all y’know.

But, it SHOULD work! I give up, I type the exact same search criteria in gmail on the web and it comes up as the first result. I used to have a lot of faith in the quality of Apple software releases, but the last few release of macOS and iOS have had some annoying bugs. I still prefer the UI to desktop Linux or Windows, but…

Ok so you want solutions not complaining, so here are a few tips to maintain your mail.app and keep it minty fresh:

  • Practice good email hygiene.
    • Delete those old emails, empty those spam folders, and remove old attachments to reduce your total mailbox size.
  • Rebuild your mailboxes
    • Rebuilding your mailboxes re-downloads your email from what is stored on the mail servers.
    • Launch mail.app, select your mailbox on the left pane list and then select Mailbox > Rebuild
  • Reindex your mailboxes
    • Reindexing your mailboxes
    • Make sure mail.app is closed
    • In the Finder, press Command-Shift-L to open the Library folder and then navigate to Mail > V8 (or whichever version you are using) > MailData, then delete the following files (NOTE: I suggest backing them up first):
      • Envelope Index
      • Envelope Index-shm
      • Envelope Index-wal
    • Relaunch mail.app, click ‘Continue’, and let it import, reindex, and build new envelope index files. Be patient, it could take awhile, especially if you have 375,000 emails like I do.

Happy emailing.

]]>
https://madebot.com/fix-macos-big-sur-mail-app/feed/ 0 36
Tips for upgrading firmware on your Sony Alpha on macOS https://madebot.com/tips-for-upgrading-sony-alpha-a6000-firmware-on-macos/ https://madebot.com/tips-for-upgrading-sony-alpha-a6000-firmware-on-macos/#respond Tue, 15 Dec 2020 18:11:25 +0000 https://madebot.com/?p=21 Continue reading Tips for upgrading firmware on your Sony Alpha on macOS]]> I recently checked for a firmware update for my Sony Alpha a6000 (ICLE-6000) camera. It’s been a great small travel worthy camera for me and despite being on the market so long, Sony still sells it. My camera was still on the v3.20 firmware which was released 7-26-2016, so I wanted to update it to v3.21 which is dated 03-19-2019. The v3.21 firmware improves the stability of the AF (Auto Focus) operation. In brief testing, it appears to me to slightly improve the speed of the autofocus.

Of course, if you look for the the v3.21 download for macOS, it says that Big Sur is not supported. As luck has it, I’ve recently upgraded to Big Sur, so I went to an old macOS 10.15 laptop to do the upgrade (though I could have used a PC as well). So even with all that and following the Sony instructions, it’s not straightforward. You put your left foot in, you switch the camera on, you put your right foot in, then you shake it all about. A bit of hokey pokey is involved. My firmware update failed to complete several times, but I’m finally on v3.21. Most of the following should apply to any Sony Alpha firmware update on macOS.

Warning

Firmware upgrades can be risky, so take proper precautions and do not stop the process midway through. I take no responsibility if your brick your firmware or your camera catches on fire.

Here are a few of my extra tips to get you there sooner:

Tips for upgrading Sony Alpha a6000 firmware on macOS

Here are a few of my extra tips to get you there sooner:

Materials

  • Computer with macOS 10.15
  • Mini-USB to USB cable
  • Sony a6000 camera

Tools

Instructions

    1. Plug in your computer if it's a laptop (or desktop :). Under your Mac System Preferences > Power, set your Mac to "Prevent computer from sleeping automatically when the display is off".
    2. Set your display to not turn off.
      Make sure you have a good micro-USB to USB cable.
      Download the Driver Loader. (If you are on macOS 10.15)
      Download the v3.21 firmware update.
    3. Make sure your camera SD card is removed and the camera is disconnected from your laptop.
    4. Make sure your camera battery is fully charged.
    5. Open the folder you unzipped for the Driver Loader (DL1101_1910a). Here you'll see the DriverLoader_1015 icon.
    6. Open the firmware folder, then open the 'Resources' folder.
      Drag and drop the SystemSoftwareUpdater icon onto the DriverLoader_1015 icon.drag and drop sony v321 firmware for a6000
    7. Click OK to the security prompts (in both English and Japanese), and check System Preferences > Security & Privacy >Allow to allow "Sony Imaging Product & Solutions Inc" and authenticate using your password.
    8. Follow the prompts. First plug in your USB cable with your camera on.
    9. Then it tells you to turn the camera off.
    10. Make sure the camera is in USB Mass Storage mode, then turn it on again and plug it in again.
    11. Click 'Next' and start the updater. The firmware update will take a very long time. The red light should be on the underside of the camera. I had multiple failures but it went through on the 4th time after adjusting the computer power settings as stated above.

Whew, pop your SD card in and enjoy your new camera firmware. Do a funky dance. Happy auto focusing.

]]>
https://madebot.com/tips-for-upgrading-sony-alpha-a6000-firmware-on-macos/feed/ 0 21
blocking bad bots in nginx from xmlrpc.php https://madebot.com/blocking-bad-bots-in-nginx-from-xmlrpc-php/ https://madebot.com/blocking-bad-bots-in-nginx-from-xmlrpc-php/#respond Tue, 15 Dec 2020 07:06:31 +0000 https://madebot.com/?p=9 Continue reading blocking bad bots in nginx from xmlrpc.php]]>

After upgrading from PHP 7.2 to 7.4.x, I was taking a look at my graphs in new relic for my wordpress blog and found a high number of E_WARNINGs for //xmlrpc.php. It’s a result of bots hitting a non-existent URL at //xmlrpc.php – note the extra slash in there. The default nginx behavior is to merge double slashes, which normally is fine.

In this case, I added a location block with //xmlrpc.php to block it but I noticed it was not working (hitting that particular URI still returned with a 405 Method Not Allowed instead of a 403 Forbidden). It turns out that I needed to add ‘merge_slashes off;’ and then it worked. Voila, lots of spurious errors removed from my logs (and from hitting PHP). Note that most of the xmlrpc functionality has been supplanted by the newer WordPress REST API, so you likely do not need it enabled.

Error graph showing bot or erroneous access to //xmlrpc.php
merge_slashes off;
location = //xmlrpc.php {
    deny all;
}

If you want to use a plug-in, you could search for ‘Disable XML-RPC’ in the WordPress plug-ins repository or install WordFence. Buh-bye bad bots.

]]>
https://madebot.com/blocking-bad-bots-in-nginx-from-xmlrpc-php/feed/ 0 9