Skip to content

mqtt topic like in tasmota software #1

@lulek2007

Description

@lulek2007

Hello,
At the beginning I would like to thank you very much for this project. He is the only one working with my accessories.
I managed to build on rapberry pi 0 WH bridge with 433 sensors to mqtt and conect it to homebridge and apple homekit app.

I use digoo detectors https://www.mydigoo.com/Digoo-DG-HOSA-433MHz-Window-Door-Sensor-PIR-Detector-Wireless-Remote-Controller-External-Alert-Siren-Set-p-93.html
or keriji pir 433 detectors etc.

At begining as bridge, I used https://sonoff.itead.cc/en/products/appliances/sonoff-rf-bridge-433 Sonoff 433 bridge and tasmota software.

and processed the topic from this device that looked like this

18:08:17 MQT: tele / sonoff_rf / RESULT = {"RfReceived": {"Sync": 8640, "Low": 270, "High": 850, "Data": "D3600A", "RfKey": " none "}}

in homebridge, where tele / sonoff_rf / RESULT is a topic
and imprtant information is in 6 digit Date fild like "Data": "D3600A"
It is hex data.

{
    "accessory": "mqttthing",
    "type": "contactSensor",
    "name": "Sensor_1",
    "url": "mqtt://192.168.4.10",
    "username": "admin",
    "password": "12345",
    "caption": "",
    "topics":
    {
        "getContactSensorState": {
    	    "topic": "tele/sonoff_rf/RESULT",
            "apply": "return( ( JSON.parse(message).RfReceived.Data == 'D3600A' ) ? 1 : null || ( JSON.parse(message).RfReceived.Data == 'D3600E' ) ? 0  : null);"
            },
"getStatusTampered": {
    	    "topic": "tele/sonoff_rf/RESULT",
            "apply": "return( ( JSON.parse(message).RfReceived.Data == 'D3600C' ) ? 1 : null );"
    	    },
        "getStatusLowBattery": {
    	    "topic": "tele/sonoff_rf/RESULT",
            "apply": "return( ( JSON.parse(message).RfReceived.Data == 'D3600D' ) ? 1 : null );"
    	    }
    },
	    "integerValue": true,
            "logMqtt": false
    },  

I only receive dec digit in your project

Is it possible to add the conversion so that it can be published in mqtt as in tasmota software. This would make it easy for me to move to the raspberry bridge. I do not have to change the processing of all detectors to the current decimal format.

greetings
Marcin Kowalik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions