Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 102445

Sonoff RF Bridge door sensor events to icons. Untasmotized. AlexxIT's Sonoff Lan (In Progress, need help)

$
0
0

@antonis wrote:

I really love AlexxIt’s Sonoff Lan HACS Integration. Sonoff should put him on the payroll TBH.
I m trying to integrate my GS WDS07 door sensors to Hass in a meaningful way without Tasmotizing it. I m so close, yet so far… I guess this is our life story when we work on our smart homes. :smile:

I paired the contacts in eWelink app as alarms, restarted the server and this is the message I get under STATES in Sonoff Bridge.

manufacturer: SONOFF
model: RFBridge
sw_version: PSF-BRA-GL v3.4.1
local: online
command: 1
ts: 2020-05-29T09:26:26.000Z
name: Freezer 1 Door Closed
friendly_name: BasementBridge
supported_features: 1


manufacturer: SONOFF
model: RFBridge
sw_version: PSF-BRA-GL v3.4.1
local: online
command: 0
ts: 2020-05-29T09:26:26.000Z
name: Freezer 1 Door Open
friendly_name: BasementBridge
supported_features: 1

When listening to state_changed events I get this.

Event 43 fired 7:11 AM:

{
    "event_type": "state_changed",
    "data": {
        "entity_id": "remote.sonoff_1000ae9d28",
        "old_state": {
            "entity_id": "remote.sonoff_1000ae9d28",
            "state": "on",
            "attributes": {
                "manufacturer": "SONOFF",
                "model": "RFBridge",
                "sw_version": "PSF-BRA-GL v3.4.1",
                "local": "online",
                "command": 0,
                "ts": "2020-05-30T04:23:28.000Z",
                "name": "Freezer 1 Door Open",
                "friendly_name": "BasementBridge",
                "supported_features": 1
            },
            "last_changed": "2020-05-30T03:59:38.129868+00:00",
            "last_updated": "2020-05-30T04:23:27.921023+00:00",
            "context": {
                "id": "2fddd93eb858438fbc6ece5455502a6b",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "remote.sonoff_1000ae9d28",
            "state": "on",
            "attributes": {
                "manufacturer": "SONOFF",
                "model": "RFBridge",
                "sw_version": "PSF-BRA-GL v3.4.1",
                "local": "online",
                "command": 1,
                "ts": "2020-05-30T04:23:33.000Z",
                "name": "Freezer 1 Door Closed",
                "friendly_name": "BasementBridge",
                "supported_features": 1
            },
            "last_changed": "2020-05-30T03:59:38.129868+00:00",
            "last_updated": "2020-05-30T04:23:32.317201+00:00",
            "context": {
                "id": "d2522b9baa6941e18d3e5dcae089f40c",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2020-05-30T04:23:32.317224+00:00",
    "context": {
        "id": "d2522b9baa6941e18d3e5dcae089f40c",
        "parent_id": null,
        "user_id": null
    }
}

The only unique thing to each event that I can see is the “command” portion which is the order I used when pairing in the app

0 was the first pairing (Door 1 closed)
1 was the second pairing (Door 1 open)
etc.

Could someone please shed some light as to how to “extract” this command portion and use it in order to build a door state card in lovelace?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 102445

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>