More Features... TP-Link and ...

For software support
Victor
Posts: 11
Joined: Tue Feb 06, 2018 7:02 am

More Features... TP-Link and ...

Post by Victor » Mon Mar 19, 2018 12:21 am

I really appreciate ALL of the new functionality that has been introduced since the first release. Some of my Wishlist items:

- Any chance of adding support for TP-Link Devices.
- More or customizable icons to represent devices
- indicator light on or below the device icon to show if it is on.
- An additional Scene Control View, with icons, similar to the group control view
- Interaction with Google home / Alexa / Apple . (Now I'm reaching )
- Scene Music control via one of the services above or IFTTT

Victor :roll:

User avatar
DaveSignal
Site Admin
Posts: 56
Joined: Tue Jan 16, 2018 10:14 am

Re: More Features... TP-Link and ...

Post by DaveSignal » Mon Mar 19, 2018 1:46 am

Victor,
  • TP-Link seems to have a published API for controlling devices. A quick google search produced this: http://itnerd.space/2017/06/19/how-to-a ... cloud-api/
    I would need to buy a TP-Link device to ensure my code works and test it though. At some point, I might do this. What TP-Link devices do you own?
  • I could do different icons for devices. The current code uses a separate image to display the on-state. So the best way to do it would be to have two similar icons for each choice, one being an on-state and the other an off-state. I am not really an artist, so either need to find free images with no licensing requirements or hire somebody to draw the images. If I can find something that works, I will implement it.
  • An additional scene control could be done. I could do another window with a table like the Group List. Coming soon!
  • There is no Homekit API available for MacOS, so I cannot hook directly into that. I would have to read more about Google Home / Alexa to see what is possible.
- Dave

EDIT: I just finished a pretty cool interface where the scene control window can switch between views. It is going to have a list mode and the standard mode (maybe will call this advanced mode). At this point, I am trying to conceptualize what the list is going to look like. All of the devices in the scene will already be set with their own brightness, hue, saturation so I am not sure I want to use a single control for all of the devices in the scene. Maybe just brightness, but it will be a temp setting that changes all lights to the slider brightness without actually saving anything to the pre-set scene.

Victor
Posts: 11
Joined: Tue Feb 06, 2018 7:02 am

Re: More Features... TP-Link and ...

Post by Victor » Mon Mar 19, 2018 10:47 pm

My TP-Link devices are the simple smart-Plugs.

One older model Image

and one mini switch Image

Both are used to turn on Cooling Fans (Rotary Devices). I usually just manage things via Google or Alexa, but they lack the visual simplicity and the scheduling ability that your software provides. (kudos)

The idea for different separate icons to represent on/off is a great idea. The images don't have to be that remarkable i suppose. Simple geometic circles, triangles, and squares may be just the ticket. Much appreciation for looking into my wishlist possiblities. Thanks for all you do.

Victor

User avatar
DaveSignal
Site Admin
Posts: 56
Joined: Tue Jan 16, 2018 10:14 am

Re: More Features... TP-Link and ...

Post by DaveSignal » Thu Mar 22, 2018 3:23 am

Victor,

Thank you for your compliments.
I just uploaded a new build to the App Store. It is waiting on App Review, but should be available within the next 24 hours. There is now a new list mode interface for the Scene Control. The window is able to switch between modes using a toolbar icon. It is pretty slick and looks/feels great. I also incorporated a few different icons for the scenes when using this list mode.

Additionally, there are now a few more choices for device icons.

I hope the additions work as you wished. If something is not right, let me know. I can fix it.

And I also just got one of those older model TP-Link switches. I haven't opened the box yet, but sometime within the next week I will figure out how it works. So that support is coming!

- Dave

User avatar
DaveSignal
Site Admin
Posts: 56
Joined: Tue Jan 16, 2018 10:14 am

Re: More Features... TP-Link and ...

Post by DaveSignal » Thu Mar 22, 2018 9:54 pm

I just set up the TP-Link functionality. I am trying to limit this to TP-Link smart-plugs at this point, since that is all I have tested. I have it working using an HS100 smart plug that looks just like the one in your top image. It works perfectly using this model. This is all I have to test, but it is likely that any other TP-Link smart plugs work the same way. Yet another build (1.18) has now been uploaded to the App Store. This is waiting review and will probably be available soon. Let me know if there are any issues with your TP-Link devices.

- Dave

User avatar
DaveSignal
Site Admin
Posts: 56
Joined: Tue Jan 16, 2018 10:14 am

Re: More Features... TP-Link and ...

Post by DaveSignal » Fri Mar 23, 2018 12:09 am

looking back at it, I just realized that you were asking for a collection view for scenes. I haven't done this yet.

Here is one problem with a scene collection similar to the Group Control that would work as an on/off toggle: A group or scene that has multiple devices will need to check the on/off status of each device to decide whether a button click will turn all the group/scene devices on or off. For the Group Control, each device only belongs to one group, so if any device is on in the group, a click will turn off the group. Scene is different though. Say you have multiple scenes that use some of the same devices (this is common). And then you toggle one scene to be on. Then, switching to another scene that contains some of the same devices, rather than just setting the new scene, will detect that it is already on because some devices in the scene are on. So it will turn off all of the devices.
  1. Select scene 1 --> scene 1 lights turn on at specified settings
  2. then select scene 2 --> some of the lights from scene 1 turn off
  3. then select scene 2 again --> now scene 2 turns on
It is kind of clunky and I don't like it. Plus, some scenes specify that some devices switch OFF when the scene is activated. The toggle functionality doesn't work. The scene icon would need to just set the specified settings for that scene. So you could click a bunch of scenes in the collection view, but then you might be stuck with a whole bunch of lights/fans/outlets turned on until you move back to the current Scene Control interface to turn off the scene devices.

Victor
Posts: 11
Joined: Tue Feb 06, 2018 7:02 am

Re: More Features... TP-Link and ...

Post by Victor » Sat Mar 24, 2018 5:23 am

Hmm..Not quite sure I get it. I don't notice this when changing scenes with the scene control. I routinely switch from one scene to another.

All lights seem to end up at the correct ON state and settings
Many of my scenes have the same lights, (some just saved in the OFF state)

For Example:
Bedroom Scene - Bedroom Lights set to ON, Kitchen Lights set to OFF
Kitchen Scene - Kitchen Lights set to ON, Bedroom Lights set to OFF

Swtiching from Bedroom Scene to Kitchen Scene seems to work flawlessly. one click. 8-)

I do understand your point about "Group Controls" toggling ALL devices in the group and how scenes are more challenging. However, switching scenes seems to work fine already. (Thanks for that). I guess I envisioned instead of clicking the Scene Name I would click the Scene Icon instead, as I do in the Group control.

Just Food for Thought...
BTW.. Thanks for adding in TP-Link and the other Mods. I will download and tinker...

Victor

Victor
Posts: 11
Joined: Tue Feb 06, 2018 7:02 am

Re: More Features... TP-Link and ...

Post by Victor » Sat Mar 24, 2018 5:35 am

I just dowloaded the new build. Very cool. I really like the enhancements.

Still tinkering..... 8-)

Victor

User avatar
DaveSignal
Site Admin
Posts: 56
Joined: Tue Jan 16, 2018 10:14 am

Re: More Features... TP-Link and ...

Post by DaveSignal » Sat Mar 24, 2018 5:37 am

Yes, the scene control works flawlessly with the current interface, which just turns on the settings for the selected scenes and has a separate off button to turn off anything that in the scene that is powered on. But, if I made it a collection view, then users would expect it to toggle and it wouldn't work right.
I did add a new list view for the scenes. It has icons, and works in a similar way. Double-click turns on a scene and then there is separate OFF button to turn off those devices.

I also just added an on/off indicator light for the group buttons.

Would like to know that both of your TP-Link Smart Plugs work, then I can put both models on my "tested" list.

Victor
Posts: 11
Joined: Tue Feb 06, 2018 7:02 am

Re: More Features... TP-Link (Updated)

Post by Victor » Sat Mar 24, 2018 6:20 am

My TP-Link Models:

HS100(US) - No Joy
HS105(US) - Working

HomeControl Found Both Devices. Discovery worked flawlessly. However, The HS100 did not respond to controls. ( I'm going to try adding it again). HS105 is working great. Strange that it is working on your HS100 model. I can still control both devices with the TP-Link KASA app.

Separate Note(s):
Dark Mode is candy sweet. Also I really like the Group Control indicator lights. (Which work even when other programs change the device ON/OFF state.. Alexa, Google, etc) .

I'm really starting to appreciate the Scene Control windows, which allow you to quickly create, test, modify, and save scenes. I will try opening the config files on different macs. (version check)

Still Tinkering...
Victor
settings.jpg
settings.jpg (32.37 KiB) Viewed 815 times
Last edited by Victor on Sat Mar 24, 2018 7:53 am, edited 3 times in total.

User avatar
DaveSignal
Site Admin
Posts: 56
Joined: Tue Jan 16, 2018 10:14 am

Re: More Features... TP-Link and ...

Post by DaveSignal » Sat Mar 24, 2018 6:46 am

Hmmm... my HS100 works perfectly. I am running the latest firmware. Unless the JSON returned by your switch is slightly different.

In the app settings, you can see the TP-Link token that was retrieved.

Try this command from terminal:
curl -s --request POST "https://wap.tplinkcloud.com?token=<put your token here> HTTP/1.1" --data '{"method":"getDeviceList"}' --header "Content-Type: application/json"

I would like to see that output.


Oh, and open the device in the Kasa app and go to the device settings. Ensure that "Remote Control" is turned on for both of them.


EDIT:
Victor wrote:
Sat Mar 24, 2018 6:20 am
My TP-Link Models:

HS100(US) - No Joy
HS105(US) - Working

HomeControl Found Both Devices. Discovery worked flawlessly. However, The HS100 did not respond to controls. ( I'm going to try adding it again). HS105 is working great. Strange that it is working on your HS100 model. I can still control both devices with the TP-Link KASA app.
Try upgrading your firmware. My HS100 firmware is 1.5.1
possibly, something is different because my HS100 also shows hardware version 2.0 on the Kasa device settings page. Did you try fully rebooting the Smart Plug?

Also, are there any messages displayed in the Status Window of the HomeControl app?

User avatar
DaveSignal
Site Admin
Posts: 56
Joined: Tue Jan 16, 2018 10:14 am

Re: More Features... TP-Link (Updated)

Post by DaveSignal » Sat Mar 24, 2018 6:50 pm

Victor wrote:
Sat Mar 24, 2018 6:20 am
Dark Mode is candy sweet. Also I really like the Group Control indicator lights. (Which work even when other programs change the device ON/OFF state.. Alexa, Google, etc) .
Now that you mention it, the app is configured to check for updates only when it is active. But, now that there are indicator lights in the Group Control, it should probably just update all the time, that way it can run in the background and still show state updates at a glance. I will fix this for the next update.

I like the dark mode too. I think it might also look cool if the Group Control titlebar had some transparency. I will probably put a transparent titlebar option in there too.

Victor
Posts: 11
Joined: Tue Feb 06, 2018 7:02 am

Re: More Features... TP-Link and ...

Post by Victor » Sat Mar 24, 2018 10:11 pm

From Terminal:

V-MacBook-Air:~ vince$ curl -s --request POST "https://wap.tplinkcloud.com?token=XXXXX HTTP/1.1" --data '{"method":"getDeviceList"}' --header "Content-Type: application/json"
{"error_code":-20651,"msg":"Token expired"}V-MacBook-Air:~ vince$


Hmm. Token expired. maybe i have to re-register it with the app. interesting. seems to be working from other apps. I'll can try removing and adding it to KASA. But First I'll try ugrading the Firmware. (Although it should have updated automagically). Could just be that this is a very early model plug. They could have used different hardware in the later manufacturing. Attemping a reset....


Victor
Last edited by Victor on Sat Mar 24, 2018 11:21 pm, edited 1 time in total.

Victor
Posts: 11
Joined: Tue Feb 06, 2018 7:02 am

Re: More Features... TP-Link and ...

Post by Victor » Sat Mar 24, 2018 11:16 pm

It must be due to older hardware.

- I upgraded the firmware. (Can be done from the KASA App) it moved up to version 1.2.5. The KASA app says there are no additional updates. However, This did not correct the issue. (Remote control is ON for both devices)

- I then removed the device from KASA app and re-added it. It was still controllable via the KASA app, and via Alexa. No change in Home Control.

- I removed the device from Home Control. Quit and Restarted. Then I re-added the device using the Home Control discovery tool. Same result. It finds and adds both TP-Link devices, but the HS100 does not respond. (The other is working fine)

FYI, This is not a major problem for me, as I only have the one older TP-Link device and it is easily replaced with an new and better model. Just thought you might like to know the results. So It seems the firmware version is a factor, or at least the hardware version.

Let me know if you would like me try anything else. Your Home Control App is stil the best application i've found for managing devices, by far. I really appreciate the updates and improvements in function. Many Thanks...

Victor

updated.jpg
updated.jpg (30.62 KiB) Viewed 793 times
Last edited by Victor on Sat Mar 24, 2018 11:22 pm, edited 1 time in total.

User avatar
DaveSignal
Site Admin
Posts: 56
Joined: Tue Jan 16, 2018 10:14 am

Re: More Features... TP-Link and ...

Post by DaveSignal » Sat Mar 24, 2018 11:18 pm

oh, the token doesn't go in with the < > surrounding it. take those braces out. should look something like this:
curl -s --request POST "https://wap.tplinkcloud.com?token=XXXXX HTTP/1.1" --data '{"method":"getDeviceList"}' --header "Content-Type: application/json"

I don't know what is different about the v1.0 hardware, but surely there is a way to make it work.

Post Reply