2021-09-23

A use for the keypad

The Solar System alarm that I have created does work with a standard Honeywell Galaxy Mk7 keypad/display module.

However, until now, I have not really managed to work out a good use for how the keypad can be part of the system. But I have been working on that.

We now have clear display of inputs that trigger alarm, or inhibit setting, or faults, or tampers. We have setting the alarm, and unsetting using a PIN. Yay!

The way it all works is down to a small PCB, designed to fit inside the case of the display. It works off the same 12V supply, and provides RS485 to the keypad/display.








2021-09-04

Shelly1 on 12V

I have used Shelly1 for a while, and have loads of them in use.

One of the nice features is they can run from 12V. Well, actually, they can run from mains, 24V-60V DC, 12V DC, or (via connector pins) 3.3V DC. You move a link for 12V working. Pretty versatile.

I have used them in the house here on my door bell circuit which runs from a standard alarm system 12V battery box. All fine.

I planned to use with an alarm system as well, running from the 12V battery box. First two were fine, but then the next did not work. I tried another and it also did not work.

I did some googling and people report that the 12V is meant to be exactly 12V. I must ask Shelly to confirm really, but the comments were 12V and not a battery (which is 13.8V). My example use was actually 14V. It would be a pain if it could not run from a standard 12V battery box.

Well, pushed for time, I found some 12V LDO linear regulators and got for next day. Oddly when installing these to give an exact 12V clean DC for the Shelly, the ones that were not working still did not work?!? I tried yet more, and they did work.

What is even weirder is one that was working off 14V did not work off 12V, so I had to find another. It is a good job I had 20 of them.

So it seems the 12V working, is, err, fussy, and inconsistent.

Anyone else seen this?

What a week!

This has been a hell of a week, and far more actual hard work than I am used too, and after it all (averaging over 15k steps a day) I have not even lost any weight!

The plan was simple, replace existing 7 door system, and PIRs and exit contacts, and so on. 28 modules in total. I have carefully made and tested all the modules and spares. All ready to go.

But I ended up making work for myself by tidying the wiring. The new system just needs power, so ended up with 6 battery boxes, and removing the old power and bus wiring. Much neater. I also needed to change the exits from rangers (that were unreliable) to new exit buttons, and hence also needed to change the break-glass boxes as they were integral. And I wanted to move the break-glasses further from the letter box (for obvious reasons). This meant running wires down the aluminium door frames on the front doors (to be tidy), which is easier said than door. I probably wasted a day on that (and I had some help). I can recommend NYLON CABLE & FLEX DRAW TAPE 30M (98FT) (screwfix 75807) for the job :-)

Finding the cable runs to bell boxes was also fun, and I gave up chasing wires to original PIR and door sensors and just ran new cables. Ceiling tiles for the win.

We actually have a mystery - the original alarm when we moved in was removed something like a decade ago, but the PIRs were still in place. When the new galaxy alarm was installed new PIRs were put in. I have actually put in new PIRs this time with integral ESP32 WiFi modules in the PIR. Part of the work was removing the galaxy system which replaced have already replaced what was there before, and removing all the old battery boxes. The original PIRs still have power and blink when people move? But there are *NO* battery boxes nor alarm panels in the building at all. I have literally removed them all, and the new battery boxes only go to my new kit. So WTAF. If I had time I'd have investigated further, but it is a mystery!

The result is it took a whole week, and I have to admit I was losing my enthusiasm somewhat during the week.

What did not help is finding some bugs and issues. I expected some, and a couple of small snags were simple, but the biggest issue was the wifi mesh being unstable. It was fine at the start but got worse during the week. I found issues with multiple wifi channels (2.4GHz) which I fixed with config changes on the APs. But I would find the mesh unstable. Reseting the wifi could fix, but not always, and changes to wifi config helped, but not in a concrete way. I wasted a lot of time on that. But ploughed on with the installed.

But Friday it was clear the problem was now intractable - the modules were all resetting every 30 seconds or so. The nice thing is the system was still usable. People in the office could come and go, as it resets very quickly and works autonomously. But it cannot work as an alarm if the mesh is not working.

It seems (and I have to do a lot more bench test and investigation to be sure) that the modules may be running out of memory when the mesh gets beyond around 12 units. This is very disappointing as I I can't see why the mesh would need much memory at all - each routing entry is a 6 byte MAC and very little else. It will be interesting to investigate.

Thankfully the site is two distinct adjacent units, so the fix was to make it two sites. That is a pain, as it means provisioning fobs for two sites, and if someone had not mistakenly ordered only 2k DESFire fobs, that would be easy, so new fobs were programmed, again! Just means slightly more admin. I cut down the sites slightly and ended with both sides with 12 units. When one had 13 it was not quite stable, but 12 seems fine. So we have a work around.

It may be that in longer term we need some modules using ESPs with extra RAM to act as root nodes, something to consider if I cannot track down the memory footprint problem.

Even so, the end result seems really good. Time will tell.

P.S. I have improved stability a lot with some tweaks to the way we work the mesh, but not solved the underlying issue. I suspect big step will be waiting for mesh code in ESP IDF to mature a little. Like cheese.