Intercom

The intercom. Now days it’s a taken for granted necessity of apartment infrastructure. Ours is a Fermax unit with a maze of wiring interconnecting 4 unique buildings, several access panels and cameras. And while it works1 it lacks some modern day functionality. Currently it rings and unlocks doors from a central apartment intercom phone. That’s it.

However being someone who loves to work hard to be lazy I wanted it to be just a tiny little bit smarter. Ideally we would allow remote notifications and remote unlock. I’d also like to be able to trigger opening certain doors without needing an active call, however as I’ll get into this isn’t possible.

Once again starting with the premise “how hard could it be?” I set out to bring these features to our intercom system. As always, there’s constraints. No breaking the existing intercom system (aka other peoples intercoms) and no breaking our existing intercom phone.

Fermax Loft Intercom Phone with curved projected CRT screen

We’ve actually had partial remote control for some time. We opened up the intercom phone and added a relay in parallel for the unlock button. We also added a USB composite capture card to a Pi to stream the video feed. What we learned from this is our intercom system uses a system called Fermax VDS which amplifies the video signal to all apartments. You receive the video regardless of which apartment was called! It’s also in colour, which we didn’t know before since our existing Fermax phone uses a black and white CRT.

Fermax sells a unit which connects a VDS system to wifi : Wi-Box. Great - I have VDS system, but I don’t want to use their cloud service. Luckily some people have patched some functionality and rooted the box. I purchased one, patched it, along with doing a little reverse engineering along the way for fun.

Then I went to wire it in and I suddenly realised my mistake. VDS is one of Fermax’s ways of performing video distribution. VDS can be used with multiple types of audio/intercom solutions like MDS and 4+N. The Wi-Box is designed for MDS system and while it says it supports 4+N, it requires an additional N+4 to MDS converter box - $$$. We had 4+N. This is when I started going down a research sink hole of understanding far too much about the inner workings of many of the Fermax systems and their respective interoperability.

Fermax switching units mounted on the wall for both 4+N and VDS systems

So what the heck 4+N. It’s a wiring/protocol that allows keeping the intercom phones super simple. There are 4 common (as in common to all apartments) wires and then 1 wire per apartment. A total of 5 wires per apartment + the video signal.

Number Purpose (simplified)
1 Door / Microphone
2 Microphone
3 Common
4 / Call Ring (AC)
6 Speaker

4+N is really dumb. There’s no commands or fancy signalling. This means we can’t send a command like “unlock this specific door”. Additionally our apartment system uses Fermax privacy modules which disconnects the “common” wires when the apartment isn’t being actively called.

So what options are there for us to interface with this thing?

Ring (Amazon)

  • Not available in Australia
  • Cloud based / Closed source
  • Probably works ? Impossible to search for.
  • Video apparently wouldn’t work?

Nuki Opener

  • Probably works
  • Documentation on forum posts and vague :/
  • Local access after setup with app
  • Not open firmware / closed source
  • Also not sold in Australia

ESPBell-LITE

  • Opensource
  • ESP8266 based
  • Supports 4+N systems

So the ESPBell-LITE looked pretty appealing to me, especially with its optocoupler system. And writing this now I can’t remember why I didn’t go with this option… Maybe it was out of stock? Maybe it was because I wanted cabled ethernet? Maybe I found this after?

What I ended up getting was a Waveshare 8-ch Ethernet Relay Module (B). This is a ModBus to digital IO gateway. What makes it unique compared to most is that it contains optoisolated inputs that don’t share a common ground with the rest of the unit. I wanted to ensure that I wasn’t adding a new ground reference to the intercom system - hence relays and optoisolated inputs. Surprisingly a lot of units I saw with optoisolated inputs had the input grounds/commons tied together.

Fermax 4+N sends an AC signal on the 4 (ring) wire when a call is sent and shorts 1 (door unlock) to 3 (common) when the unlock button is pressed.

So wiring up to the Waveshare is:

Fermax Waveshare
1 (unlock) CH1 NO
3 (common) CH1 Common, DI “COM”2
4 (ring) DI1

Waveshare device temporarily wired up balancing on a shelf

Home Assistant supports ModBus. This is the configure I used

modbus:
  - type: tcp
    host: WAVESHARE IP
    port: 4196
    name: "interccom"
    
    binary_sensors:
      - name: intercom_ring
        address: 0
        input_type: discrete_input
        slave: 1
        scan_interval: 1
    switches:
      - name: intercom_unlock
        address: 0
        write_type: coil
        command_on: 1
        command_off: 0
        verify:
           address: 0
           input_type: coil
           delay: 1
           state_on: 1
           state_off: 0

Annoyingly the ModBus protocol requires Home Assistant to constantly poll for the intercom to be ringing which can add a little latency on a call - but I think its acceptable. The other annoying thing is that the Waveshare supports “flashing” a relay - this would be useful for triggering the unlock command. However its implemented in a non ModBus compliant manner so isn’t accessible to us. Instead we have to tell HomeAssistant to perform the “flashing” function instead. As a safety feature I also have a automation to check the relay state and reset it if its on for too long.

As I mentioned we also have VDS video feed through a USB capture card. We use a Pi with ustreamer for this:

[Unit]
Description=uStreamer service
After=network.target
[Service]
User=ustreamer
ExecStart=/usr/bin/ustreamer --log-level 0 --device /dev/video0 --device-timeout=8  --quality 100 --resolution 640x480 --desired-fps=30 --host=0.0.0.0 --port=8080
[Install]
WantedBy=multi-user.target

Connecting it all together

Finally to bring it all together there’s an automation to detect when the intercom is ringing:

platform: state
entity_id:
  - binary_sensor.intercom_ring
from: "off"
to: "on"
service: notify.mobile_app_pixel_6_pro
metadata: {}
data:
  message: Intercom is ringing
  title: Intercom
  data:
    entity_id: camera.intercom
    image: /api/camera_proxy/camera.intercom
    actions:
      - action: UNLOCK
        title: Unlock
        icon: sfsymbols:lock

Then from Android I can click “Unlock”.

Screenshot of notification from Home Assistant reporting that the intercom is ringing and a button to unlock it

This triggers an unlock automation which is configured to unlock the intercom:

platform: event
event_type: mobile_app_notification_action
event_data:
  action_1_key: UNLOCK

One thing I haven’t implemented is any sort of audio support. The thing is - audio kind of doesn’t work well on our intercom anyway, and very rarely do we actually need to talk to guests coming in. All in all I’m pretty happy to where we got to with this solution.


  1. The system as a whole is on its last legs. Memory corruption is occurring on many of the panels displays and the audio has a significant buzz to it (I suspect this is crosstalk from a fire system which is abusing the copper network). ↩︎

  2. DGND and COM are different on the Waveshare. DGND is shared with the rest of the Waveshare ground, while COM is floating. ↩︎


Vegan

Just over a year ago I wrote about becoming vegetarian and I mentioned that at some point I wanted to switch to vegan. Well it was pretty much that day which I switched to a vegan diet. So lets do a quick update.

Roasted vegetables in a baking tray

First off, why vegan?

Well as per my previous email I mentioned in the previous blog I’m lactose intolerant. Cutting down milk based products really made my stomach a hell of a lot less yuck. The other major non vegan ingredients is eggs (not a huge fan) and honey. So I thought - why the heck not. I’ve always found the concept of eating milk and eggs extremely weird and less animal cruelty is certainly a good thing.

I don’t believe the environmental footprint difference between vegan vs vegetarianism is significant but that’s not really the point here.

What foods do I miss?

I had a good think about this the other day, and really nothing. I can pretty much eat the same food as a non vegetarians. Obviously something like a “steak sandwich” will require a steak substitute, but theres substitutes for everything these days.

Salad with roasted veg and fried tofu

The biggest problem however is eating out. It’s surprising how hard it is to go to restaurant/cafe and have them make something without an ingredient. It’s mind boggling to me. So many dishes that could be vegan by just leaving out 1 or 2 things. I’ve certainly changed where I eat based on that - but the meals themselves have been just as good, if not better.

Regional towns are probably the worst because there’s often only 1-2 places to eat out. It’s extremely odd though since given their remoteness you’d think cooking with products that don’t go bad as quickly / have long shelf lives would be their speciality. Look its not that hard to offer bolognese with just some pasta sauce or a salad sandwich.

A cafe I used to regularly go removed their vegan options so I haven’t been there since. It’s pretty sad when that happens.

A good chef can make any meal vegan with fuss or complaint. I’ve been using HappyCow app to find good places to eat.

Substitutes are thinking about food wrong

I did mention vegan cheese in my last post. I still eat these semi regularly but probably a lot less now. The thing is, if you make your meals around not using substitutes and instead play on the strengths of the flavours and spices of your ingredients you end up with much nicer meals.

Often you can make a meal way better using different set of ingredients than relying on faux meat, cheese or egg.

Baking

I’ve baked a few things now without eggs and milk. And now I’m angry. Turns out you really don’t need milk or eggs. At most of you might need an egg replacer.

It’s wild - I had been taught my entire life that eggs and milk were critical to baking but they really aren’t. Give it a go - its fine. Take any baking recipe, replace the eggs with egg replacer and the milk with either an alternative milk or just water. Why there isn’t more vegan baked goods on shelves is bizarre to me now.

It’s fine trust me.

B12 and nutrition

Going to preface this with - I am not a doctor, and I am not your doctor. When making diet changes consult an expert.

Changing your diet and regular foods is certainly going to have an impact on the nutrients your body is receiving. This is no different from any other diet.

If you eat a fairly balanced diet with lots of different greens, rather than just carbs it appears the biggest risk is lack of B12. This is because B12 doesn’t naturally show up in plant products. Some vegan specific products are fortified with B12 for this reason. B12 is extremely important to the body, but you don’t need much. As I was aware of the risk of low B12 I asked my doctor to monitor this in my usual blood tests.

However even making an effort to select B12 fortified products where possible I still became B12 deficient and started taking B12 supplicants. Not really a big deal, but something you should be aware of.

Still learning

While I don’t usually drink wine or even drink much at all these days, it was only yesterday that a Mastodon reply caught my attention. Most wines aren’t vegan as various animal products are used during the fining process. Just goes to show that animal products sneak in everywhere.


Three purchases I have not regretted

Garmin fēnix® 6S smart watch

I purchased this on a whim to try and replace the pebble I was using for heart rate monitoring. It’s probably one of the best purchases I’ve ever made.

Features:

  • Long battery life (about a week if you don’t record activities)
  • Always on screen
  • Can pair headphones to it
  • Garmin Pay (NFC payment)
  • Offline maps
  • All your normal running/riding activity recording stuff
  • Can use standard watch straps

Now here’s where things get interesting. The watch is usually synchronised with an app called Garmin Connect - a cloud based service. But before you write it off because cloud, let me explain a few things.

Garmin Connect basically has all the features you see in Strava, is more privacy focused, has a privacy policy that says it won’t sell your data, doesn’t push ads (there’s some promotion Disney watch achievements but its extremely minor), is free. Garmin Connect exists as a service to sell watches, not to sell a subscription.

Ok, so if there’s no subscription - the watches get no updates right? Well no. My fēnix received an update today, and there’s even been features released a year after its launch. The watches themselves are also fairly durable (except for the charging port / charging cables - that has room for improvement).

Remember how I said about the cloud? Well you don’t actually need to use their app. You can plug in the watch over USB and copy the FIT files directly from it. I guess the disadvantage here is that it can’t be done over Bluetooth.

Garmin watches seem like a breath of fresh air when it comes to devices with cloud integration. Sure there are some niggles, but gosh its so much different from everything else I own.

Shokz OpenSwim Pro bone conducting headphones

I weirdly put off bone conducting headphones for so long as I had a bad experience with trialling radio headsets that used bone conduction. Running Warehouse ran a Shokz try out day and within minutes of my run I entirely forgot I was wearing them. Towards the end of the run I brushed the back of my hair and nearly freaked out because I forgot I had the headset on. I purchased a set within a week.

The advantages of bone conducting headphones is that they don’t block out sound. So you can hear other people and the environment around you. Hugely important for safety. The other part is since they don’t go into your ear like earbuds but rather sit on top, you don’t get moisture build up in your ear. That had become a bit of a problem for me and I was constantly getting blocked ears.

I bought the swim model in the off chance I got swimming again. Swimming can be a bit tedious so having some tunes to boop to is good.

A bit of a warning though - these devices are very personal preference. The audio quality isn’t like what you’d get from normal headphones. Its probably a good idea to try one out first.

VR-N76 handheld radio with packet TNC

As soon as I saw the VR-N76 firmware update provided a KISS TNC interface I had to have one. Unlike the HG UV98 the the TNC actually works as proper TNC, not just APRS.

I was skeptical of using the app, however its been great. The APRS features seem to work well enough. What I’ve been enjoying is that you can listen and TX from your phone - which might initially seem like a silly feature, however what it lets me do is listen to music on the Shokz while also listening to the radio. The radio stays in a pocket in my bag, and if I want to TX I just key up using the app which uses the Bluetooth. The app also keeps a history of transmissions, so if you miss and important detail you can replay it to get the info you need.