『瀚思彼岸』» 智能家居技术论坛

标题: 10块钱的联想智能插座:无损拆机+免焊接刷esphome [打印本页]

作者: szlww    时间: 2023-11-26 15:38
标题: 10块钱的联想智能插座:无损拆机+免焊接刷esphome
本帖最后由 szlww 于 2023-11-26 21:07 编辑

咸鱼买了十几个联想智能插座,esp8266ex芯片,10元/个。
这款插座比较小巧,插在插排上不会和其他插头打架,目前为止少见的小体积并且可以无损拆解的国标五孔插座,已经将家里的大块头智能插座全部替换成这一款了。

超声波焊接工艺,可以无损开盖,免焊接刷机。无损拆机详见前面的帖子:https://bbs.hassbian.com/thread-23429-1-1.html
免焊接刷机,使用废旧网口里面的四根弹片,GPIO0直接和esp芯片的外壳连接即可,另外需要将第四个弹片弯折90度,探入rx脚的背面与tx脚接触,手扶刷机。
刷机完成之后,塑料盖板的边缘涂上有机硅胶水或者免钉胶,把外壳重新黏合在一起,固化24小时后即可正常插拔使用,效果十分完美。
esphome yaml配置文件如下:
common/common.yaml
  1. esphome:
  2.   name: ${node_name}

  3. esp8266:
  4.   board: esp01_1m
  5.   restore_from_flash: false  

  6. wifi:
  7.   ssid: !secret wifi_ssid
  8.   password: !secret wifi_password
  9.   fast_connect: true
  10.   reboot_timeout: 30min
  11.   ap:
  12.     ssid: "${node_id} hotspot"
  13.     password: !secret ap_password

  14. logger:
  15.     level: INFO
  16. api:
  17.   password: !secret api_password
  18.   reboot_timeout: 1h
  19. ota:
  20.   password: !secret ota_password

  21. web_server:
  22.   port: 80
  23.   include_internal: true
  24.   version: 1

  25. text_sensor:
  26.   - platform: version
  27.     name: '${node_name_friendly}-Version'
  28.     id: ${node_id}_platform_version
  29.   - platform: wifi_info
  30.     ip_address:
  31.       name: "${node_name_friendly}-IP"
  32.       id: ${node_id}_ip
  33.     bssid:
  34.       name: "${node_name_friendly}-BSSID"
  35.       id: ${node_id}_bssid
  36.     mac_address:
  37.       name: "${node_name_friendly}-MAC"
  38.       id: ${node_id}_mac
  39.   - platform: template
  40.     name: '${node_name_friendly}-Uptime'
  41.     id: ${node_id}_uptime_human
  42. sensor:
  43.   - platform: uptime
  44.     id: ${node_id}_raw_up_time
  45.     update_interval: 15min
  46.     internal: true
  47.     on_raw_value:
  48.       then:
  49.         - text_sensor.template.publish:
  50.             id: ${node_id}_uptime_human
  51.             state: !lambda |-
  52.               int seconds = round(id(${node_id}_raw_up_time).raw_state);
  53.               int days = seconds / (24 * 3600);
  54.               seconds = seconds % (24 * 3600);
  55.               int hours = seconds / 3600;
  56.               seconds = seconds % 3600;
  57.               int minutes = seconds /  60;
  58.               seconds = seconds % 60;
  59.               return (
  60.                 (days ? String(days) + "d " : "") +
  61.                 (hours ? String(hours) + "h " : "") +
  62.                 (minutes ? String(minutes) + "m " : "") +
  63.                 (String(seconds) + "s")
  64.               ).c_str();
  65.   - platform: wifi_signal
  66.     name: "${node_name_friendly}-WifiSignal"
  67.     id: ${node_id}_wifi_signal
  68.     update_interval: 15min

  69.    
  70. binary_sensor:
  71.   - platform: status
  72.     name: "${node_name_friendly}-LinkStatus"
  73.     id: ${node_id}_link_status

  74. switch:
  75.   - platform: restart
  76.     name: "${node_name_friendly}-Restart"
  77.     id: ${node_id}_restart
复制代码

plug-lenovo.yaml
  1. substitutions:
  2.   button_pin: GPIO13
  3.   relay_pin: GPIO15
  4.   led_state_pin: GPIO2
  5.   led_relay_pin: GPIO0
  6.   node_name: plug-lenovo
  7.   node_id: plug_lenovo
  8.   node_name_friendly: ${node_name}
  9. packages:
  10.   common: !include common/common.yaml

  11. esphome:
  12.   name_add_mac_suffix: true

  13. binary_sensor:
  14.   - platform: gpio
  15.     name: "${node_name}-button"
  16.     id: "${node_id}_button"
  17.     pin:
  18.       number: $button_pin
  19.       inverted: true
  20.       mode:
  21.         input: true
  22.         pullup: true
  23.     on_press:
  24.       then:
  25.         - logger.log: "TOGGLE switch..."
  26.         - switch.toggle: ${node_id}_switch
  27. light:
  28.   - platform: monochromatic
  29.     name: ${node_name}-relay-led
  30.     id: ${node_id}_relay_led
  31.     output: ${node_id}_relay_led_pinout
  32.     default_transition_length: 200ms

  33.   - platform: status_led
  34.     name: ${node_name}-LinkLed
  35.     id: ${node_id}_link_led
  36.     pin:
  37.       number: $led_state_pin
  38.       inverted: true

  39. output:
  40.   - platform: esp8266_pwm
  41.     pin:
  42.       number: $led_relay_pin
  43.       inverted: true
  44.     id: ${node_id}_relay_led_pinout

  45. switch:
  46.   - platform: safe_mode
  47.     name: ${node_name}-safemode
  48.     id: "${node_id}_safemode"

  49.   - platform: gpio
  50.     pin: $relay_pin
  51.     name: "${node_name}-switch"
  52.     id: "${node_id}_switch"  
  53.     on_turn_on:
  54.       then:
  55.         - light.turn_on: ${node_id}_relay_led
  56.     on_turn_off:
  57.       then:
  58.         - light.turn_off: ${node_id}_relay_led
复制代码






作者: 隔壁的王叔叔    时间: 2023-11-26 17:20
分享一下购买链接啦
作者: szlww    时间: 2023-11-26 17:42
隔壁的王叔叔 发表于 2023-11-26 17:20
分享一下购买链接啦

搜索一下 联想智能插座。我买那家已经没了,因为我打包了。
作者: 隔壁的王叔叔    时间: 2023-11-26 17:45
szlww 发表于 2023-11-26 17:42
搜索一下 联想智能插座。我买那家已经没了,因为我打包了。

厉害,其实我去年买的博联的那些个开关都还没有用完。哈哈
作者: bugensui    时间: 2023-11-26 20:24
这款插座,自带esp芯片的是吗,
作者: szlww    时间: 2023-11-26 20:57
bugensui 发表于 2023-11-26 20:24
这款插座,自带esp芯片的是吗,

是的。上面有拆机图片,是esp8266ex
作者: 落花萧然    时间: 2023-11-26 23:10
没了
涨价了?
作者: yingkkk    时间: 2023-11-27 10:43
请问这个有功率监测功能吗?
作者: szlww    时间: 2023-11-28 18:43
yingkkk 发表于 2023-11-27 10:43
请问这个有功率监测功能吗?

没有。目前没找到小巧好拆的功率插座
作者: szlww    时间: 2023-11-28 18:46
本帖最后由 szlww 于 2023-11-28 18:48 编辑
落花萧然 发表于 2023-11-26 23:10
没了
涨价了?

咸鱼有很多吧。20元左右的打包砍价试试。我买那家标价29元一个,砍价到10元一个
作者: yuandygo    时间: 2023-12-11 21:37
szlww 发表于 2023-11-28 18:46
咸鱼有很多吧。20元左右的打包砍价试试。我买那家标价29元一个,砍价到10元一个 ...

请问有刷机保姆教程吗?箱底有几个esp8266ex谢谢!!!
作者: szlww    时间: 2023-12-11 23:15
yuandygo 发表于 2023-12-11 21:37
请问有刷机保姆教程吗?箱底有几个esp8266ex谢谢!!!

vcc gnd tx rx gpio这几个连接上然后开始刷就行了,如果不会编译esphome固件,就下载个tasmota固件,然后设置gpio就行了。
作者: ProteinPig    时间: 2025-1-10 13:04
想请教一下这个插座还有没有空闲的GPIO,想再接个ds18b20做个温度控制的插座。
作者: cvip    时间: 2025-6-11 08:44
请问一下,我的怎么出现了这个界面,是联想341A插座,gpio改了。
作者: cvip    时间: 2025-6-11 09:45
请教一下,为什么联不上网时不自动打开选择wifi的那个界面呢?




欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/) Powered by Discuz! X3.5