A $5 Motion Sensitive Coca Cola Night Light (That Can Double as a Soap Dispenser)


Here’s a simple project.

Home Depot is currently selling this “Soap Brite Lighted Soap Dispenser” which acts as a night lite, lighting up the liquid soap with one of 7 colors when it senses motion.

It will set you back a grand total of $3.88 plus tax. The led lighting is contained in the base and shines up through the plastic container to illuminate the soap. There’s a button on the base which can rotate through the seven colors. By itself, and for the cost, the dispenser is pretty cool, but you can give it a simple upgrade by replacing the container with a one pint Mexican bottled glass coke bottle. I found mine at a local grocery store for $1. The dispenser’s container simply lifts off the base (no screws). The base fits the pint Coke bottle exactly. Find a pump that fits the Coke bottle, and it can continue its use as a soap dispenser (I was able to snatch one from another soap dispenser we had lying around which fit perfectly).

No pump ? Than simply put it on a shelf with the cap back on and you have an interesting night light!

Caution: If you are going to use the glass Coke bottle as a soap dispenser, be careful as it is a little top heavy and may fall if one is not careful when using. Suggest using superglue to glue the base. Not recommended for kids.
Please follow and like us:
error0

Easily Remove GPS Location and Other Information from Photographs Using Exiftool

Most cell phones nowadays stamp each digital photograph with the GPS coordinates of where the photo was taken. If you upload this to Google Photos, google will happily pinpoint the location on Google Maps with a click or two (and some applications may show this information when you view the photo). In addition the photograph will have other metadata such as camera make and model, etc. If you are going to share the photo with others or post it publicly, many times you don’t want this information, particularly, your location information, posted to the web.

Exiftool offers an easy and straightforward method of stripping metadata and is available for Windows, Mac, and Linux.

Make sure you have a backup of all of your original photos with all metadata before you start and only strip information from a copy of the photo (although by default it also makes a backup of the photo, adding “_original” to the extension).

  1. View All Meta Data in Photo

  2. On command line (in windows use CMD):

    This produces output like this:

  3. Remove Only the Location Information from Photo

  4. Remove Location Plus (caution, will strip other useful information)

  5. Adding an extra flag makes sure other xmp information that may contain gps location is also stripped. Unfortunately, this will also remove other information you may want to keep:

  6. Remove All Metadata from Photo

  7. Type the following

    Same photo as above, but with ll exif metadata information stripped, leaving only file and technical information:

    For the full set of features and documentation see the Exiftool website.

    Please follow and like us:
    error0

Using WhatsApp on A Tablet or With Facebook Portal ? 2 Things You Should Know

WhatsApp

WhatsApp

  1. You Don’t Need To Provide A Mobile Number (but you do need to install the app)

    It’s common belief that you need to verify WhatsApp on a cell phone. When you install WhatsApp it requires you to give it a phone number and it then texts you a verification code. But in fact you can use a Google Voice number or have WhatsApp provide the verification by voice call, allowing you to use a landline. So if you don’t have a cell phone or one that doesn’t permit installation of apps, you can install WhatsApp on an Ipad or Tablet and use Google Voice or your landline to verify.

    Here are the steps to use a landline:

    1. Install WhatsApp on Your Ipad or Android Tablet
    2. When it asks for a phone number give it your land line number.
    3. It will immediately attempt to send an sms text message to the number. This of course will fail. Below the number you will notice two selections “Resend” and  an option to permit verification by a voice call. These icons will be greyed out until the countdown timer next to them reaches zero.
    4. When the countdown reaches zero, and the voice call selection becomes available,click it.  The phone of the number you provided will ring with an automated call providing you the verification code.
  2. WhatsApp Device Is Required to Be Online for WhatsApp Web or WhatsApp Portal

  3. That is, you can’t install WhatsApp on your mobile phone, setup your WhatsApp account, and then uninstall WhatsApp and expect things to work. This is something you might do if you don’t want to install WhatsApp on your phone but want to use WhatsApp on the web ( or set up something like the Facebook Portal which uses WhatsApp to make video calls). Unfortunately it’s not going to work.

    Please follow and like us:
    error0

Hacking the Atomi Smart Wifi Plugs and How to Identify Whether IOT Firmware Can be Flashed

The ESP family of wifi chips is manufactured by Espressif. The chips are ubiquitous in Chinese manufactured IOT devices. The firmware on many of these devices can be replaced by open source alternatives like Tasmota or Esp Home. So how do you know if a device advertised as being Wifi-enabled is able to be flashed ? You can try to find reviews but the average reviewer doesn’t flash firmware. In addition, many devices are popping up all the time so that it may be some time before some hacker opens up the device to find out.

I was in Aldi’s a few days after Christmas and saw a package of two outlet plugs branded “atomi” and marketed as WiFi-enabled Christmas light timers:

The package was marked down to $12. One was an indoor plug with two 2.4 integrated USB ports as shown above, the second was a heavy duty black outdoor plug:

 

 

A quick search revealed that Amazon was selling the inside plug alone as the “Atomi Smart Wifi Plug” for $20.

 

 

The biggest question was were they able to be flashed with Tasmota ? Based on the little known name I guessed these were probably ESP8266 type chips but none of the reviews mention being able to flash the device firmware. A google search did not reveal anybody flashing either of these plugs.

 

 

Looking at the back of the package reveals that the plugs are ETL certified for the United States (equivalent to UL approved, good!) with an Intertek Number of 5001673.

 

 

There was no FCC ID but the bar code stated it was “13820-Smart Plug Holiday Pack”.

 

 

Going to the Intertek website for ETL Listed Products and typing in “5001673” revealed nothing. But plugging in the model number “13820” produced a couple of listings with the first being by “SHENZHEN FENERGY TECHNOLOGY CO., LTD” conforming to  a UL standard.

 

After some googling to find the FCC ID number, I tried “fcc model AT1217 SHENZHEN FENERGY TECHNOLOGY CO., LTD. – Shenzhen, Guangdong CHINA” and came up with the listing.

Photos and other information confirmed it was the same plug:

 

There’s also a “Letter of Declaration Model Difference” stating that AT1217 and At1249 models are the same (google reveals that AT1249 is sold at Home Depot also as an Atomi Smart Wifi Plug )

 

Clicking on the “internal photos” link in the FCC document shows the inside of the plug and reveals this interesting photo:

And another photo of the other side of the chip showing the four contacts required to flash:

 

 

Here’s a drawing found online:

So I bought the outlets, brought them home and opened up the interior one (removed the four screws on the bottom and wedged open the case).  I found the TYW2ES chip but the contacts were oriented down and not exposed: 

 

A quick google of “TYWE2s” shows a tutorial on the Tasmota website flashing an outlet having the same wifi module using the hard wired method.  I tried to grind through the bottom of the white outlet with a rotary tool to expose the contacts ( a dangerous and unnecessary [as explained below) step – do NOT do this!):

 

 

 

and to flash it with an FTDI usb/serial tool.  But since I didn’t want to take the time of properly soldering the contacts and/or using a jumper, it was an exercise in frustration. I finally remembered that there were some successful OTA (over the air) methods of flashing these chips, did a google search and found TUYA Convert. I quickly confirmed that the TYWE2S chip is a TUYA and proceeded to flash using the TUYA Convert instructions. Since you need to do this in Linux, I first tried running TUYA Convert in Windows’ WSL but kept getting an error questioning whether my Wifi adapter could be used as an access point. I then ssh’d in to a headless Raspberry Pi I had in the other room and ran the scripts on that machine.  I got the same error.

 

 I then found this note on prerequisite steps for  a pi, followed those steps, then the main installation steps, and it worked like a charm!

Here is the linux session running TUYA Convert:

Both outlets were easily flashed within 30 minutes without attaching any wires or having to open the devices!

 

The Configure Module in Tasmota should be set as follows to allow the manual switch on the plugs to work:

 

 

 

 

 

 

Please follow and like us:
error0

Errors When Upgrading Ubuntu from 16.10 (Yakkety) to 18.04 (Bionic)

I had an old virtual machine that I wanted to upgrade from 16.10 to 18.04

Since Yakkety (16.10) is no longer supported I followed this guide and updated my source list:

I then did the standard commands to upgrade:

However I got this following error after “apt upgrade”:

To fix this I did the following:

Then did the upgrade again:

Success !

Please follow and like us:
error0

A Quick and Dirty Web Maintenance Page Using .htaccess

Sometimes when working on a web site you need a quick and dirty “This Site is Down” Maintenance page. WordPress or other similar software may have this feature built-in or through a plugin, but sometimes you may need to put up a page while moving files around using ssh or scp/sftp/ftps.

If you use Apache or an Apache compatible web server that uses .htaccess, the easiest way to generate a  maintenance page is to combine the deny/allow directives with a custom 403 page which can be written directly in .htaccess. The directives will allow only your IP address to work on and view the web site while everyone else will see the maintenance page.

This method requires no php or other separate scripts, and no redirects.  Enabling the mode is simple – just remove (maintenance mode) or add (go live) the hash comment from two lines ( 21 and 23 in the example below).

Follow these simple steps:

  1. Using Winscp, ssh, or other similar utility login to your website server, and open .htaccess file located in your web root.
  2. Add the following lines to the top of the .htaccess file:
  3. Ask Google “What is my ip address ?“. This is your workstation ip address, select and copy it.
  4. Replace XXX.XXX.XX.XXX with the IP address you copied in the prior step.
  5. Edit the example to put in your own html code and save whatever picture you’d like to use as your background as “background.jpg” in your web root. Make sure any quotes on the ErrorDocument line (line 23 in the example) are  single quotes except the outer ones. Also the entire ErrorDocument line should all be on one line with no carriage returns (it will be displayed in the example as multiple lines but that’s just the presentation for this post, the code itself is all one line). 
  6. Save the .htaccess file.
  7. That’s it. To enable maintenance mode, uncomment line 21  “deny from all” and line 23 “ErrorDocument 403”. To disable maintenance mode and go “live” comment those same two lines out.
  8. Note that if you get an “Internal Server” error you have a syntax error in your .htaccess file. Fix and try again.

 

 

Please follow and like us:
error0

Answer Skybell Automatically on Android Using Tasker – Electronic Door Viewer

Skybell and other video doorbells ring your phone and allow you to see who’s at the door. But they require you to click on the notification and by the time you do that a minute or two may have gone by. In addition you may want to hang a tablet from a wall to act as an electronic peephole, allowing you to see at a glance who’s at the door and to communicate with them.

If you have a Skybell you can do this with Tasker.

  1. Make sure you have installed your Skybell app.
  2. Go to the Google Play store and purchase and install Tasker. Tasker allows you to automate tasks on Android devices. Tasker’s currently $3 and well worth the price.
  3. Also from the Google Play store install “Notification Listener” a free plugin for Tasker.
  4. In Tasker, click on Profiles tab, then the + sign, and add an Event, Tap “Plugin”, then “Notification Listener”, then “Notification Listener” again:
  5. Click “Configuration”, and change the event to “Notification to Any”, Click on the App button to select the Skybell App, and change the “Text” option to “You have a visitor at your door.”, settings should look like this:
  6. Save by clicking on the Checkmark and exiting out.
  7. Back at the Profiles screen, click on “New Task” on the dialog that pops up, name it as “Open Skybell On Ring”, Tap “+”, select “Plugin”, “Notification Listener”, and then “Gestures”:

  8. Fill out the Gestures screen by adding “%nlkey” to “Notification Key” and toggle on the “Click on notification”:

  9. Click the checkmark and make sure Tasker and the new profile is enabled. You are done. Your profile tab should have an entry that looks something like this:

    Now whenever your Skybell rings, tasker will automatically “Tap” on the Skybell notification, and the tablet should automatically open to the live streaming view of your door.

    Troubleshooting: If you are getting notifications but the Skybell app is not opening automatically, make sure you have Tasker and the event/task profile you created above is enabled, and you have permitted Tasker and Notification Listener to have access to the Android notification services (you should have allowed this during setup). If Skybell notifications are not occurring at all, try changing the tablet’s WIFI IP to a static one and use Google’s 8.8.8.8 and 8.8.4.4 DNS as described in my previous post, or uninstalling and reinstalling the Skybell app.

    Please follow and like us:
    error0

Control Almost Any TV, DVD, VHS, or Other Infrared Device By Voice

TV Photo by Creedi Zhong on Unsplash

Want to control almost any TV, DVD or other infrared device by voice ? If your device is not a newer model that offers voice assistance, you can add voice control by use of a univeral remote like the Broadlink Mini3 IR Control Hub.

These devices operate like your normal wand remotes with two key differences:

  1. Rather than having a directed beam of infrared which you must point at your device, they flood the room with infrared light so they reach all of the devices in the room that are within a reasonable distance and angle from the universal remote.
  2. They are Wifi enabled and respond to commands you issue over your network.

The simplest way of using the universal remote is to simply follow the manufacturer’s instructions and use the mobile software offered by the manufacturer. However, this will involve using the manufacturer’s cloud account which can expose your home network to vulnerabilities.

The more secure but more complicated approach which I have done is to ditch the manufacturer’s mobile app and cloud account and use Home Assistant installed on a Raspberry Pi (model 3 or higher). The steps are too long to list here, but in short, they involve using an IF This Then That (IFTTT) Google Assistant or Alexa applet to issue a command through Home Assistant to trigger a URL call to your Broadlink universal remote using the Home Assistant broadlink plugin. You will also need to setup a DuckDNS account and a secure SSL connection to your Raspberry Pi. The Home Assistant will allow you to setup the broadlink plugin to issue either one command (e.g., to turn the TV on), or several in a series (e.g., turn the TV on and switch to a particular channel).

Below are two YouTube videos explaining most of the steps other than the IFTTT setup (Note that you only need to listen to the first 11 minutes for the first video for the infrared setup, the remainder is not relevant):

To set up voice commands using IFTTT, use the Google Home Assistant applet to cause a voice command “E.g., Turn on TV” to fetch the DuckDNS URL containing your Home Assistant broadlink command.

Lastly do you have a Roku or Roku enabled TV like the TCL Roku series but it’s not voice enabled ? You can ditch the Univeral Remote entirely as well as the Home Assistant setup and just have the IFTTT Google Assistant applet recipe issue the Roku API url command directly to the Roku device’s API. Much simpler and more reliable!

Please follow and like us:
error0

Retro Pie, Mame, and Romsets

I recently installed Retro Pie on an old Zotac Nano I have:

What is Retro Pie ? It’s software that allows you to play tons of emulators of old game consoles, from home systems like the Atari 2600, Super NES, Super Nintendo, etc. to the old 70’s and 80’s arcade machines that you would find in the mall. It even has the ability to play emulators for old home computers like Commodore 64 and the Sinclair Z80.

More technically, the Retro Pie is a collection of emulators and scripts which use Emulation Station as a front end.

Here’s a secret: while the Retro Pie is mainly geared to be installed on a Raspberry Pi, you don’t need a Raspberry Pi to install Retro Pie. You can install it on any PC that has a debian based linux operating system. Since I had installed Kubuntu on the Zotac Nano, I downloaded and installed the Debian/Ubuntu PC version of Retro Pie.

After installing Retro Pie according to the instructions, adding some themes (I settled on Cabsnazzy) and a set of Xbox 360 controllers, I downloaded some individual sample Roms to test the Mame emulator, an emulator that plays old arcade type games. What I discovered was that there are several different Mame emulators packaged with Retro Pie. For example, there is “mame4all”, “Mame 2000”, “Mame 2003 Libretto”, “Advance Mame”, etc.

Not any Mame rom will play in any Mame emulator. You need to install the correct “Romset version” of the Rom for each emulator. What does that mean ? Well, apparently various people have collected hundreds or even thousands of roms for a particular Mame version, customized them for that particular version of Mame, and packaged them into a “Rom Set”. The Rom Sets for each Mame Emulator are listed here at the Mame Retro Pie Wiki. To find a particular game and what RomSet it is in see here or here to download the entire lists of games for a particular Romset.

The first test I did was to download the Rom Set for Mame 2003. This Rom Set is 0.78. The download links are found at archive.org. The non-merged set is the one that will work with Emulation Station.

For the Mame 2003 set (Romset 0.78, about 2 GB) the easiest way to download is in linux using the linux command line program “transmission-cli” which will download torrent files. Copy the TORRENT link shown on the archive.org page and use that with torrent-cli.

For example, to download the 0.78 Rom set on your linux command line type:

Once downloaded, unzip the downloaded file and move your selected roms to the correct subfolder in your Retro Pie install directory i.e., the “RetroPie/roms/mame-libreto/mame2003/” folder. Do NOT unzip any of the Roms. Copy the contents of the “samples” folder, to “RetroPie/roms/mame-libreto/mame2003/samples”.

Note that any vector type games (e.g., Battle Zone, Lunar Lander, Red Barron) should use Advance Mame 3 which is optimized for vector graphics, not Mame 2003 or other Mame emulators where they will look fairly horrible, with the vector lines being blurry and black and white. Battle Zone will show black and white instead of the green that it should like the following screen shot:

For Advance Mame, you will need to download the Mame 0.106 Rom Set as shown on the Retro Pie Wiki.

Warning: The 0.106 Romset is HUGE – about 65.6 GB zipped. Because of its size, the .106 Romset should be downloaded on Windows rather than Linux as the standard Linux zip programs do not handle multi-part zips well, and a program that does, 7Zip only works on Windows.

Once the .106 Romset is downloaded, download and install 7zip.

Open the 7zip File Manager and navigate to the Romset download folder. For version 0.106 you will see that the zip has downloaded in 70 different parts! No worries, 7zip handles these as one zip file without having to actually combine them.

Double click on the “Mame0.106Non-Merged.zip” file:

Double clicking will reveal the contents of the “combined” zip file:

Double click on that again and you’ll view the roms folder. Double click on the “roms” folder and you will see a list of the roms, most of them are zipped, but some are simply in subfolders:

While you can extract all of the rom subfolder and zips for all of the games, you can also extract only those individual games that are needed. Just drag the individual subfolders or zip file for a particular game out of the 7Zip File Manage. Do NOT unzip any games roms that are themselves individual zips as they may not work in the emulator if they are unzipped and the Mame emalutor can read the zipped roms fine. For easy transferring to a linux machine, open up a WinSCP session and drop the rom subfolder or zip file into the appropriate folder on your Retro Pie machine (RetroPie/roms/mame-advmame/). As before, the files in “Mame 0.106 Non-Merged\Samples” would be copied over to the related samples folder (RetroPie/roms/mame-advmame/samples).

That’s it – those are the basics of installing the correct romset for a particular Mame version.

Now enjoy some Mame:

Spacewar “most important and influential games in the early history of video games.”

Galaga:

NOTE: This post is for educational purposes only. The use of roms with the MAME or other video arcade emulators requires compliance with all copyright laws and licenses. Use of most Roms require an appropriate license. Read this FAQ for details.
Please follow and like us:
error0

ShareX Screenshot Tool and Torn Edge Effect

ShareX is a great free and open source screen shot tool that rivals TechSmith’s Snagit. ShareX is packed with features but not very user friendly. I wanted to have screen captures automatically add a “torn edge” effect to a screen shot similar to what Snagit can do easily. It took me awhile to figure out how to achieve the effect, and then some more time to figure out how to automatically apply it after a capture.

Torn Edge Effect

  1. Right click on the tray icon, select “Task Settings”.
  2. On the Task Settings dialog, click “Effects” under “Image”. Check the “Show image effects window after capture”. This will allow you to turn off the effect for a particular image:

  3. Click the “Image effects conafiguration …” button. On the dialog that appears, click “Add”->”Filters”->”Torn Edge”. Set the Depth to 8, Range to 5, Sides to Bottom, Right, and Curved Edges to False:

  4. Click “Add” again, then “Filters”->”Shadow”. Set those settings to Opacity 0.2, Size 10, Darkness 2, Color 165, 154, 154 (grey), and offset 5.0:

  5. If you’d like, experiment with the settings until you get the torn edge look you want.
     

  6. Make sure the Torn Edge and Shadow Boxes are checked, type the name “Torn Edge with Shadow” in the name text box in the top right, and click “Export” to export the settings to backup. Close the dialogs.
  7. Right click on the ShareX tray icon again, click on “After Capture Tasks” and click “Add image effects/watermark” to enable.

Image captures should now automatically result in the torn edge effect. You can follow the above steps to set other effects using the Image Effects Configuration” dialog.

Below is a YouTube video showing the same steps:

Please follow and like us:
error0