HA will lose knowledge that it has my Zwave/Zigbee stick plugged into the USB port. I’ve tried different port, different extensions. Those dont seem to matter.
I’ve tried killing power to HA (Blue device), that doesnt work.
Only thing that works is unplugging the stick and plugging it back in. Which is great when I am home and it happens. But when I am not home, I have no way to get my Zwave/Zigbee back up.
So my thought was if I had a mains powered USB hub, then I could connect it to a WIFI outlet. If I see HA has forgot it has a stick plugged into it, I could kill power to the wifi outlet and then restore it.
Sure, I connected a serial adapter to the pins on the board as shown here and flashed. The pins are there also and a good video link. It shows Tasmota but I just flashed an Esphome bin instead. My Esphome config for switching an LED keyboard mat is below.
esphome:
name: keyboard-mat
comment: SINILINK USB
esp8266:
board: esp8285
restore_from_flash: true
wifi:
networks:
- ssid: network
password: !secret wifi_password
ap:
ssid: ESP Keyboard Mat
password: !secret wifi_password
fast_connect: true
captive_portal:
logger:
api:
ota:
binary_sensor:
- platform: gpio
pin: GPIO4
name: Keyboard Mat Button
- platform: status
name: Keyboard Mat ESP Status
output:
- platform: gpio
id: mosfet
pin: GPIO05
light:
- platform: binary
name: Keyboard Mat Light
output: mosfet
sensor:
- platform: wifi_signal
name: Keyboard Mat Light WiFi Signal
update_interval: 60s
text_sensor:
- platform: wifi_info
ip_address:
name: Keyboard Mat Light IP
ssid:
name: Keyboard Mat Light SSID
mac_address:
name: Keyboard Mat Light MAC
button:
- platform: restart
name: Keyboard Mat Light Restart
Okay but now I actually have a another question lol. So that code you shared is that just the bin or is that the YAML too?
So my only experience with ESP home was I purchased a ESP board and connected a time of flight sensor to it and I found yaml template that I just had to slightly modify and then I wrote it to the chip.
With this project is that also all I would be doing with the code you shared? Or do I need to flash the chip with the code you provided and then also something else? I just think I’m not grasping something right now
You need to create a new device in the esphome dashboard, paste in the yaml code above, edit it to suit you (names etc) and flash using esphome to the Sinilink USB module with usb cable from the machine to the Sinilink USB module
If you’re not sure about flashing with esphome, have a look at the esphome docs:
Thanks for the recommendation. I’ve ordered and received one of these, flashed it with ESPHome and have freed up a mains smart plug that was running my kitchen tablet USB charger, as I now use this device inline. Bonkers cheap for what it is.
@Troon are you saying you ordered a sinilink AFTER i created this post? If so, where the heck did you order from that you already got it??? Soonest I could find was Jan 31.
Yes. I ordered it from AliExpress on 10 Jan: they were suggesting it might be early Feb before it turned up, but Andy my friendly local Evri delivery man popped it through my door (UK) on 18 Jan.
I got the sinilink and flashed it with your code. Only changing the wifi for now until I get an understanding on what the rest of the code does.
When I go into HA and look at the device, 'Keyboard Mat Light" under controls turns off and on the usb (i see a red light on the unit turn off and on). Great!
But what is the “Keyboard Mat Button” sensor for? Its always showing on.