Galaxy Dimension G3-520 Intruder Alarm Upgrade Reduces Wasted Energy

Galaxy Dimension G3-520 Intruder Alarm Upgrade Reduces Wasted Energy

I recently replaced my current intruder alarm system with a Galaxy Dimension G3-520. These alarm systems are quite advanced, professional intruder alarm systems made by Honeywell and from hardware design and overall architecture are most definitely on the professional end of the scale. On the second-hand market (aka e-bay) they are not very expensive and are still relatively modern systems.

This is also a very “hackable” system making it friendly for DIY’ers and IoT systems and experiments and stuff. I do plan to write some other, possibly more interesting articles about this system and its overall hackability, but I thought I would start with a simple one, the mains transformer – which actually sucks! Here is why…

One of my first observations when running the panel on my desk was how hot the mains transformer was running. I measured it at around 55 degrees Celcius. Now with the lid on, and with the panel installed in an enclosed space, this is not ideal. It was getting hot enough that I thought there was something wrong with the transformer. I bought a second panel and transformer, and low and behold the transformer was just as bad.

Looks and feels good quality, but performs quite badly

The transformer is an Iron Core transformer, typical construction that most people are familiar with, and these types of transformers are known to have some inherent inefficiencies. The quality of the design and construction of the transformer play a big part in how efficiently the transformer performs.

There are two sources of loss in a transformer. The first is known as load loss and is as a direct result of resistance in the copper wire that makes up the transformer windings. Cheap copper alloys have higher resistance generally, as you draw current through the wire, heat is generated as a result of the resistance in that wire. The second source of loss is Core Loss, which is where the transformer consumes power it’s self, even when no load is present. The heat generation is caused primarily by resistance in the iron core of the transformer. The transformer in this panel suffers from both problems quite severely, its a poor quality transformer.

I did not want to install the panel with this heat-generating cheap-ass transformer, so I decided to fix it. I had two options, replace with a Switchmode or replace with a better quality passive transformer. Switchmode PSU’s are excellent for high power levels and small spaces, but they do suffer from power losses too. Moreover, there is the question of long-term reliability which I feel would be a problem for this application; there is nothing so simple and reliable as a transformer.

So to fix this in my panel, I have replaced the transformer with a toroidal type. Toroidal transformers are a better design and inherently have much lower core losses than a more traditional transformer. A good quality toroidal transformer should also not suffer load losses if they are correctly rated.

VTX-146-080-218 Transformer 80VA 18VAC x 2

The panel is rated for 1.2A and 2.5A in its power and aux circuits, and needs to charge a Led Acid battery too, there are three 1A fuses and one 1.5A fuse on the board. So the power consumption of the panel and the accessories it can power from Aux 1 and Aux 2 totals about 44 watts (3.7A * 12V), and then you need at least another 18W to charge the standby battery so we are up to 63 watts of power. To give me about 20% headroom, I chose a transformer rated at 80W. Its an 80VA 18-0-18VAC secondary transformer made by a company called Vigortronix, part number VTX-146-080-218. You can get this from Farnell, or as I did, from an e-bay seller called Spiratronics, It cost me £23.50 shipped and included the mounting kit needed for a simple installation.

Drill a 5mm hole, and deburr. Make sure no metal fillings are left inside

To fit the new transformer was as simple as drilling a hole in the right place, making sure the transformer does not hit the two studs that fixed the old transformer to the chassis and wiring the transformer. Wiring is dead simple, see the image below.

Wiring up before bolting down

Primary side, you need the two windings in series for UK/EU and parallel for the US. For the UK, connect the grey and purple wires and insulate, connect the brown and blue to the (L)live and (N)neutral respectively. Secondary side, you need the two windings in parallel, so connect black and orange into one of the AC terminals on the PCB and connect the Red and Yellow wires and into the other AC terminal on the PCB.

Transformer installed and wired ready to go

The result. A transformer that does not get hot at all; it’s cold to touch after a week of running the panel and some attached peripherals. I have not measured it precisely (I may well do that at some point for the academic exercise), but basic measurements suggest there was around 3W of power loss in the old transformer with barely any load, that would be around £5/year in energy being wasted, not much but not trivial either. The significant benefit for me is that the panel is no longer generating the kind of heat that can build up in a closed space, its comforting to know that energy is not being wasted too and overall it just feels better, the transformer is no longer “just good enough.” its now correctly specified and just feels more professional.

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.

Huawei 5G Security Ban – I mean the US-China Trade War!

Huawei 5G Security Ban – I mean the US-China Trade War!

Being someone who has a reasonably good grasp of technology, I found it very strange that Huawei is banned from selling 5G networking technology into the US market. The official line from the US government was “China could have back doors into these systems which would create a national security risk” – that’s a great way of scaring people in the general population, but it did not make sense to me from a technical standpoint.

In practice, its quite challenging to sneak stuff like that into a system and hide it away, or to look at it another way, it’s quite easy for the buyers of the equipment to apply more diligence in its inspection and security assessments to avoid such a risk. So I have always had my suspicions about the real reason.

So turning the cynical part of my brain on, I start to think about the world stage for big Chinese tech companies, because they are beginning to gain ground globally, or at least are getting big enough to challenge the USA supremacy in the tech business. The USA is accustomed to being the only home of tech giants. But with the rise of companies like Huawei, Alibaba, and a few other rising stars, it is probably reasonable to think that the US might be getting a bit concerned about their global market stronghold. One aspect of the US economic domination comes from its ability to stay ahead of the game in tech, with the glitz and glamour of the Silicon Valley showboat (the Hollywood of the tech industry) being the shining source of all innovation in tech – at least that is what the marketing suggests.

Anyway, I read today that Donald Trump suggested in recent talks with China that Huawei 5G issues could be part of a deal concerning the escalating US-China trade talks! And this comes after the US declares a severe national security risk if Huawei is allowed to sell their technology for use in 5G networks and strongly encouraged its allies to follow suit and not use their equipment.

So what happened to the security risks then?

If you think about it, had Donald Trump instead said, don’t by Hauwai 5G networking tech because Hauwai are getting too big, and they have essential patents on some 5G technologies which means they will get a bigger slice of the pie from the global 5G roll-out, and we don’t like the fact that Hauwai is not an American company. With that positioning, I don’t think Donald Trump would have gained the support, either domestic or internationally, so it seems the threat of national security is a useful device to gain popular political support for something that would otherwise look somewhat underhanded.

I am generally in agreement with the idea that the US (and other countries) should fight for their rights and position in the global market; there is nothing instinctively wrong with that, and after all, I thought we are all aspiring to be in a free and fair global market. But there seems to be something sinister about misleading the world stage in the pursuit of this agenda and using your power and influence to force other countries to follow suit.

Now in the midst of this, you now have the likes of Google crippling the Android OS capabilities on Hauwai mobile phones. Is this an opportunity for Google to enhance the market opportunity for its range of new Pixel smartphones using the (eh-hem security threat) DT directive! There is that cynicism again! It is a dangerous game to be playing, and I would not under-estimate China’s ability to go-it-alone if they wanted to. There is an unhealthy belief in the US psyche that China needs US tech – I am not sure that’s true, but I am pretty sure that western tech needs China’s manufacturing capabilities and economic labor force.

The quality of tech coming out of China has been steadily getting better, and I am sure China is more than capable of building its own tech, every bit as good as what’s available already if commercial companies are supported/encouraged by a highly motivated government who have a political point to make.

I don’t fully understand the politics or culture in China, but one thing is for sure, over the last 50 or so years, the West has benefitted hugely from the low labor and manufacturing costs in China, huge companies like Apple have flourished because of this very enabling economic model. But as a result of this western consumption, there has been a lot of wealth created that has been flowing towards the far east, because we cannot get enough of the bargain basement stuff that we all love to have.

China is is a closed shop, it seems both complicated and prohibitive for the West to do business in China, easily at least, in the way we are used to at home, so it does feel like very one-way traffic, but you can’t help thinking that we must have anticipated this time would come. I do believe it is a good thing that China is challenged on this point, but I am not sure an outright and aggressively instigated trade war is the best way to go about this, trade should always be mutually beneficial.

Having a challenger to the US dominance in the tech area is a good thing as far as I am concerned, competition is essential, and I expect that the US could quickly lose its stronghold in this area. A country with the size and economic scale that China has, who is willing to make the big bets on rising global tech companies will create competition that to date, the US has thus far enjoyed almost worldwide exclusivity.

It will be interesting to see how the US-China trade war plays out; I expect this will start to dominate the headlines and will have an impactful effect on a lot of people globally. But the new headlines seem a welcome change, giving us in the UK at least, a much-needed distraction from Brexit!

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.

Are you a Software Developer or Software Engineer?

Are you a Software Developer or Software Engineer?

I recently answered this question on Quora and thought this would make a good blog article, I think the question is quite interesting for anyone who writes software for a living.

Over time, software developers have become specialist language developers, in other words, you get .NET developers, C++ developers, Java Developers, etc… and there are several reasons for this happening. It seems like every week there is a new language that promises to be the solution for all the problems with programming languages that have come before, or a new design pattern that emerges because of a new capability in a given language. On top of that, languages have become so complex and so a fair degree of specialization is required to make good use of what is available.

The problem with this programming language specialization is the focus tends to shift from business focus to language/technology focus and this is what a lot of traditional software developers have become. For example, .NET developers want to use the latest .NET x feature, or C++ developers feel they must use the newest coroutine capability in C++20. Suppose I need to implement a function that takes a file and transforms it into another file, using std::filesystem instead of POSIX filesystem functions, that may well be exciting for me as a C++ developer getting to use some of the new C++17 features for the first time, but the business value of my output is no different. In truth, the business value I deliver would be lower because it will take more of my time while I figure out that new language feature.

Software developers tend to focus on their specialization, “I am a C++ programmer” or “I am a .NET C# developer” is how someone might describe what they do.

Software engineers are a different type of developer. The language one might use is really just a tool, an engineer might have tool(s) of choice, but actually care more (a lot more) about the needs of the business and the problems they are solving, than they do about using the latest language feature and the newest compiler to solve the problem. The output of a Software Engineer is always more aligned with business value delivered than that of a Software Developer (using the above definitions).

In my experience, quite a large portion of software developers get bored of creating the same old business value stuff, and are not “fulfilled” either personally or from a resume/career progression point of view, if the focus is not on using latest compiler features, patterns or new things that will define their skill set. This is because they are more engaged with the technology and specialization domain than the value they are supposed to be creating. The second most common reason for software developers to change jobs (the first being the pay, of course) is to take the opportunity to work on that new cool thing that will excite them. If you fall into this category, then you are a software developer, and you will ultimately be a commodity to the organizations you work for.

Being an engineer is much more about being engaged and aligned with your companies strategic aspirations and goals. If you find yourself believing in your companies mission; and you naturally interact with customers, and immerse yourself in the problems your customers are facing daily – and – you understand the overall systems architecture – and – you are employed primarily to write software; you are almost certainly a Software Engineer – the type that all good software companies aspire to hire.

A good way to think about it is this. If the product you work on is “your product” and you have to not only write it but support it, sell it and evangelize about it, these are the things you would do as a software engineer within a company. Ok, you might not go out and do the selling directly, but you would certainly have a stake in the success of sales activity.

Now you cannot just change your title from Developer to Software Engineer and expect to get more job opportunities or better pay! If you are going to call yourself a Software Engineer, then you need to exhibit the characteristics of one, people that look for software engineers are experienced enough to recognize them, and see through the ones that are only pretending/hoping to be an engineer.

More and more companies are looking to hire Software Engineers and not Software Developers, be honest with yourself and ask yourself the question: –

Are you a Software Developer or Software Engineer?

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.

Microsoft says – Don’t Use IE!

Microsoft says – Don’t Use IE!

So I read this post and all the comments and think to myself – no one seems to be saying it!  So I will… (obviously)

For more years than I can remember, Microsoft has had a habit of pushing “the enterprise” down its own path, with an obvious (to me anyway) lock-in strategy.  IE over the years has shown this up time and time again.  I thought Chris Jackson’s comments were a little bit dismissive of Microsoft’s responsibilities here, and I wanted to state that the reason why IE/Edge is still required by many customers is that Microsoft’s platform, especially Microsoft’s development environments have made use of the IE-specific quirks, leaving vast swathes of enterprise-developed apps depending on IE. 

Even worse, so many ISV’s have jumped on the “easier to develop” enterprise software platform (started with VB back in the day, right through to .NET and its kin today) building software for sale that organizations have purchased and gotten tied into.  Be it, ASP.NET, or ActiveX or Silverlight (what a mess that was) the numerous browser quirks and non-standard, undocumented esoteric behaviors in the Microsoft browsers.  I think there was a time when Microsoft was trying to be the standard browser of choice, but failed miserably at it.  I do like Chris’s advice though, and as someone that is responsive web software development, I wish I did not have customers DEMAND we support IE11 because that’s their standard browser, it’s annoying and frustrating and not of our own making.  

Three years ago, we relegated development for IE to “best-endeavour” only, that means we will put reasonable effort into fixing anything obvious but have drawn the line and doing IE/Edge specific workarounds/hacks for our software. That has sadly left some of our customers stuck with different browsers for different applications, but we do not accept that is a problem of our making, we used to feel bad when our customers would tell us “well you are not Microsoft so fall in line” – not anymore! 

Now before I start to sound like I am hating on Microsoft, I must make clear that in recent years I think Microsoft has done a remarkable job, a remarkable turn-around even.  Windows 10 is orders of magnitude better than any Microsoft OS before it, Edge is not terrible and mostly works, although it’s still quirky. And hats off, O365 is a winner – very nicely done team Microsoft. 

Dear Microsoft, if it were up to me…

  • You have the capability, the developers, and the financial resources, probably more than most other software companies in the world, go and build a world-class standards-based browser, do for your browser what you already did for C++
  • Or, hurry up and develop your chromium-based browser and get shot of IE and Edge as soon as you can.
  • Go and help your customers remove their technical debt in relation to IE, its not their fault entirely, you created the environment – help your customers fix it

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.

Why does C still exist, when C++ can do everything C can?

Why does C still exist, when C++ can do everything C can?

This was a question asked on Quora and the top voted answer was airing on the side of it being cultural or personal preference. I don’t think the answer is culture or preference; there is an excellent reason why both C and C++ exist today. C++ is not a good alternative to C in some particular circumstances.

Many people suggest that C++ generates more inefficient code, that’s not true unless you use the advanced features of the language. C++ is generally less popular for embedded systems such as microcontrollers because its code generation is far less predictable at the machine-code level, primarily due to the compiler optimizations. The smaller and more resource-limited the target system, the more likely that C is a better and more comfortable choice for the developer, and this is often the reason people suggest that C++ can not replace C, and that is a very good reason indeed.

However, there’s another even more fundamental reason that C remains a critical tool in our armory. Imagine you create your very own new CPU or computing architecture for which there is no C or C++ compiler available to you – what do you do? The only option you have is to write code using some form of assembly language, just as we did in the early ’80s when programming IBM PC’s and DOS, before even C, became mainstream. (yes there was a time when C was more obscure than x86 assembly!) Now imagine trying to implement a c++17 standards-compliant C++ compiler and STL library in assembly language, that would be a daunting, and unimaginable task for an organization of any size, right?

On the other hand, a C compiler and a standard C runtime library, while still not an insignificant effort, is a hell of a lot more achievable, even by a single developer. In truth, you would almost certainly want to write some form of assembler/linker first to make writing the C compiler simpler. Once you have a standards-compliant C compiler working well enough, then a vast array of libraries and code written in C becomes available, and you build out from there. If your target platform did require a c++17 standards compliance c++ compiler, you would write that in C.

The C language holds quite a unique position (possibly only comparable to early Pascal implementations) in our computer engineering toolbox, its so low level, you can almost visualize the assembly code that it generates, just by reading your C code which is why it lends its self so well to embedded software development. Despite this though, C remains high-level enough to facilitate the building of higher-level application program logic and quite complex applications. Brand new C++ compilers would most likely get written in C, at least for early iterations, you can think of C as an ideal bootstrap for more significant and more comprehensive programs like an operating system or a C++ compiler/library.

In summary, C has its place, and its hard to see any good reason to create an alternative to C, its stood the test of time, its syntax is the founding father of the top modern-day languages (C++, C#, Java, JavaScript, and numerous others, even Verilog). The C language is not a problem that needs to be solved, and the C language does not need to be replaced either. Like oxygen, C is old hat now, but it works well, and in the world of software development, we still need it.

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.

Virgin Media – The Worst Customer Experience Ever!!! No Seriously Ever…

Virgin Media – The Worst Customer Experience Ever!!! No Seriously Ever…

I just had to write about this one…. I am a VirginMedia customer, I have what they call the full package. Telephone, 200Mb broadband and the full house TV, currently paying around £145/month. I see on their website that I can upgrade my broadband to 350Mb for a monthly cost of an extra £0.14/month … ok seems reasonable, so I upgrade my package on line and I get an email confirmation with my order reference WS5320928 – that was on the 31st March 2018. By the 3rd of May, nothing, so I call them… and they tell me they have no such order on my account – and get this – because its an on-line order they have NO WAY of looking it up! WTF!!!!

OK, so I say thanks and I order on line a second time. And again, I get a confirmation email and a reference number WS5393978 and I wait again.

Today another month later… I call them. I get through to a lady after 8 minutes trying to navigate their press one for this, two for that telephone system – 8 minutes….. and get told I am in a queue and will be answered in less than one minute… 4 minutes later I am talking to a person…

Now you have to remember I am upgrading my broadband or am trying to at least. So, I tell her the story so far and offer the second order number for her to look up – same response, oh thats a web order we cannot look that up! Ok I say, forget the web order lets do it over the phone….

So I ask, I would like to upgrade my broadband from 200Mb to 350Mb please… ok she says, lets get that organised.

Oh, I can see on your account its flagged for a replacement Tivo box v6, would you like me to set that up.

So I say, oh do I need it? Well yes because the box you have is no longer supported.

Oh ok, well sure, I don’t mind if its needed. Ok so she sets this up, struggling with “codes” on the system she puts me on and off hold three times, by now I was 20 minutes into the telephone call.

Eventually she says the work order is set up, the new Tivo 6 box will be delivered to you on Saturday and it is a self install. Ok, fine I said.

Ok, lets get the broadband set up… more codes, more placing on hold, taking off hold… then she tells me…

I can see you have a SuperHub 2, you will need a SuperHub 3 for the 350Mb, there is a charge for that… err ok, how much is that I asked. Hold on, let me find out…. back on hold again… a few minutes later, hang on I am trying to find out, I cannot get the system to accept these codes, there is something wrong, let me go and talk to my supervisor… back on hold.

Now I was left on hold…. she never came back 20 minutes passed and still on hold, when I looked at the call timer on my phone I was into the call for 52 minutes!!!! I seem to have been left dangling, so I hung up.

Now I was a bit pissed off at this point, but things do happen. Alright, take a deep breath and hit the redial button.

Another few minutes battling through their IVR and I am back in a queue, less than a minute again, and within 2 minutes I was speaking to a person.

I got assertive and said “DO NOT PUT ME ON HOLD” then proceeded to tell a gentleman called Erwin the story. He of course was apologetic and was very polite.

Now you have to keep in mind what I am trying to do is upgrade my broadband speed, so he said, well I am sorry you are having trouble I am going to lodge a complaint! and guess what – put me on hold! WTF…..

A couple of minutes passed and he is back on the phone, giving me a formal complaint number COM102496702 – ok fair enough…

Right back to the broadband then… can I get it upgraded please. So he taps some keys has a look at my account and says, I can see there is a work order for a Tivo 6 box….

Yes that is correct, the last lady told me my account was flagged for a free upgrade of the box, and when I asked if it was needed, she said that it was because my current box is no longer supported.

Ok he said, but I have to inform you that there is a one-off charge of £99 for the Tivo box….

Hold on, the lady before told me it was being provided for free, I don’t even want the thing – ok he said, lets take that box off your account… hold on and yep… back on hold again…

A few minutes later, he is back on the phone…

OK Mr Sweeney, that’s all done for you, is there anything else I can do for you?

Err, yes, I would like to upgrade my broadband! But I thought the other lady said my current Tivo box is no longer supported?

No it will be ok, let me have a look at the broadband upgrade for you… so you want to upgrade to Vivid 350 – is that correct?

Yes, I said, that is correct. Ok let me do that for you. So the package price, oh hold on, did the last lady tell you about the international package on your phone offer?

Yes she did, she told me that because I was changing my package I had to have a new contract and your current phone package is no longer available, you need this new one. So yes, that is find just do it… so with the upgraded broadband how much is the package?

Ok, (more key tapping), hold on… and yep… on hold again…

A couple of minutes later, he comes back and says, it is actually a lower monthly price, with the new package your monthly cost is £124/month.

Ok that is fine. Then I ask, the previous lady told me that I would need a SuperHub 3 to get the 350mb speed, so is that included?

No he said, that is not included.

Ok, so how do I get the 350Mb speed from the 350Mb service I have just ordered?

Well you can upgrade the Hub to a SuperHub 3 but there is a one-off charge for that…. (and before I can ask how much), he said, but I cannot put it on the same order, you will have to ring back after your broadband is upgraded….

I said, so I will get 350Mb from my current hub?

Well you might get some of it! WTF – by this time I was thinking I am dreaming, this is a F*&^ing joke…

I said you are joking right? this is the point at which I started to raise my voice and talk to the man on the end of the phone like he was a 5 year old child.

I AM NOT RINGING YOU BACK, I SIMPLY WANT MY BROADBAND TO BE UPGRADED TO THE SPEED YOU ARE ADVERTISING ON YOUR WEBSITE. DO NOT PUT ME ON HOLD JUST SORT IT OUT, I HAVE NOW BEEN ON THE PHONE FOR OVER ONE AND A HALF HOURS…..!!!

I am very sorry Mr Sweeney, hold on… and yep, back on hold again….

A couple of minutes later, he is back, ok I am going to include the SuperHub3 without charge, but there will be £5 delivery charge…

Ok I said, that’s fine. So let me confirm…

  • You have taken the Tivo 6 box off of my account.
  • I have upgraded my broadband from 200mb to 350mb
  • You are providing the Superhub 3 with no charge and…
  • I will need to pay a £5 one off delivery charge for the Superhub 3 which will be delivered by Yodl

Is that correct?

Yes he said… (so I let off a sigh of relief) ok, let me just activate that order…

Ok, can you send me an email confirming what you have told me BEFORE you get off the phone…

No I am afraid I cannot, it is an automated system, you will get an email once I have completed the order.

Reluctantly I said OK…..

Now Mr Sweeney, I will not be able to activate your new service until the end of June….

What do you mean I said, that’s 30 days away, that is ridiculous.

Yes he said, because your monthly bill has been reduced you will need to wait until the start of the next bill….

I will be honest, at this point I had completely lost the will to live so I just said ok, I wanted to get off the phone and go and kill myself.

So for the folks at Virgin Media you have single headedly destroyed my day, decimated any belief I had in your brand. Your broadband service is technically good but you customer service is diabolical beyond anything I have experienced in any situation ever. I look forward to hearing from someone about my complaint, but I won’t hold my breath, I will instead put at least as much time I have wasted today into sharing my experience on every social media channel I can…..

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.