IP relay board

I've recieved a network controlled 16 relay board, here is the board USR-R16-T :
I've found that on Aliexpress for 38€, it's working pretty good and is provided with editor's software to control it (windows, iphone, android and mac), they offer different ways of using it. 
One problem remains : it's working with a custom proprietary protocol so the integration in OpenHab and other home automation systems won't be easy.

Browsing Google didn't give me much infor but using Baidu (the chinese Google) i had more luck and found a tutorial in chinese explaining how to flash that board with another firmware of the manufacturer in order to make it work with the Modbus protocol who is more likely to be implemented in the home automation softwares.

Basically those are the steps to achieve that :
Setup the board maintenance software
Download the firwmare mentionned in the tutorial : USR-TCP232-M4-V3013(V1.1.3)-20170208.bin
Upload the firmware on the board with the software
Reset the board contacting the points as shown in the tutorial
After reset the board is recognised by the software as USR-TCP232
Configure the board with the appropriate values to let it work in modbus as shown in the tutorial
To validate the configuration you can test it, modscan32 is a good tool for that, OpenHab can be used aswell to test the configuration.

Here's a basic OpenHab configuration sample to use the relay board's switches, you can later on apply scripted behavior with your inputs :
OpenHab/conf/items/modbus.items
       
Switch Bouton1 "Bouton 1" (ALL) {modbus="relayBoard1:0"}
Switch Bouton2 "Bouton 2" (ALL) {modbus="relayBoard1:1"}
Switch Bouton3 "Bouton 3" (ALL) {modbus="relayBoard1:2"}
Switch Bouton4 "Bouton 4" (ALL) {modbus="relayBoard1:3"}
Switch Bouton5 "Bouton 5" (ALL) {modbus="relayBoard1:4"}
Switch Bouton6 "Bouton 6" (ALL) {modbus="relayBoard1:5"}
Switch Bouton7 "Bouton 7" (ALL) {modbus="relayBoard1:6"}
Switch Bouton8 "Bouton 8" (ALL) {modbus="relayBoard1:7"}
Switch Bouton9 "Bouton 9" (ALL) {modbus="relayBoard1:8"}
Switch Bouton10 "Bouton 10" (ALL) {modbus="relayBoard1:9"}
Switch Bouton11 "Bouton 11" (ALL) {modbus="relayBoard1:10"}
Switch Bouton12 "Bouton 12" (ALL) {modbus="relayBoard1:11"}
Switch Bouton13 "Bouton 13" (ALL) {modbus="relayBoard1:12"}
Switch Bouton14 "Bouton 14" (ALL) {modbus="relayBoard1:13"}
Switch Bouton15 "Bouton 15" (ALL) {modbus="relayBoard1:14"}
Switch Bouton16 "Bouton 16" (ALL) {modbus="relayBoard1:15"}


OpenHab/conf/services/modbus.cfg
       
tcp.relayBoard1.connection=192.168.0.15:502
tcp.relayBoard1.type=coil
tcp.relayBoard1.id=17
tcp.relayBoard1.start=0
tcp.relayBoard1.length=16

poll=2000

OpenHab/conf/sitemaps/default.sitemap
       
sitemap demo label="Main Menu" {
    Switch item=Bouton1 label="Salon"
    Switch item=Bouton2 label="Cuisine"
    Switch item=Bouton3 label="Jardin"
    Switch item=Bouton4 label="Chambre"
    Switch item=Bouton5 label="Chambre 2"
    Switch item=Bouton6 label="Bureau"
    Switch item=Bouton7 label="Salle de bain"
    Switch item=Bouton8 label="Aquarium"
    Switch item=Bouton9 label="Cave"
    Switch item=Bouton10 label="VMC"
    Switch item=Bouton11 label="Marre à poissons"
    Switch item=Bouton12 label="Escalier"
    Switch item=Bouton13 label="Entrée"
    Switch item=Bouton14 label="TV"
    Switch item=Bouton15 label="Prise salon"
    Switch item=Bouton16 label="Prise cuisine"
}


The sitemap configures the BasicUI (http://localhost:8080/basicui/app) with a dashboard containing one button per relay :


I can provide more details if needed and provide a configuration for OpenHab in order to do the tests.

Commentaires

  1. Hi, thanks for information. Can you please also share the openhab configuration?

    RépondreSupprimer
    Réponses
    1. Hi, you're welcome !
      I've updated the post with details on the basic OpenHab configuration, I didn't go much deeper into OpenHab yet, I'm waiting to recieve my Zigbee devices as input for scenarios.

      Supprimer
  2. I had a problem during the update phase. It says upgrade time out and the device does not respond.

    RépondreSupprimer

Enregistrer un commentaire