A door or window assembly (100, 200, 300, 400) comprising: a door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B); a frame (102, 104, 202, 204, 302, 304, 404) arranged to receive the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B); a sensor (110, 210, 310, 410); and a fastening mechanism, the fastening mechanism comprising: a first fastening member (106, 206, 306A, 306B, 406A, 406B) on the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B) and a second fastening member (107, 307A, 307B) on the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B), wherein the first fastening member (106, 206, 306A, 306B, 406A, 406B) and the second fastening member (107, 307A, 307B) are each moveable between an unfastened position and a fastened position, in which the first fastening member (106, 206, 306A, 306B, 406A, 406B) is arranged to engage with a first frame member (108, 208, 308A, 308B, 408A, 408B) on the frame (102, 104, 202, 204, 302, 304, 404) to fasten the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B) in the frame (102, 104, 202, 204, 302, 304, 404) and the second fastening member (107, 307A, 307B) is arranged to engage with a second frame member (109, 309A, 309B) on the frame (102, 104, 202, 204, 302, 304, 404) to fasten the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B) in the frame (102, 104, 202, 204, 302, 304, 404), wherein the first and second fastening members (106, 107, 206, 306A, 306B, 307A, 307B, 406A, 406B) are electrically connected; the first and second fastening members (106, 107, 206, 306A, 306B, 307A, 307B, 406A, 406B) are electrically connected via the first fastening member (106, 206, 306A, 306B, 406A, 406B) and the second fastening member (107, 307A, 307B) when both the first and second fastening members (106, 306A, 306B, 307A) are in the fastened position and engaged with the respective one of the first and second frame members (106, 108, 306A, 306B, 308A); and otherwise the first and second frame members (106, 107, 206, 306A, 306B, 307A, 307B, 406A, 406B) are electrically isolated wherein the sensor (110, 210, 310, 410) is arranged to detect when the first fastening member (106, 206, 306A, 306B, 406A, 406B) is in the fastened position and engaged with the first frame member (108, 208, 308A, 308B, 408A, 408B), and whether there is an electrical connection between the first frame member (108, 208, 308A, 308B, 408A, 408B) and the second frame member (109, 309A, 309B) via the first fastening member (106, 206, 306A, 306B, 406A, 406B) and the second fastening member (107, 307A, 307B). a first fastening member (106, 206, 306A, 306B, 406A, 406B) on the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B) and a second fastening member (107, 307A, 307B) on the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B), wherein the first fastening member (106, 206, 306A, 306B, 406A, 406B) and the second fastening member (107, 307A, 307B) are each moveable between an unfastened position and a fastened position, in which the first fastening member (106, 206, 306A, 306B, 406A, 406B) is arranged to engage with a first frame member (108, 208, 308A, 308B, 408A, 408B) on the frame (102, 104, 202, 204, 302, 304, 404) to fasten the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B) in the frame (102, 104, 202, 204, 302, 304, 404) and the second fastening member (107, 307A, 307B) is arranged to engage with a second frame member (109, 309A, 309B) on the frame (102, 104, 202, 204, 302, 304, 404) to fasten the door or window (102A, 102, 104, 202, 203, 204, 302A, 302B, 302C, 402A, 403B) in the frame (102, 104, 202, 204, 302, 304, 404), wherein the first and second fastening members (106, 107, 206, 306A, 306B, 307A, 307B, 406A, 406B) are electrically connected; the first and second fastening members (106, 107, 206, 306A, 306B, 307A, 307B, 406A, 406B) are electrically connected via the first fastening member (106, 206, 306A, 306B, 406A, 406B) and the second fastening member (107, 307A, 307B) when both the first and second fastening members (106, 306A, 306B, 307A) are in the fastened position and engaged with the respective one of the first and second frame members (106, 108, 306A, 306B, 308A); and otherwise the first and second frame members (106, 107, 206, 306A, 306B, 307A, 307B, 406A, 406B) are electrically isolated wherein the sensor (110, 210, 310, 410) is arranged to detect when the first fastening member (106, 206, 306A, 306B, 406A, 406B) is in the fastened position and engaged with the first frame member (108, 208, 308A, 308B, 408A, 408B), and whether there is an electrical connection between the first frame member (108, 208, 308A, 308B, 408A, 408B) and the second frame member (109, 309A, 309B) via the first fastening member (106, 206, 306A, 306B, 406A, 406B) and the second fastening member (107, 307A, 307B).