Fixing an Accenta/Optima Alarm Power Failure Troubleshooting

A long time ago our alarm box died and I thought it was time we diagnose an fix the issue.


We will be opening a delicate box with potentially live mains power and could cause damage to yourself or the panel.
Accenta Alarm Box with isolation switch above and LED light to the side.
Accenta Home Alarm Control Box (left)

As you can see, although our isolation switch is set to ‘ON’ the power light on the alarm box is not illuminated. This may be because,

  • The battery in the alarm has died.
  • A fuse in the alarm box has blown.
  • There is a fault with the incoming power to the alarm box.
  • There is a fault with the main board of the alarm box.

We know that there is no fault with the existing setup because the alarm used to work, so we can start to diagnose our four potential issues. I’ll also teach you how to reset your panel.

Opening the Panel

This step is the easiest but can be daunting for some. Remember, safety first. We will be dealing with a panel that may be receiving mains voltage.

Accenta / Optima alarm panel tamper switch

When we open the box, there is a small spring that pushes against the door, this little spring ensures that any burglars who attempt to open the panel, trigger the alarm. As our alarm is not working, nothing will happen but if the alarm does sound, then it may be a sign that your panel does not have a power issue, consider resetting your alarm. Unscrew the two front facing screws. Note that from here on out, experienced competent people should continue.

Accenta / Optima alarm control box with bottom section removed
Accenta / Optima alarm control box with bottom section removed

Now that we have taken the bottom section off completely, we need access to the top of the main board as well. There is a fuse we need to test in the top half of the alarm panel so we’re going to remove the top half as well, this bit is just as easy as the bottom half, but there is a speaker attached to the housing, we can remove the speaker by unscrewing the terminals or do what I did and simply let the top half dangle by its wires (lazy but effective).

Accenta / Optima alarm box completely opened exposing the components inside
Accenta / Optima alarm control box completely opened

Testing the External Power Supply to the Box

(If you are following along and have an Optima remote alarm panel, you may  need to find a box similar to mine, but it does not have any controls or lights - its also likely that your remote panel is not illuminated and the screen is off if it is a power issue.)
Power Light Not Illuminated

Firstly we need to test that the incoming power supply is working, this is where our AC Voltage tester comes in (fear not if you don’t have one but do have a voltmeter).

VoltAlert Wand

Using this wand we can see if there is power coming into the alarm. (If you don’t have one of these and are following along at home, you can set your voltmeter to AC or ṽ and place your black lead into the COM jack and red lead into the VOmA jack and when we open the alarm panel later put your test leads on the incoming supply chock block above the transformer, using the left brown and blue wire screws)

Place the wand near the incoming mains wire, if the wand sounds and flashes, congratulations. We have determined that the alarm panel is receiving power to its transformer.

VoltAlert want flashing and sounding with highligted testpoints for positive and negative terminals for voltmeter testing.

If there is no power, consider using a voltmeter as explained above to verify. If there is still definitely no power then a fuse may have blown in the isolation switch or the ring main RCD may have tripped, so consider diagnosing if they are the issue.

Testing the Alarm Battery

If you think that the Accenta / Optima alarm has stopped working due to a battery failure, we can test the battery by connecting test leads to the battery terminals on either side of the battery block or on the battery directly, you will need to turn off power to the alarm so that we don’t get the feed in voltage from the board. Do not put your voltmeter test leads in the red highlighted section. Make sure to set your voltmeter back to measuring DC voltage if you set it for AC earlier. Place your test leads on both screws on the green highlighted area.

Alarm Panel Power Block

If you don’t get a reading or a low reading (3V or less) then your alarm battery may have ran out because of power failure. If your battery reads ~12V then it is a good indicator that your alarm panel is faulty and will need to be replaced entirely, but I would suggest you check the fuses before doing so to verify.

Testing Fuses in the Accenta / Optima Alarm Box

If you have verified that the incoming power is working and your alarm battery is depleted then a fuse is a most likely cause of the alarm failing.

To test the fuses, you need to set your voltmeter to continuity mode and then test each side of the fuses contacts. Make sure the power is switched off before and during testing any fuses. If any are blown, replace like for like.

highlighted alarm panel shows red boxes highlighting fuse locations
Accenta / Optima alarm panel fuse locations

The fuses are as follows, from left to right; –

  • RKP or Remote Keypad
  • Internal Speaker
  • Bell / Strobe
  • Battery
  • Transformer

Resetting the Accenta / Optima Alarm Panel

To reset the alarm panel, remove power to the panel and short the SET output to the left PA input terminal. Then turn on the alarm and allow it to power up completely. After a few seconds, you can then switch off the alarm once again and remove the shorting wires. Make sure to replace any wires previously installed and then power up the unit again, the default 0123 code will now have been restored. Beware in doing this, you reset any zones, such as fire zones will have been reset.

Unlocking BOOTLOADER on HTC devices

When rooting or developing apps on your android, you may need access to the bootloader to install custom roms or recovery menus of your HTC, this is relatively simple compared to some phones, HTC comes with it’s bootloader locked, so in order to unlock it, HTC has a special and useful website, HTCDEV.COM to unlock bootloader and give you a key to unlock it. Unfortunately when unlocking bootloader, you also ‘factory’ reset your phone, so make sure to take a backup using an app, or HTC’s own backup service.

Before I begin I should note that unlocking bootloader on your HTC, or indeed other phones, tends to void the warranty, so follow at your own risk, but I myself was completely able to install SuperSU and TWRP Recovery, without problems.

First, you are going to need a few things,

  • HTC’s Sync Manager, for HTC’s drivers for your phone, this also may come in handy for backing up any photos or songs that you may have on the device.
  • A HTC phone with cable and a computer that will allow you to install programs. (It should also have a USB port)
  • An SD card, When you install your new rom, root manager, or both, you are gonna need somewhere to put it for your phone to load it (NOT needed for unlocking just the bootloader)
  • Android SDK tools, When using the fastboot binarys, it is required that these tools be installed, particularly adb.exe and two dll’s AdbWinApi.dll and AdbWinUsbApi.dll . these are found in the \platform-tools directory of your SDK.
  • Fastboot binarys, (they will be explained later)
  • A folder to collect all your files.
  • USB debugging enabled on your device, this is usually Settings > Applications > Development > USB debugging for HTC’s.
  • Unplug your HTC from a pc If it is plugged in, make sure to have a considerable amount of charge, such as 50%.


  1. First, your going to need an account on HTCDEV.COM, Beware not to use a throwaway account as they will email you your unlock code as an attachment!
  2. Now you need to download the essentials, HTC Sync , Download SDK tools (Scroll down to Other Download Options > SDK tools only ) and java if you do not already have that installed (if no make sure to install this first) Install all of these programs and move to the next instruction.
  3. Now you have them installed. go to HTCDEV.COM and sign in, click on unlock bootloader > get started. (Or click here make sure you agree to any terms and conditions and licence agreements. Select your device. Or click ‘All Other Supported Models’ from the dropdown menu. Proceed to step one. (make sure to accept the legal terms)
  4. You should now be at the unlock instructions (here) and scroll to set 4, download the binary’s for your system, (for my case windows) and save them to a file on your desktop called ‘fastboot’ (or you could use  a similar name)
  5. navigate to where you installed the android sdk tools, then go into the /platform-tools folder, and copy adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll, these are usually together and copy them to your ‘fastboot’ folder. See below
    adbNow you need to add the binary file called ‘fastboot.exe’ that you extracted from the zip file in step 4.
    fastboot exe
  6. You now have all the files necessary to get your fastboot code. now press the WIN + R key on your keyboard and type ‘cmd’ in the run box then press ok, then navigate to where the fastboot file is located. for example if fastboot is located on your desktop then type: (remembering to replace ‘yourname’ with the name of the user)
    cd /users/yourname/desktop/fastboot
  7. Now you are at the correct location, you need to power down your phone, press and hold the volume down button, then while still holing that button down, press the power button, you should see a white screen with a list of options, navigate to the ‘fastboot’ option (if your device boots normally you need to go to settings > power > fast boot and deselect the checkbox for fastboot as I did). Select it using the power button, plug your phone into your computer and you should see ‘FASTBOOT USB’ highlighted, in the cmd window you created, type ‘fastboot oem get_identifier_token‘ as specified by this page on the htcdev website. You should see an ‘identifier device token’ (If you see <waiting for device> you have not connected your phone to the computer, or you have not got adb.exe and it’s dll’s in the same folder with fastboot.exe) you need to right click and select mark, click on the left arrows of ‘Identifier Token Start’ and then SHIFT + CLICK the right arrows of ‘Identifier Token End’ and right click to place them in your clipboard, then paste the code into htcdev’s box, on page 2. Be sure to include the device token identifiers. (In my example the token is removed) Include the yellow text and token
  8. You should then receive an email with an Unlock_code.bin attachment, place that in your fastboot directory where you keep adb.exe and fastboot.exe and in the command window type ‘fastboot flash unlocktoken Unlock_code.bin‘ to unlock your device, you will then have to operate your phone to select yes to unlock bootloader, be sure to use the volume keys to move to yes and the power key to select. Your device will now return to ‘factory’ settings. (Note it takes a couple minutes to reboot)
  9. Use HTC backup to restore your phone. Or one of your custom apps that you selected at the start of the tutorial.
  10. You have now unlocked bootloader.

Note: If you have not been able to unlock the bootloader on my tutorial, try following HTCdev’s tutorial.


Congratulations! you have now unlocked bootloader on your device! I have used this method to unlock my HTC Desire 610, (using the ‘All Other Supported Models’ dropdown at the start of HTCDev’s website).

If you want to root your HTC, click here

Using Hashlib to Securely store user passwords and credentials.

What is hashing?

Hashing a password means that users cannot have their passwords compromised when a database engineer is reading cleartext in user databases (to a degree, the passwords could be decoded, but hashing them makes them illegible to someone who is not doing anything extensive). And also prevents hackers from reading passwords in plain text and can be compromised by collision attacks.

Additionally when hashing a password a salt may be added to the password, this prevents a database from being attacked by dictionary attacks.

Why Hash Passwords?

Storing User credentials in Plain Text is generally as bad practice as it allows anyone who reads the file (or computer) to see the password, username or any other credential without any sort of protection, In some cases it is against the law, such as PCI SSC Data Security Standards which handles debit and other card types. The solution to this is to Obfuscation in the form of hashing. Hashing a password makes a standard password seem completely random.

How hashing works

When a user signs up for a website or any other form that requires secure credentials, such as a password, username, email address or address, that user will fill in a form that will ask these credentials, then the web server will both hash and store the hash, the server will ‘throw away’ the original password and keep the hash. In a more secure environment the user may also be given a salt, this may be unique to the user or unique to the application (The user will not know the salt, the salt is owned by the server and will be kept secret.). When hashing both the password and salt will be combined and hashed.

How to hash a string in Python

This tutorial uses Hashlib as its hashing encoder which uses the ever bug free OpenSSL…

First we need to import hashlib and encode the input, then finally we need to check for a match.

Raspberry Pi – PHP permission File Problems Solved!

I recently installed php, but when I was unable to save files, I was very stuck, and that’s why I’m posting it here, I want to tell anyone who Googles this problem to find this solution.


The problem was when I used an fopen and fsave within php, the file would always ‘die’ as in the open or die within php. The solution is below

Firstly I looked for the Environment user in phpinfo() in my case it was
[box type=”shadow”]www-data[/box]
and then I simply typed this
[box type=”shadow”]chmod 777 -R www-data /var/www[/box]
that, in its simplicity is the solution, but I am thankful that I have found the solution!

To create a phpinfo you need to create a file in your root and insert the following code

and save it as phpinfo.php or whatever you choose, I saved it in my root but you can save it wherever you want, then I browsed to the environments section and that gave me the necessary information for me to create the solution.

Why this works

The problem was that php did not have enough permissions to write to the folder. by giving the user www-data full permission i.e. 777 it can now read write and execute without a problem!

here is what php looks like when you do phpinfo

phpinfo() user sample on Raspberry Pi
phpinfo() user sample on Raspberry Pi

you can check a file exits and is editable with this code

Now you’ve finished you can celebrate! here is a song (this is mainly so i can test embedding :P)