Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
[MOVED] TP-Link Smart Plug
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: TP-Link Smart Plug
some of the switches I have were close to 100 each. but I would stop buying wemo because they have discontinued their bulbs and they closed their API and are not offering their SDK any more. which is a pretty good indicator they are getting out of the HA market.
It is also nice to have all of the devices have the same technology or be of like brand.
WiFi is just a specification of the connection not the data send across it. so any brands that have a WiFi connection are not going to have the same data sharing mechanisms. But also.... what really sucks about using WiFi unless you have a dedicated AP for just your HA devices is that your Wifi speeds get divided by the number of connected devices. unless the device supports QOS in which an HA device would not.
Look at the number of companies that are available for a specific technology and look at what kinds of devices are supported by that technology. the top 2 contenders I have found are zigbee and z-wave.
It is also nice to have all of the devices have the same technology or be of like brand.
WiFi is just a specification of the connection not the data send across it. so any brands that have a WiFi connection are not going to have the same data sharing mechanisms. But also.... what really sucks about using WiFi unless you have a dedicated AP for just your HA devices is that your Wifi speeds get divided by the number of connected devices. unless the device supports QOS in which an HA device would not.
Look at the number of companies that are available for a specific technology and look at what kinds of devices are supported by that technology. the top 2 contenders I have found are zigbee and z-wave.
Re: TP-Link Smart Plug
I keep getting the error below when loading the plugin - any help would be appreciated
Plugin: TPLink
Exception in thread TPLink:
Traceback (most recent call last):
File "threading.pyc", line 801, in __bootstrap_inner
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 307, in run
device['sys_info']['system']['get_sysinfo']['type']
KeyError: 'type'
Plugin: TPLink
Exception in thread TPLink:
Traceback (most recent call last):
File "threading.pyc", line 801, in __bootstrap_inner
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 307, in run
device['sys_info']['system']['get_sysinfo']['type']
KeyError: 'type'
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: TP-Link Smart Plug
no worries. this is a new plugin and we were only able to test it woth the outlets. and there may be a data output change.. what kind of device are you using?
Re: TP-Link Smart Plug
I have two devices, HS100 & HS200
Found device: {u'ip': '192.168.10.143',
u'port': 9999,
u'sys_info': {u'emeter': {u'err_code': -1,
u'err_msg': u'module not support'},
u'system': {u'get_sysinfo': {u'active_mode': u'schedule',
u'alias': u'Outside Garage Light',
u'dev_name': u'Wi-Fi Smart Light Switch',
u'deviceId': u'',
u'err_code': 0,
u'feature': u'TIM',
u'fwId': u'',
u'hwId': u'',
u'hw_ver': u'1.0',
u'icon_hash': u'',
u'latitude': ,
u'led_off': 0,
u'longitude': ,
u'mac': u'',
u'mic_type': u'IOT.SMARTPLUGSWITCH',
u'model': u'HS200(US)',
u'oemId': u'',
u'on_time': 0,
u'relay_state': 0,
u'rssi': -55,
u'sw_ver': u'1.1.0 Build 160521 Rel.085826',
u'updating': 0}}}}
Found device: {u'ip': '192.168.10.150',
u'port': 9999,
u'sys_info': {u'emeter': {u'err_code': -1,
u'err_msg': u'module not support'},
u'system': {u'get_sysinfo': {u'active_mode': u'schedule',
u'alias': u'Living Room Light',
u'dev_name': u'Wi-Fi Smart Plug',
u'deviceId': u'',
u'err_code': 0,
u'feature': u'TIM',
u'fwId': u'',
u'hwId': u'',
u'hw_ver': u'1.0',
u'icon_hash': u'',
u'latitude': ,
u'led_off': 0,
u'longitude': ,
u'mac': u'',
u'model': u'HS100(US)',
u'oemId': u'',
u'on_time': 0,
u'relay_state': 0,
u'rssi': -62,
u'sw_ver': u'1.1.1 Build 160725 Rel.163650',
u'type': u'IOT.SMARTPLUGSWITCH',
u'updating': 0}}}}
Found device: {u'ip': '192.168.10.143',
u'port': 9999,
u'sys_info': {u'emeter': {u'err_code': -1,
u'err_msg': u'module not support'},
u'system': {u'get_sysinfo': {u'active_mode': u'schedule',
u'alias': u'Outside Garage Light',
u'dev_name': u'Wi-Fi Smart Light Switch',
u'deviceId': u'',
u'err_code': 0,
u'feature': u'TIM',
u'fwId': u'',
u'hwId': u'',
u'hw_ver': u'1.0',
u'icon_hash': u'',
u'latitude': ,
u'led_off': 0,
u'longitude': ,
u'mac': u'',
u'mic_type': u'IOT.SMARTPLUGSWITCH',
u'model': u'HS200(US)',
u'oemId': u'',
u'on_time': 0,
u'relay_state': 0,
u'rssi': -55,
u'sw_ver': u'1.1.0 Build 160521 Rel.085826',
u'updating': 0}}}}
Found device: {u'ip': '192.168.10.150',
u'port': 9999,
u'sys_info': {u'emeter': {u'err_code': -1,
u'err_msg': u'module not support'},
u'system': {u'get_sysinfo': {u'active_mode': u'schedule',
u'alias': u'Living Room Light',
u'dev_name': u'Wi-Fi Smart Plug',
u'deviceId': u'',
u'err_code': 0,
u'feature': u'TIM',
u'fwId': u'',
u'hwId': u'',
u'hw_ver': u'1.0',
u'icon_hash': u'',
u'latitude': ,
u'led_off': 0,
u'longitude': ,
u'mac': u'',
u'model': u'HS100(US)',
u'oemId': u'',
u'on_time': 0,
u'relay_state': 0,
u'rssi': -62,
u'sw_ver': u'1.1.1 Build 160725 Rel.163650',
u'type': u'IOT.SMARTPLUGSWITCH',
u'updating': 0}}}}
-
Flyingsubs
- Experienced User
- Posts: 127
- Joined: Sat Dec 29, 2012 11:26 pm
Re: TP-Link Smart Plug
I was also thinking he could run that script that we first tried to see all the information he is getting from discover devices.kgschlosser wrote:no worries. this is a new plugin and we were only able to test it woth the outlets. and there may be a data output change.. what kind of device are you using?
Code: Select all
from pprint import pformat
from pyHS100 import TPLinkSmartHomeProtocol
for dev in TPLinkSmartHomeProtocol.discover(timeout=10):
print "Found device: %s" % pformat(dev)- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: TP-Link Smart Plug
ok so here goes. give this one a try. I it turns out type is not a constant name across the various devices. one of your devices has mic_type instead. so i accounted for that. the newest version is attached. let me know if it works
-
Flyingsubs
- Experienced User
- Posts: 127
- Joined: Sat Dec 29, 2012 11:26 pm
Re: TP-Link Smart Plug
kgschlosser wrote:ok so here goes. give this one a try. I it turns out type is not a constant name across the various devices. one of your devices has mic_type instead. so i accounted for that. the newest version is attached. let me know if it works
When updating, do I still need to delete the plugin and reinstall? Is there anyway I can just overwrite the plugin without having to redo my macros? Thanks!
Re: TP-Link Smart Plug
The HS100 is the only device that shows up in the drop down list for the following
- Change Switch State
- Change Switch LED
- Toggle a Switch on and off
Get the following error on the following items
- Change plug State
- Change a Plug LED
- Toggle a Plug on and off
- Change Devise Alias
- Change Device MAC Address
Traceback (most recent call last) (0.5.0-rc2):
File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
self.Configure(*args, **kwargs)
File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 106, in Configure
treeItem.Configure(*args)
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 80, in Configure
return self.executable.Configure(*args)
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 839, in Configure
self._check_device
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 692, in __init__
SetData()
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 569, in SetData
type_ctrl.SetLabel('Type: ' + device.GetDeviceType())
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 178, in GetDeviceType
return self.device.sys_info['type']
KeyError: 'type'
BTW - Eventghost does capture when the device is turned on or off through a schedule or the phone app.
- Change Switch State
- Change Switch LED
- Toggle a Switch on and off
Get the following error on the following items
- Change plug State
- Change a Plug LED
- Toggle a Plug on and off
- Change Devise Alias
- Change Device MAC Address
Traceback (most recent call last) (0.5.0-rc2):
File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
self.Configure(*args, **kwargs)
File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 106, in Configure
treeItem.Configure(*args)
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 80, in Configure
return self.executable.Configure(*args)
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 839, in Configure
self._check_device
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 692, in __init__
SetData()
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 569, in SetData
type_ctrl.SetLabel('Type: ' + device.GetDeviceType())
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 178, in GetDeviceType
return self.device.sys_info['type']
KeyError: 'type'
BTW - Eventghost does capture when the device is turned on or off through a schedule or the phone app.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: TP-Link Smart Plug
Ok give me a couple of minutes I have to go to computer and upload new version I have this already fixed
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: TP-Link Smart Plug
And just double click the file it will do the rest. No need to delete anything
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: TP-Link Smart Plug
ok here is the latest version.
and if your device doesn't show up in a specific that means that your device does not support that action. but in your case it happens to be an error. but i just wanted to let ya know ahead of time.
and if your device doesn't show up in a specific that means that your device does not support that action. but in your case it happens to be an error. but i just wanted to let ya know ahead of time.
Re: TP-Link Smart Plug
I really appreciate all the help!!
Still a few things.
This is what i get when the plugin loads
TPLink.PlugAdded.Outside Garage Light '192.168.10.143'
TPLink.SwitchAdded.Living Room Light '192.168.10.150'
Exception in thread TPLink:
Traceback (most recent call last):
File "threading.pyc", line 801, in __bootstrap_inner
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 416, in run
self.devices[alias].Update()
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 97, in __getattr__
raise AttributeError('%s does not have attribute %s' % (self, item))
AttributeError: eg.UserPluginModule.TPLink.Plug.Outside Garage Light does not have attribute Update
Both devices show up in the Plug Action Items - Change Plug State, Change Plug LED & Toggle a Plug on or off
Only the Plug shows up in the Switch Action Items - Change Switch State, Change Switch LED & Toggle a Switch on and off
The events don't show up any more confirming the action was performed.
Still a few things.
This is what i get when the plugin loads
TPLink.PlugAdded.Outside Garage Light '192.168.10.143'
TPLink.SwitchAdded.Living Room Light '192.168.10.150'
Exception in thread TPLink:
Traceback (most recent call last):
File "threading.pyc", line 801, in __bootstrap_inner
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 416, in run
self.devices[alias].Update()
File "C:\ProgramData\EventGhost\plugins\TPLink\__init__.py", line 97, in __getattr__
raise AttributeError('%s does not have attribute %s' % (self, item))
AttributeError: eg.UserPluginModule.TPLink.Plug.Outside Garage Light does not have attribute Update
Both devices show up in the Plug Action Items - Change Plug State, Change Plug LED & Toggle a Plug on or off
Only the Plug shows up in the Switch Action Items - Change Switch State, Change Switch LED & Toggle a Switch on and off
The events don't show up any more confirming the action was performed.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: TP-Link Smart Plug
sorry about that I changed a few things about and I forgot to change one of the functions.
this one should fix that issue.
this one should fix that issue.
Re: TP-Link Smart Plug
Excellent - That fixed my issues
Couple small things to note
- When changing the LED, there is no Event that is recorded
- The Time On does not appear to be reporting the correct time
- When toggling on and off quickly, no Event is recorded - This only happens when toggling less than 2 seconds between off and on.
- Suggest switching wording on Switch & Plug - Only the HS100 (WiFi Smart Plug) shows up in the Switch category & Both the HS100 & HS200 (WiFi Smart Light Switch) show up in the Plug category.
- When setting an action to Change State, the action item does not contain what state it is changing in the description. As you can see below, the top is On and the bottom is Off (Both actions appear to be the same - but perform different functions)
TPLink: Change Plug State: Outside Garage Light
TPLink.Outside Garage Light.Plug.ON
TPLink: Change Plug State: Outside Garage Light
TPLink.Outside Garage Light.Plug.OFF
- When changing to a state that it is already in, there is no Event recorded (ie. if a plug is on and you change the event to on, there is no event recorded, only events are recorded when there is a change in its state)
Couple small things to note
- When changing the LED, there is no Event that is recorded
- The Time On does not appear to be reporting the correct time
- When toggling on and off quickly, no Event is recorded - This only happens when toggling less than 2 seconds between off and on.
- Suggest switching wording on Switch & Plug - Only the HS100 (WiFi Smart Plug) shows up in the Switch category & Both the HS100 & HS200 (WiFi Smart Light Switch) show up in the Plug category.
- When setting an action to Change State, the action item does not contain what state it is changing in the description. As you can see below, the top is On and the bottom is Off (Both actions appear to be the same - but perform different functions)
TPLink: Change Plug State: Outside Garage Light
TPLink.Outside Garage Light.Plug.ON
TPLink: Change Plug State: Outside Garage Light
TPLink.Outside Garage Light.Plug.OFF
- When changing to a state that it is already in, there is no Event recorded (ie. if a plug is on and you change the event to on, there is no event recorded, only events are recorded when there is a change in its state)
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: TP-Link Smart Plug
I do not have it set up to monitor something like the LED for the light so that os why there is no event for this. because there is really no purpose to it. it's a convenience thing. so you could use @krambriw's plugin Suntracker to tell you when sunrise and sunset is so you could programmatically turn the led on or off for a night light ya know?bbrech1 wrote: - When changing the LED, there is no Event that is recorded
The time you see is the time that the switch/plug/bulb has so if it's wrong then it's wrong in the devicebbrech1 wrote: - The Time On does not appear to be reporting the correct time
This is because it takes a while for the device to actually set the information in it's internal storage. so if you change it very rapidly like that the device will "skip" setting some of the data because it has newer data to set into placebbrech1 wrote: - When toggling on and off quickly, no Event is recorded - This only happens when toggling less than 2 seconds between off and on.
This is a bug and I will fix it.bbrech1 wrote: - Suggest switching wording on Switch & Plug - Only the HS100 (WiFi Smart Plug) shows up in the Switch category & Both the HS100 & HS200 (WiFi Smart Light Switch) show up in the Plug category.
no worries there m8, can fix that one as well. it's pretty simple.bbrech1 wrote: - When setting an action to Change State, the action item does not contain what state it is changing in the description. As you can see below, the top is On and the bottom is Off (Both actions appear to be the same - but perform different functions)
TPLink: Change Plug State: Outside Garage Light
TPLink.Outside Garage Light.Plug.ON
TPLink: Change Plug State: Outside Garage Light
TPLink.Outside Garage Light.Plug.OFF
- When changing to a state that it is already in, there is no Event recorded (ie. if a plug is on and you change the event to on, there is no event recorded, only events are recorded when there is a change in its state)
Give me a couple of minutes to get the changes in place.
