Skip to content

Commit

Permalink
1st version after that of s guernion version with
Browse files Browse the repository at this point in the history
3 parameterization elements at the level
  by homeassistant
- RfxComBridge (loglevel and protocols listened to)
- New RFX device (with and without discovery)
- New Dio receiver
  • Loading branch information
zdid committed Jan 10, 2025
1 parent 09c2a65 commit e9d27bf
Show file tree
Hide file tree
Showing 52 changed files with 3,504 additions and 1,371 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: sguernion/rfxcom2mqtt
images: zdid/rfxcom2hass
tags: |
type=raw,value=latest,enable={{is_default_branch}}
Expand Down
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
// Pointez pour afficher la description des attributs existants.
// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "TS-1Node",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/ts-node",
"runtimeArgs": [
"--transpile-only",
// if you use esm
//"--esm"
],
"program": "${workspaceFolder}/src/dev.ts",
"preLaunchTask": "tsc: build - tsconfig.json",
"cwd": "${workspaceRoot}",
"skipFiles": ["<node_internals>/**", "node_modules/**"],
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}
18 changes: 18 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": [
"$tsc-watch"
],
"group": {
"kind": "build",
"isDefault": true
},
"label": "tsc: espion - src/tsconfig.json"
}
]
}
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RFXCOM2MQTT
# RFXCOM2HASS

[![RFXCOM](rfxcom.png)](http://www.rfxcom.com)

RFXCOM to MQTT bridge for RFXtrx433 devices
RFXCOM to MQTT bridge for home assistant

All received RFXCOM events are published to the MQTT rfxcom2mqtt/devices/\<id\> topic.
All received RFXCOM events are published to the MQTT rfxcom2hass/devices/\<id\>/state topic.
It is up to the MQTT receiver to filter these messages or to have a register/learning/pairing mechanism.

## [Getting started](./docs/README.md)
Expand All @@ -16,9 +16,26 @@ The [documentation](./docs/README.md) provides you all the information needed to

### [Home Assistant Integration](./docs/usage/integrations/home_assistant.md)

The easiest way to integrate Rfxcom2MQTT with Home Assistant is by
The easiest way to integrate Rfxcom2hass with Home Assistant is by
using [MQTT discovery](https://www.home-assistant.io/integrations/mqtt#mqtt-discovery).
This allows Rfxcom2MQTT to automatically add devices to Home Assistant.
This allows Rfxcom2hass to semi-automatically add devices to Home Assistant.

A dedicated panel on home assistant allows the setting of new rfx inputs. (New Rfx Device in MQTT appareils )
Automatic Discovery is disable.
<img align="left" height="100px" width="100px" src="newrfxdevice.png">
Panel New Rfx Device
(Create and modify existant Rfx Device)
Enable discovery on panel
Example: For a DIO element, click on discovery, press the dio button, it appears in the panel, disable discovery, complete the description and validate

Panel New Dio Receiver
(Create and modify existant Rfx Device)
It also allows you to declare elaborate devices: such as lights or blinds.
You will bring up these devices and not the buttons in HomeAssistant

The system is open. You can create other elaborate device programs. You have to add them to the "virtualsdevices" directory, and complete the "index.ts" file of "virtualsdevices"



### Configuration

Expand Down Expand Up @@ -69,5 +86,5 @@ build multi Arch image
docker buildx build \
--platform linux/amd64,linux/arm/v7 \
--push \
-t sguernion/rfxcom2mqtt .
-t zdid/rfxcom2hass .
```
115 changes: 30 additions & 85 deletions config.sample.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,36 @@

loglevel: 'info'
healthcheck:
enabled: true
cron: '*/5 * * * *'
cacheState:
enable: true,
saveInterval: 5

loglevel: info
healthcheckminutesfrequency: 5
homeassistant:
discovery: true
discovery_topic: homeassistant
discovery_device: rfxcom2mqtt

discovery: false
base_topic: rfxcom2hass
discovery_bridge_unique_id: bridge_000001
topics:
discovery: homeassistant/device/%discovery_bridge_unique_id%/%device_unique_id%/config
command: "%base_topic%/%discovery_bridge_unique_id%/%device_unique_id%/%sensortype%"
state: "%base_topic%/%discovery_bridge_unique_id%/%device_unique_id%/state"
will: "%base_topic%/%discovery_bridge_unique_id%/status"
homeassistant_availability: homeassistant/status
ecoute: "%base_topic%/%discovery_bridge_unique_id%/#"
mqtt:
base_topic: rfxcom2mqtt
server: tcp://<IP ADDRESS>
username: <USERNAME>
password: <PASSWORD>
base_topic: rfxcom2hass
include_device_information: false
qos: 0
retain: false

retain: true
server: tcp://homeassistant.local
username: your_user
password: your_password
format_json: true
rfxcom:
usbport: /dev/ttyUSB0
debug: false
enable_protocols:
- AC
- ARC
- LIGHTWAVERF
- OREGON
- X10
usbport: /dev/ttyUSB0
transmit:
repeat: 4
lighting1:
- X10
- ARC
- ELRO
- PHILIPS_SBC
lighting2:
- AC
- HOMEEASY_EU
lighting3:
- KOPPLA
lighting4:
- PT2262
receive:
- temperaturehumidity1
- homeconfort
- lighting1
- lighting2
- lighting3
- lighting4
- remote
- security1

devices:
- id: '0x5C02'
friendlyName: 'Bathroom Temp & Hum'

- id: '0xB9459A'
friendlyName: 'Garden motion'

- id: '1001010/1'
name: 'CucuDimmer'
friendlyName: 'Kitchen Dimmer Light'
type: 'lighting2'

- id: '0x012E00FF'
friendlyName: 'Living Room switch'

- id: '0x00ED400F'
name: 'Lights'
units:
- unitCode: '1'
name: 'Light1'
friendlyName: 'Living Room'
- unitCode: '2'
name: 'Light2'
friendlyName: 'Kitchen'
- unitCode: '3'
name: 'Light3'
friendlyName: 'Garage'
- unitCode: '4'
name: 'Light4'
friendlyName: 'Garden'
type: 'lighting2'

- id: '0x3D090F'
name: 'Switch1'
command: 'on'
friendlyName: 'Living Room Lights on'
type: 'lighting4'
- id: '0x3D090E'
name: 'Switch1'
command: 'off'
friendlyName: 'Living Room Lights off'
type: 'lighting4'
repeat: 2
cacheDevices:
enable: true,
saveInterval: 5
101 changes: 101 additions & 0 deletions data/devices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
lighting2_AC_0x017334A2_10:
protocol: lighting2
subtype: 0
subtypeValue: AC
unique_id: lighting2_AC_0x017334A2_10
id_rfxcom: 0x017334A2/10
device_id: 0x017334A2/10
unit_code: 10
name: bouton bas escalier
protocolOptions: []
repetitions: 2
sensors_types:
- level
- rssi
- switch
- switch
- switch
commands: &a2
switchOn: 0
switchOff: 0
setLevel: 1
suggested_area: boutons
device_name: &a1
- KlikAanKlikUit
- HomeEasy UK
- Chacon
- NEXA
- Intertechno
exists_choice: bouton bas escalier
discovery: false
message: ""
lighting2_AC_0x0156F0D6_11:
protocol: lighting2
unique_id: lighting2_AC_0x0156F0D6_11
device_id: 0x0156F0D6/11
name: "bouton bibliotheque (esc) "
device_name: *a1
id_rfxcom: 0x0156F0D6/11
subtype: 0
subtypeValue: AC
repetitions: 2
sensors_types:
- level
- rssi
- switch
commands: *a2
suggested_area: boutons
exists_choice: "bouton bibliotheque (esc) "
discovery: false
message: ""
lighting2_AC_0x0156F0D6_12:
protocol: lighting2
unique_id: lighting2_AC_0x0156F0D6_12
device_id: 0x0156F0D6/12
name: "bouton salle à manger(esc) "
device_name: *a1
id_rfxcom: 0x0156F0D6/12
subtype: 0
subtypeValue: AC
repetitions: 2
sensors_types:
- level
- rssi
- switch
- switch
- switch
commands: *a2
suggested_area: boutons
exists_choice: "bouton salle à manger(esc) "
lighting2_AC_0x01570D5A_11:
protocol: lighting2
unique_id: lighting2_AC_0x01570D5A_11
device_id: 0x01570D5A/11
name: bouton lampadaire (esc)
device_name: *a1
id_rfxcom: 0x01570D5A/11
subtype: 0
subtypeValue: AC
repetitions: 2
sensors_types:
- level
- rssi
- switch
commands: *a2
suggested_area: boutons
lighting2_AC_0x01570D5A_12:
protocol: lighting2
unique_id: lighting2_AC_0x01570D5A_12
device_id: 0x01570D5A/12
name: "bouton salon(esc) "
device_name: *a1
id_rfxcom: 0x01570D5A/12
subtype: 0
subtypeValue: AC
repetitions: 2
sensors_types:
- level
- rssi
- switch
commands: *a2
suggested_area: bouton
Loading

0 comments on commit e9d27bf

Please sign in to comment.