Advertisement
-Teme-

Shelly gen2 config http calls

Oct 20th, 2022 (edited)
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. // Shelly http commands to set up new shelly device
  2. //
  3. // replace square bracket names with your network specific values
  4. // values in Square brackets are variables what need to change per device
  5. // shelly-name
  6. // shelly-ip
  7. // ...and few more...
  8. //
  9. // set shelly device to power and join device provided SSID (e.g. shelly-A3D1B8)
  10. // call commands row by row, wait a moment after each call
  11.  
  12.  
  13. // device basic config
  14. http://192.168.33.1/rpc/Sys.SetConfig?config={"device":{"name":"[devie-name]"}}
  15. http://192.168.33.1/rpc/MQTT.SetConfig?config={"enable":true,"server":"[srv-ip]:1883","user":"mqtt-user","pass":"[mqtt-pass]","client_id":"[device-client_id]","topic_prefix":"[device-topic]","rpc_ntf":true,"status_ntf":true}
  16. http://192.168.33.1/rpc/Sys.SetConfig?config={"location":{"tz":"[your/timezone]"","lat":[latitude],"lon":[longitude]},"sntp":{"server":"[ntp-local]"}}
  17.  
  18. // if want to keep std device name as device ID & Device topic
  19. http://192.168.33.1/rpc/MQTT.SetConfig?config={"enable":true,"server":"[srv-ip]:1883","user":"mqtt-user","pass":"[mqtt-pass]","rpc_ntf":true,"status_ntf":true}
  20.  
  21. http://192.168.33.1/rpc/WiFi.SetConfig?config={"sta":{"ssid":"[wifi-SSID]","pass":"[wifi-pass]","enable":true,"ipv4mode":"static","ip":"[shelly-ip]","netmask":"[mask]","gw":"[gw-ip]","nameserver":"[dns-ip]"}}
  22.  
  23. http://192.168.33.1/rpc/Shelly.Reboot
  24.  
  25. // addition if want rename relay & input channel names
  26. http://192.168.33.1/rpc/Switch.SetConfig?id=0&config={"name":"[relay-name]"} #change id=0 according channel 0-3
  27. http://192.168.33.1/rpc/Input.SetConfig?id=0&config={"name":"[input-name]"} #change id=0 according channel 0-3
  28.  
  29. // auto reboot every 3 days at time 5:11 adjust that accordingly
  30. http://192.168.33.1/rpc/Schedule.Create?timespec="0 11 5 1/3 * *"&calls=[{"method":"Shelly.Reboot","origin":"shelly_service"}]
  31.  
  32. http://[shelly-ip]/rpc/Shelly.CheckForUpdate
  33. http://[shelly-ip]/rpc/Shelly.Update
  34. http://[shelly-ip]/rpc/Shelly.Update?stage="beta"
  35.  
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement