Can you please share code?
Sure, no problem. However you have to do some tricks for each entity, and it is different.
For the main switch I already shared in my earlier posts here above, also I see it was shared by other members here before me.
For the dropdown select, I have created my own input_select entity and wrote a small automation (I used Node Red, but you can use HA built in automation as well) to update the “switcher_aio.timer_minutes_input_select” entity.
Here is my input select for this. Not sure how to share the automation, but I think you get the point.
For the script to run with timer minutes I wrote my one script, below. No need automation in this case.
And so on for other entities.
Please let me know if you need more details.
Hi @TomerFi,
I was wondering if there is any way to know from the API, who turned on/off the Switcher, once it was turned on/off, similar to the original Switcher application notifications.
The information is there. The question is whether the API and component exposes it.
Also, can you advise what does this mean “Automatic calling of the various notify
services upon state changes”, how can I use it?
Thanks in advance.
I’m not sure, not without some investigation time of the returning messages from the device.
@NightRanger , did you happen to bump into that information during your investigation?
First of all, starting with HA 0.93 there will be a built-in component called switcher_kis
, which will be the replacement for the two custom components called switcher_aio
and switcher_heater
.
The switcher_kis
is a slim-down, better built and more stable version of the switcher_aio
.
The slim-down part means that it was stripped of anything not related to the integration directly.
And the part you are referring to is among those stripped parts.
The swticher_aio
custom component you are using will no longer be maintained, nor will the switcher_heater
component.
Now that that’s out of the way , if you’re still interested in using switcher_aio
:
The part you referring to only works in view mode (create_view: true
). (or is it group mode?? )
If you have any notify
services pre-configured, then the component will allow you to select a service that will be notified for every state change (on->off, off->on):
Please note that this component have not been updated since HA 0.88, so I’m not sure how well it works in later versions.
Too bad it is impossible to get needed information from switcher anymore without rooting your phone.
As far as I understand it is possible for the v3.0 firmware too.
It requires a rooted android phone though.
hello
thanks for this support page
i’m trying to use the Python and switcher v3 touch
when running the command
~# python switcher.py extract
i see
[] Waiting for broadcast from Switcher device…
[] Sending Login Packet to Switcher…
[+] Received SessionID: 00000000
Instructions:
Open your Switcher App, perform one of the following actions and press the “Enter” key immediately:
- Click the “Update” button in the “Auto Shutdown” screen, or…
- Turn on device
[+] Press the “Enter” key to continue…
when i press “update” and Enter i get
[*] Waiting for a valid Phone ID Packet…
[!] Failed to get data, Please try again!
what can be the problem?
Hi All.
Great coding!
I’m using it in HA and its able to give me alle the info when I turn on switcher from its specific app.
But when trying to turn in on using HA I get the next error:
ERROR (MainThread) [custom_components.switcher_aio] failed to turn on for switcher_aio.control_device_switch
2020-02-11 11:04:17 ERROR (MainThread) [custom_components.switcher_aio] failed to parse state response message Traceback (most recent call last):
File “/config/custom_components/switcher_aio/init.py”, line 1874, in init
self._power_consumption = int(temp_power[2:4] + temp_power[0:2], 16)
ValueError: invalid literal for int() with base 16: b’’
Anyone knows what is the problem?
I just noticed now that the response is empty: b’’
Any reason?
use the official HA component, switcher_kis
Its not giving me the full options like the switcher_aio
I totally agree, I liked the custom component, but unfortunately I couldn’t make it work anymore, in one of the HA upgrade. Do you have it working on the latest version?
I only get state updates but I cannot trigger services. So I can see its working now and how much time remains, butI can turn on or off from HA.
Hi,
[] Waiting for broadcast from Switcher device…
[] Sending Login Packet to Switcher…
[+] Received SessionID: 00000000
Instructions:
Open your Switcher App, perform one of the following actions and press the “Enter” key immediately:
- Click the “Update” button in the “Auto Shutdown” screen, or…
- Turn on device
[+] Press the “Enter” key to continue…
[*] Waiting for a valid Phone ID Packet…
[!] Failed to get data, Please try again!
did it solved yet ?
Hi
Can you please share your node-red module for switcher ?
Thanks!
Sorry, not using node red anymore.
Switched to ha yaml automation long time ago.
But you don’t really need it with the newer switcher_kis component.
In general all the swircher issues has been resolved.
It is fully working again.
There are 2 general approaches, using switcher_kis official oob component in HA or using the switcher webAPI in docker container.
For the webapi approach I have written a guide, this is how I use it myself currently.
To retrieve the data, try the extractV3.py script if the original is not working for you.
All you need now is device id, for the phone id use 0000 and for password use 00000000.
Thanks! I wasn’t aware of the docker webapi
@TomerFi, thanks for the amazing integration over API,
I created a new integration based on the API with UI configuration,
For now it’s in my repo, please let me know if you would like me to do a pull request with the code into the HA component
Amazing job. The current HAS component just doesn’t work for me, this worked flawlessly. Thank you.