(Using GNU/Linux):
git clone https://github.com/fquinto/bticinoClasse300x.git
cd bticinoClasse300x
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install -r requirements.txt
sudo python3 main.py
(Using Docker):
git clone https://github.com/fquinto/bticinoClasse300x.git
cd bticinoClasse300x
docker compose run bticino
Get some tools: firmware and flashing tool. https://www.bticino.com/software-and-app/configuration-software/
Product page: https://www.homesystems-legrandgroup.com/en/home/-/productsheets/2493426
Use name of the script: openbuildingdoor.sh
- Script one:
#!/usr/bin/expect -f
spawn ssh bticino
expect "assword:"
send "pwned123\r"
expect "root@C3X-00-03-50-xx-xx-xx-yyyyyyy:~#"
send "echo *8*19*20## |nc 0 30006\r"
send "sleep 1\r"
send "echo *8*20*20##|nc 0 30006\r"
send "exit\r"
interact
- Script two:
#!/bin/bash
sshpass -p pwned123 ssh -o StrictHostKeyChecking=no bticino "echo *8*19*20## |nc 0 30006; sleep 1; echo *8*20*20##|nc 0 30006"
- Direct test:
ssh bticino 'echo *8*19*20## |nc 0 30006; sleep 1; echo *8*20*20##|nc 0 30006'
Depends of your configuration you need to create a script of write directly command in HA.
In next example are both. You can use only one (you don't need both if one it's running ok).
- Add your script in
shell_components
folder - Configure in HA:
shell_command: openbuildingdoor: "/home/homeassistant/.homeassistant/shell_commands/openbuildingdoor.sh" openbuildingdoor2: "ssh bticino 'echo *8*19*20## |nc 0 30006; sleep 1; echo *8*20*20##|nc 0 30006'"
- In your
ui-lovelace.yaml
:cards: - type: button name: Open building door CMD1 show_state: false show_name: true show_icon: true tap_action: action: call-service service: shell_command.openbuildingdoor - type: button name: Open building door CMD2 show_state: false show_name: true show_icon: true tap_action: action: call-service service: shell_command.openbuildingdoor2
Go inside mqtt_scripts folder and follow steps: MQTT
- Go to your home:
cd ~
- On your Linux computer type:
ssh [email protected] '/usr/sbin/tcpdump -i lo -U -w - "not port 22"' > recordingsFILE
- Use the App on your mobile and open the door or whatever you want to "learn"
- Stop data recording: CTRL + C
- Open recordingsFILE:
wireshark ~/recordingsFILE