Looking for some general help here and I will post this also in the TP-Link specific forum, but I believe the usage/application is more global.
I use the TP-Link plug-in to control 40+ Kasa devices (generally HS200 and HS220 dimmers and switches). The plug-in works great, with one exception. My devices periodically seem to lose their communication with the network, then get it back. Not normally as issue as the TP-Link plugin polls the devices and keeps track of consecutive failures to communicate. The problem is that periodically devices get deactivated and need to be (1) notices and then (2) manually re-activated in the console. Obviously the best solution would be to identify why the devices go on and off line and rectify the problem, but I suspect it is simply the general behavior of devices and wifi access point in multiple locations of a large house competing with one another (RSSI is very strong on all devices normally). I have been trying to nail this down for years now and have given up.
Absent a global solution to eliminate the problem, the next best thing would be to write a script that would poll all TP-Link devices that are deactivated (comm field set to off) and activate them. I imagine what I want to do is scan all devices where indigo.device.enable(dev.id, value=False) and reset the field value to true for them. I could then run this routine every 30 minutes or so so fix most of my issues. Unfortunately my programing skills in Python are limited so any help /suggestions would be most appreciated. I believe this is a relatively simple process to do.
Thanks in advance...
Turning on devices that are deactivated
Python scripts to do various things. These would be scripts that talk directly with Indigo (use indigo.* methods).
Re: Turning on devices that are deactivated
If I understand the situation, something like this should work.
Code: Select all
plugin = indigo.server.getPlugin("YOUR-PLUGIN-ID-HERE") # get this from the plugin menu "Copy Plugin ID"
if plugin.isEnabled:
for dev in indigo.devices.iter(filter=plugin.pluginId):
if not dev.enabled:
indigo.device.enable(dev.id, True)
I came here to drink milk and kick ass....and I've just finished my milk.
My Plugins and Scripts
My Plugins and Scripts
Jump to
- Indigo Help
- ↳ Announcements
- ↳ New to Indigo/Home Automation
- ↳ Installing/Moving/Upgrading/Uninstalling Questions
- ↳ Basic Usage Questions
- ↳ Devices
- ↳ Triggers and Triggering Events
- ↳ Schedules
- ↳ Conditions
- ↳ Action Groups and Actions
- ↳ Variables
- ↳ Control Pages
- ↳ Feature Requests
- ↳ Hardware Support Inquiries and Requests
- ↳ Supported Interfaces/Technologies
- ↳ Z-Wave
- ↳ INSTEON
- ↳ Indigo Virtual Devices
- ↳ X10
- ↳ Supported Hardware
- ↳ Interfaces
- ↳ Digital/Analog I/O Modules
- ↳ Energy Monitoring/Reporting
- ↳ Locks and Lock Controllers
- ↳ Motion Detectors and Sensors
- ↳ Motor/Speed and Shade/Blinds Controllers
- ↳ Outlets and Inline Modules
- ↳ Plug-in Lamp/Appliance Modules and Bulbs
- ↳ IR and A/V Devices
- ↳ Scene/Multi-Button Controllers
- ↳ Sprinkler/Irrigation Controllers
- ↳ Switches
- ↳ Thermostats
- ↳ Miscellaneous Devices
- ↳ Built-in Plugins
- ↳ Airfoil Pro
- ↳ Old Airfoil Discussions
- ↳ Alexa
- ↳ EasyDAQ Relay Card
- ↳ Email+
- ↳ Global Property Manager
- ↳ iTunes (Discontinued)
- ↳ NOAA Weather
- ↳ SQL Logger
- ↳ Timers and Pesters
- ↳ WeatherSnoop
- ↳ Growl (Discontinued)
- ↳ iCal Alarm Processor (Discontinued)
- ↳ Indigo Server Software
- ↳ Indigo Mac Client App
- ↳ Indigo Touch for iOS
- ↳ Indigo Touch for the Web
- ↳ Indigo Reflectors (remote access)
- ↳ Extending Indigo
- ↳ Python Scripting
- ↳ Plugin SDK and Development
- ↳ Client APIs
- ↳ Integrating Services/Applications
- ↳ Hacking
- ↳ Help Converting to Python 3
- ↳ Help Converting from AppleScript
- ↳ AppleScript Scripting
- ↳ Extending Indigo with Plugins and Python
- ↳ Indigo Accounts, Website, Forums, How-To Wiki, and Documentation
- ↳ Archived Posts
- 3rd Party Plugins and Developers
- ↳ Plugin Lists
- ↳ Developer Information for this Forum
- ↳ AaronLionsheep’s Plugins
- ↳ ShellyMQTT
- ↳ ShellyNGMQTT
- ↳ AB's Plugins
- ↳ AD2USB Alarm Interface
- ↳ Anyone's Plugins
- ↳ Autolog's Plugins
- ↳ Dynamic View Controller
- ↳ Foscam HD Controller
- ↳ Hubitat
- ↳ LIFX Controller
- ↳ nanoleaf Controller
- ↳ Roon Controller
- ↳ SMAPPEE Controller
- ↳ Squeezebox Controller
- ↳ Starling Bridge
- ↳ Stella-Z Thermostat Controller
- ↳ Touch Portal
- ↳ TRV Controller
- ↳ Z-Wave Interpreter
- ↳ Zigbee2mqtt
- ↳ Benjamin Schollnick's Plugins
- ↳ Berkinet's Plugins
- ↳ Bill's Plugins
- ↳ Bouncing Ball LTD
- ↳ Dave's Plugins
- ↳ Announcements Plugin
- ↳ Bike Share Plugin
- ↳ Dave's Scripts
- ↳ Fantastic Weather Plugin
- ↳ GhostXML Plugin
- ↳ Matplotlib Plugin
- ↳ Multitool Plugin
- ↳ OWServer Plugin
- ↳ Thingspeak Plugin
- ↳ WUnderground Plugin
- ↳ WUnderstation Plugin
- ↳ Z-Wave Node Matrix Plugin
- ↳ Duncan’s Plugins
- ↳ FlyingDiver's Plugins
- ↳ Better Email
- ↳ Ecobee
- ↳ Harmony Hub
- ↳ Home Assistant Agent
- ↳ LIFX Bridge
- ↳ Lutron
- ↳ miniUniFi
- ↳ MQTT
- ↳ Trane Nexia
- ↳ Twilio
- ↳ Other Plugins
- ↳ Discontinued Plugins
- ↳ RFPlayer
- ↳ MyQ
- ↳ GlennNZ's Plugins
- ↳ Actron QUE AC Plugin
- ↳ AppleTV Plugin
- ↳ BlueIris
- ↳ DeepState AI Plugin
- ↳ Emby Plugin
- ↳ Enphase Envoy Solar
- ↳ ESPHome4Indigo
- ↳ FindFriendsMini Plugin
- ↳ Gecko Spa Plugin
- ↳ Holiday Plugin
- ↳ HomeKitLink Siri
- ↳ iMessage
- ↳ iRoomba iRobot Plugin
- ↳ LedSimple Effects Plugin
- ↳ Paradox Alarm Plugin
- ↳ Sipura SPA VOIP Plugin
- ↳ Sunrise Plugin
- ↳ Tesla Battery
- ↳ Windows PC Remote Plugin
- ↳ Greg Glockner's Plugins
- ↳ Greg's Plugins
- ↳ Honeywell TC2 Security
- ↳ howartp's Plugins
- ↳ Clock Display
- ↳ EnergyLink
- ↳ Font Awesome
- ↳ Honeywell Evohome
- ↳ MyEnergi Hub
- ↳ Neo Smart Blinds
- ↳ Pulse Counter
- ↳ Sense Home Energy
- ↳ Sensibo
- ↳ Somfy Manager
- ↳ Tesla EV Control
- ↳ Variable Devices
- ↳ Verisure Alarm
- ↳ Volvo On Call
- ↳ Wakeup Scheduler
- ↳ ZWave Lock Manager
- ↳ ZWave Sensor Logger
- ↳ ZWave Scene Controller
- ↳ ZWave Watcher
- ↳ Zwave Window Controller
- ↳ Jason's Plugins
- ↳ GitHub Plugin Updater
- ↳ Network Devices
- ↳ Power Source
- ↳ Prometheus Client
- ↳ Prowl Notify
- ↳ RToggle
- ↳ Webcam
- ↳ XMPP Client
- ↳ JoyUnspeakable - Plugins by David Garozzo
- ↳ Bouncie OBD Plugin
- ↳ On-Screen Keyboard Plugin
- ↳ Automatic OBD-II (discontinued)
- ↳ Karl's Plugins and Scripts
- ↳ AppleTV Plugin
- ↳ ARDUINO Plugin
- ↳ Devices and Variables
- ↳ FINGSCAN
- ↳ Homematic Plugin
- ↳ homeAway - presence
- ↳ Hue Lights
- ↳ Archives
- ↳ Indigo Utilities
- ↳ INDIGOplotD
- ↳ Migrate SQLite to PostgreSQL
- ↳ Min / Max / Average Plugin
- ↳ Mother Plugin
- ↳ piBeacon
- ↳ SecondsSinceLastChange Plugin
- ↳ Shelly Plugin
- ↳ Simple Applescript to Indigo (SATI) Interface
- ↳ startupAction Plugin
- ↳ uniFi-WiFi-AP
- ↳ kmarkley's plugins
- ↳ Kwijibo007’s Plugins
- ↳ Doorbird
- ↳ Monoprice 6 Zone Amp
- ↳ SSH Switch
- ↳ Samsung TV
- ↳ Mpoulson’s Plugins
- ↳ Ring Doorbell
- ↳ Mr.Slim Heat Pump
- ↳ NuHeat Heated Floors
- ↳ EMA\BlueFrog Solar Micro-Inverters
- ↳ PurpleAir
- ↳ Nathan Williams' Plugins
- ↳ Nick's Plugins
- ↳ Autelis Jandy
- ↳ Autelis Somfy
- ↳ Hikvision Camera Alerts
- ↳ Honeywell Thermostat
- ↳ TED 5000
- ↳ Neil's Plugins
- ↳ Daikin Wifi Controller
- ↳ GivEnergy Cloud Controller
- ↳ Glow IHD/CAD Energy Monitor
- ↳ Honeywell Evohome
- ↳ Jaguar/Land Rover InControl
- ↳ Octopus Energy Agile Tariff
- ↳ Solcast Solar Forecast
- ↳ Velux Active
- ↳ WLED LED Controller
- ↳ papamac’s plugins
- ↳ Virtual Garage Door
- ↳ Pi GPIO
- ↳ Perry the Cynic
- ↳ racarter's plugins
- ↳ Blink
- ↳ Heatmiser Neo
- ↳ Hive
- ↳ Netatmo Multi
- ↳ Sunsynk
- ↳ Tapo
- ↳ Texecom
- ↳ Tuya
- ↳ Watchdog
- ↳ raneil's corner
- ↳ rbdubz3's Plugins
- ↳ Smart Setpoints
- ↳ Sylvania Lightify
- ↳ Light Scenes
- ↳ RFXCOM
- ↳ RogueProeliator's Plugins and Apps
- ↳ TiVo Network Remote
- ↳ Roku Network Remote
- ↳ Niles Audio Zone Receiver
- ↳ Sharp TV Network Remote
- ↳ Sony Bravia Network Remote
- ↳ DomoPad Android Client
- ↳ Onkyo Receiver
- ↳ Plex Media Server Manager
- ↳ Google Assistant
- ↳ Ryan Buckner's Plugins
- ↳ Simon’s Plug-ins
- ↳ Netro Irrigation
- ↳ TwitchCaptain's Home Automation Bazaar
- ↳ Broadlink Devices
- ↳ APC Metered Rack PDU
- ↳ Captain’s Recapitulation
- ↳ VTMikeL's plugins
- ↳ August Home
- ↳ Google Vision
- ↳ Just Add Power
- ↳ Security Spy Helper
- ↳ Grafana
- ↳ WeatherSnoop
- ↳ WebDeck Software
- ↳ WonderSlug's Plugins
- ↳ Archives (developer left platform)
- ↳ Bert's Plugins
- ↳ Indify
- ↳ Chameleon Plugins
- ↳ NEST Home
- ↳ iTravel
- ↳ LED Device Manager
- ↳ iFindStuff
- ↳ Bip's Plugins
- ↳ Colorado4Wheeler’s Plugins by EPS
- ↳ Unsupported and Legacy Plugins
- ↳ Homebridge Buddy
- ↳ Device Extensions Plugin
- ↳ HomeKit Bridge
- ↳ LCD Creator
- ↳ Other Indigo Bits and Bytes
- ↳ Room-O-Matic
- ↳ Scene Toggle
- ↳ Super Conditions (IF-THEN-ELSE)
- ↳ Firstnibble
- ↳ iAutomate.com Long Range RFID Plugin
- ↳ indilinq
- ↳ Jacob Lindehoff's Plugins
- ↳ Kristian's Plugins
- ↳ Mission Machines' Plugins
- ↳ Nathan Sheldon Software
- ↳ Proxidyne
- ↳ Sean's Plugins
- ↳ Spencer's Plugins
- ↳ thechad.io
- ↳ Travis' Plugins
- ↳ Smartphone Radar
- ↳ DSC Alarm Plugin
- ↳ DigiTemp 1-Wire Temperature Plugin
- ↳ Yergey's Forum
- ↳ ZachBenz's Plugins
- ↳ RingForIndigo
- User Contributions
- ↳ User Plugins
- ↳ Open Source Plugins
- ↳ Adapters
- ↳ Alexa-Hue Bridge
- ↳ DIRECTV DVR Control
- ↳ Dynamic Control
- ↳ HassBridge
- ↳ Photo Frame
- ↳ Pushover
- ↳ Archives
- ↳ Rachio
- ↳ Security Camera
- ↳ Sonos
- ↳ Vera Bridge
- ↳ Yamaha RX
- ↳ 8 Channel Network Relay
- ↳ Python Scripts
- ↳ Apple Shortcuts
- ↳ Other Scripts
- ↳ Control Page Designs and Images
- ↳ Other Applications and Integrations
- ↳ Miscellaneous
- ↳ AppleScripts
- ↳ Archived Posts
- General Home Automation Discussions
- ↳ Switching to Indigo
- ↳ Vendor Announcements
- ↳ Cool Home Automation Finds
- ↳ Help Wanted & Bounties
- ↳ How Do I...
- ↳ Switching Hardware Technologies
- ↳ User Modifications
- ↳ Classifieds
- ↳ General Home Automation
- ↳ General Chat
- Professional Installer Discussions
- ↳ Finding Installers
- ↳ Installer Discussions