Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.89 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.89 KB

Voltlet

It lets you control Etekcity Voltson smart plugs via your local server rather than Etekcity's cloud.

Getting started

  • You need to redirect server2.vesync.com to the computer running voltlet.
  • Build it:
    • For your platform: go build -o voltlet-armhf main.go
    • To cross compile for a raspberry pi 3: GOOS=linux GOARCH=arm GOARM=6 go build -o voltlet-armhf main.go
  • Run it: ./voltlet -mqtt-broker $MQTT_BROKER -mqtt-user $MQTT_USER -mqtt-password $MQTT_PASSWORD
  • Restart your plugs so that they connect to the local server.

MQTT

  • Send "true" to turn on the plug to /voltson/{plug-uuid}
  • Send "false" to turn off the plug to /voltson/{plug-uuid}
  • Plugs send "true" or "false" to /voltson/{plug-uuid}/state once they've actually changed state. Messages are retained.
  • Plugs send "online" or "offline" to /voltson/{plug-uuid}/availability depending on whether they are connected. Messages are retained.

Home Assistant Example

  - platform: mqtt
    command_topic: "/voltson/UUID-GOES-HERE"
    state_topic: "/voltson/UUID-GOES-HERE/state"
    availability_topic: "/voltson/UUID-GOES-HERE/available"
    retain: true
    payload_on: 'true'
    payload_off: 'false'

TODO

  • Make a build script
  • Report energy usage via MQTT
  • Make it more robust against disconnects from plugs

References

  • vesync-wsproxy this project just proxies the connect to the cloud server to spy on what happens. I'd rather keep my data local.
  • This project attempted to do something similar but wasn't fully implemented. That said it has great notes about the line protocol