Git Product home page Git Product logo

reedtripradio's Introduction

Description

This is an alternative firmware for wireless 433MHz magnetic door/window reed sensors.

STC15W101/104 are 8051 based processors + SYN115 radio transmitter.
'101 model has 1KB flash.
'104 model has 4KB flash and circuit board also has a tamper detect switch.

Instead of supporting software serial or full hardware abstraction layer (HAL),
it is decided to keep firmware under 1KB so it works on multiple processors/boards.
One possibility however is to use emulated EEPROM area for code space.

Experiments with booting from other memory spaces have not worked so far:
mightymos/stc15bootisp#1

Finally, STC processors do not allow read/verify of written firmware.
Therefore an open source alternative is needed to confirm program behavior.
Also for this reason original firmware can not be reflashed once overwritten.

Boards contain a header that may be populated with pins labeled with G (ground), T (transmit), and R (receive) for flashing with USB to UART module.

Features

Proposed original or added status
Transmit on reed switch open/close (interrupt) original DONE
Transmit on tamper switch open/close (interrupt) original DONE
Manage power modes original DONE
Support inverted protocols added DONE
Ability to specify timings for transmission protocol (e.g. rc-switch) added DONE
"Heart beat" mode for periodic transmission added DONE
Add tamper closed key added DONE
Add tamper "trip" mode added DONE
Send code if pin goes low indicating low battery original DONE
Store settings in EEPROM added todo
Send information over radio (e.g., settings?, battery?) added todo
Compare power usage to original firmware added todo
Test other transmission protocols added todo
Adjustable LED blink behavior added todo
Adjustable sleep behavior added todo
User configuration/input with tamper switch press(es) added todo

alt text

Installation

# install https://sdcc.sourceforge.net/ for your platform

cd ~/

# flashing tool
git clone https://github.com/area-8051/stcgal-patched.git

# hardware abstraction layer for stc
git clone https://github.com/area-8051/uni-STC.git
cd uni-STC/demos/

# this repository
git clone https://github.com/mightymos/ReedTripRadio.git
cd ReedTripRadio/
make

# make file should be used to flash in the future
# (port format specific to Windows, change for other systems)
~/stcgal-patched/stcgal.py -p COM3 -b 19200 build/ReedTripRadio.ihx

Receiver Hardware

Receiving radio packets requires a receiver. Options include the Sonoff RF Bridge 433 MHz and recommend flashing with open source firmware Tasmota or ESPurna. ESPurna is nice because it treats wireless sensors as "virtual" sensors (show up as permanent switch entities in Home Assistant). Also ESPurna can learn/remember unique sensor codes.

Some Sonoff Bridge(s) contain an onboard EFM8BB1 which can additionally be flashed to support more radio protocols with Portisch. I originally thought this would be helpful but apparently most rc-switch protocols are not supported.

You can also use a generic 433 MHz receiver and controller using rc-switch library.

Wireless door/window sensor

Source Link Price (USD)
aliexpress https://www.aliexpress.us/item/3256803337417240.html?spm=a2g0o.order_list.order_list_main.23.7cf8180213pdH3&gatewayAdapt=glo2usa&_randl_shipto=US $4.09 (12/05/2022)

reedtripradio's People

Contributors

mightymos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.