Visonic MCT-340 E Window/Door Sensor

Anyone having issues with these defaulting to open lately? I have about 6 and now 2 of them report open after restarting Hass. If I go open/close those windows, they register and report closed…until I need to restart Hass.

Any work arounds?

Exactly in the same boat as the OP in the first post.

Able to pair the sensor via “zha.permit”, it shows two devices, for contact and temperature sensor, however the temperature never shows up, even after letting run it run for a day or two.

Clipboard%20Image

The entity for temperature sensor and contact

Clipboard%20Image%20(2)

Contact sensor works fine although

Clipboard%20Image%20(3)

Has anyone been able to nail it out. I am new to HassIO HA and recently bought this sesnor, was it the case that it was working earlier with earlier version of HA and got broken in the latest 0.8.45 update.

Apparently here, it just got working with removing/readding, however it doesnt work like that with me

https://github.com/home-assistant/home-assistant/issues/16632

Was trying to give it a shot with Zigbee2mqtt using the official HassIO addon,

however wasnt able to get it working as the shepherd sevice never starts. I understand this addon is meant to work with CC2531 USB stick, which maybe the Nortek HUSBZB-1 is not.

Thanks for your replies.

For my case, I removed my 2x mct340e, then reboot HA before adding them back. Not sure the reboot making a different.

Tried all tricks, removing devices, removing ZHA, rebooting and re adding all in the sequence…it just refuses to show temperature. Almost giving up on it now. Contact sensor works immediately and flawlessly…

I have two of these and neither are showing temperature - contact sensor works great.

I’ve tried most of the “tricks” and not had any positive results.

Hopefully we can get this working!

I guess it has got something to do with HA Zigbee implementation (or maybe they way to read temp from Zigbee devices - or cant say much as I am a non-techie here).

I would open a new thread with my findings with two Zigbee devices exhibiting the same behavior for temp.

Thanks.

Created a separate thread for this generic issue with Zigbee devices (or at least the Zigbee devices I have).

Hope to get some clue there.

I have 6 of these and they all show correct temp.
You have to mess around with pairing them.
The think that works most of the time is to remove the batt and when
you reinstall it have the sensor next to the HUSVZB-1 and wait for a while until
it shows the correct temp.
Then you can move it to where you want it.

2 Likes

Quick update. As of 0.85.0 my temperatures begin showing and reading correctly…

Will try and post results. Thanks.

The new ZHA config panel in 0.86.0+ includes an option for “Reconfigure Node” which solved the issue for me!

Just FYI, I acquired a Visonic MCT-340 sma from a friend, and it paired right up with my husbzb zigbee+zwave stick on a fairly fresh install of hassio. Binary and temp worked right off the batt. I can’t seem to get a battery status off of it though. Going through the zha configs there are too many variables/settings in there for me to feel cozy poking around with them. It does seem to be reporting battery attributes as “1” battery count, “other” battery size. In ZHA, battery size comes up as “2”, and “battery” (not battery2 or battery3) is reporting what looks like reasonable values for “voltage” and various voltage thresholds. Now if I could somehow get that battery voltage value out of the zha page and on to a template…

I made a battery sensor for the Visonic MCT340sma that is so far working as expected on my hassio install (w/ Nortek HUSBZB-1 stick + ZHA). Here are the relevant lines added to my configuration.yaml:

sensors:
# Dinette Window 2 Battery (for "unavailable" data that appears up in a zha cluster attribute)
  - platform: sql
    db_url: sqlite:////config/zigbee.db
    scan_interval: 10
    queries:
      - name: "dinette_window_2_battery"
        query: "SELECT value FROM attributes WHERE ieee = 'device_mac_address' AND cluster = 1 AND attrid = 32"
        column: "value"
  # range 18-25, mapped to 0-100%
  - platform: template
    sensors:
      dinette_window_2_battery_template:
        friendly_name: 'Dinette Window 2 Battery Template'
        value_template: >
            {% if is_state('sensor.dinette_window_2_battery', 'unknown') %}
                {{states('sensor.dinette_window_2_battery')}}
            {% else %}
                {{(100.0 * (states('sensor.dinette_window_2_battery')|float - 18.0) / (25.0 - 18.0)) |int}}
            {%- endif %}
        unit_of_measurement: '%'
        icon_template: >
          {% set batt_prcnt = (100.0 * (states('sensor.dinette_window_2_battery')| float - 18.0) / (25.0 - 18.0)) |int %}
          {% set battery_round = (batt_prcnt / 10) |int * 10 %}
          {% if battery_round >= 100 %}
            mdi:battery
          {% elif battery_round > 0 %}
            mdi:battery-{{ battery_round }}
          {% else %}
            mdi:battery-alert
          {% endif %}

A sql sensor “gets” a battery value from the zigbee database file, and a template sensor converts that value to a % (a fancy icon is included as well). I found the ieee address, cluster #, and attribute id # for my Visonic MCT340sma battery after adding the device through the hassio ZHA config. The info is found in hassio ZHA config, “PowerConfiguration” cluster, “battery_voltage” attribute. Click the “get attribute” button to verify the value is actually being tracked. Note the displayed hex values must be converted to decimal format for the configuration. You’ll need to paste your actual ieee address between the single quotes, but the cluster/attribute numbers will likely be the same for all of these Visonic devices.

The output battery_voltage value ranged from 20-25 based on my very limited testing. Looking at the 3 “battery_volt_thresX” attributes, it appears the factory has it setup for some ‘battery warnings’ when the voltage value hits 20, 19, and 18. So I setup the template for 0% @ value=18. This may need adjustment for real use (not sure if the thing will work below 20 anyways).

I did this because I really like the size/shape of these Visonic sensors, I have >20 window sensors to buy (these are cheap), and I am OCD about batteries (no devices allowed on my system that I can’t have text me when their batteries are low). I’m sharing this here in hopes it helps someone.

Cheers,
Kevin

2 Likes

This is awesome but also hilarious. It never would have occurred to me to query the zigbee database.

Thanks - I have a few of these sensors myself.

Yep lol, I am very new to hass so I also wasn’t sure this method is the ‘right way’. At least it works for now until a genius comes along with a proper fix. :slight_smile:

FWIW, I just received a pair of Visonic MCT340-E devices, and they 100% work with hassio zha integration. I simply added the devices, and the binary open/close, temperature, and battery % all reported as expected. I still made a sensor template to display a dynamic icon that reflects battery levels, but this was much simpler than dealing with the xfinity -sma model (which is also much more expensive). For example:

  # Dining Slider ###########################################################
  - platform: template
    sensors:
      dining_slider_battery:
        friendly_name: 'Dining Slider Battery'
        value_template: '{{states.zha.dining_slider_device.attributes.battery_level|default(0)}}'
        unit_of_measurement: '%'
        icon_template: >
          {% set battery_level = states.zha.dining_slider_device.attributes.battery_level | default(0) | int %}
          {% set battery_round = (battery_level / 10) |int * 10 %}
          {% if battery_round >= 100 %}
            mdi:battery
          {% elif battery_round > 0 %}
            mdi:battery-{{ battery_round }}
          {% else %}
            mdi:battery-alert
          {% endif %}

As others have reported elsewhere, the 2032 battery does seem to drop off quickly at first (from 100% to 85% within 2 days)… but I assume like others that this will level out after a few months and the batteries may last ~1year or so. I’ll update if the battery life drops off sooner.

…and now this is all more or less obsolete with the latest updates to hassio. Basically the way the zha integration handles attributes has totally changed. Now these Visonic MCT-340E sensors should just work as you’d want them to without any additional configs or battery templates. The hass devs did a nice job… their battery icons are exactly like the ones from my template. The new zha method should also help a little bit with hassos sd card issues (since now there’s a lot less data being recorded by default).

Indeed. I just picked up a dozen of them and slapped them on all the windows. Works like a charm in the current version.

Anyone still here?

I’ve got a new Hassio install (VM on unraid). I’ve got a bunch of these sensors. About half of them report battery status, none of them properly report temperature. Some always say 32, since always say unknown. From other replies here it seems like they should just work, but obviously that’s not working for me…

Have 3 of these. Originally on Smartthings. I was able to pair it with Home Assistant without issue. I’m using RPi3 HA OS install with zigbee2mqtt / mosquitto with a generic CC2531 usb stick. One of them I did have pairing issues but not sure at the time if the zigbee mesh solid at the time.

I paired these sensors to Home Assistant using a USB Zigbee stick. I’ve never relied on temperature or battery readings from any of these sensors–way too inaccurate. Zigbee devices have been really easy to pair using the Zigbee integration with Home Assistant.

If you have issues with your Zigbee sensors, I advise moving your Zigbee radio and sensors as far away from your router, AP, or mesh points. At least 8 feet. There is definitely interference caused by broadcasting on the 2.4ghz radio. I fixed pairing issues by physically moving the sensors as far away from the router as possible.