먼저 제품의 ssid로 연결한 후 192.168.4.1로 접속해 공유기 ssid세팅후 재부팅. 공유기에 접속후 등록된 smalltv ultra의 mac 어드레스 확인 후 고정 ip를 부여.
예를 들면 openwrt에선 네트워크/dhcp및dns/정적임대에 smalltv ultra의 맥어드레스와 원하는 ip로 등록. 이후 기존 임대된 ip는 제거하고 smalltv ultra 재부팅하면 부여된 ip로 등록됨.
해당 ip로 접속해 설정창의 버튼들을 HA의 rest_command에 등록해 자동화와 dashboard의 버튼으로 등록.
** 날짜와 요일만 디스플레이에 크게 출력하고 싶었는데 테마를 편집해 사용자화 할 수 없는 게 아쉬움.
** 칩셋은 esp8266을 사용하는데 esp32를 쓰는 pro모델이 esphome을 올려 다용도로 쓰기에는 날 것 같음.
configuration.yaml
automations: !include automations.yaml
rest_command: !include rest_command.yaml
rest_command.yaml
smalltv_color_day:url: "http://192.168.1.90/set?hc=%2300FFFF&mc=%23FF00FF&sc=%23FF5900"smalltv_color_night:url: "http://192.168.1.90/set?hc=%23FF00FF&mc=%23FF00FF&sc=%23FF5900"
smalltv_theme1:url: "http://192.168.1.90/set?theme=1"smalltv_theme2:url: "http://192.168.1.90/set?theme=2"smalltv_theme3:url: "http://192.168.1.90/set?theme=3"smalltv_theme4:url: "http://192.168.1.90/set?theme=4"smalltv_theme5:url: "http://192.168.1.90/set?theme=5"smalltv_theme6:url: "http://192.168.1.90/set?theme=6"smalltv_theme7:url: "http://192.168.1.90/set?theme=7"smalltv_brightness_10:url: "http://192.168.1.90/set?brt=10"smalltv_brightness_20:url: "http://192.168.1.90/set?brt=20"smalltv_brightness_50:url: "http://192.168.1.90/set?brt=50"smalltv_brightness_100:url: "http://192.168.1.90/set?brt=100"smalltv_reboot:url: "http://192.168.1.90/set?reboot=1"
automations.yaml
- id: 시간-일출alias: 시간-일출
triggers:
- trigger: sun
event: sunrise
offset: '00:15:00'
actions:
- action: frontend.set_theme
data:
name: plate-light
- action: rest_command.smalltv_color_day
- delay: '00:00:01'
- action: rest_command.smalltv_brightness_50