SR201 network controlled module

The SR-201 module is a widely available ethernet connected relay module. It is advertised as being “web controlled” in many outlets, but as I found out, it's not. I have written some python to allow it to be controlled via MQTT, this is available on Git Hub here:-https://github.com/andrewjstringer/sr201-mqtt/tree/dev. The link points to the dev branch which is working, but should probably get a code review before merging to master.

The purpose of this project was to override a bedroom light switch, so when it was “dark hours”, children cannot turn the bedroom light back on.

This code listens for messages from an MQTT topic and sends the appropriate command to the SR-201 module, it also reads the module status and writes it back to an MQTT topic. These are definable in a config file.

Constructed SR201 device

Factory Defaults

  Default IP Address:        192.168.1.100
  Port 6722:                 TCP control
  Port 6723:                 UDP control
  Port 5111:                 TCP Configuration

The device can be reset to these defaults by shorting the CLR pins on the header next to the RJ45 connector. CLR is adjacent to the +5V and P30 pins.

This page has been accessed for:-
Today: 1
Yesterday: 0
Until now: 369

 
ha/sr201.txt · Last modified: 11/07/2023 12:26 by andrew