Switcher V2 All In One Full Control

@NightRanger
Well… my component is based on the script you guys made, so that means it should work with the new device as well.

Which is cool because that probably means the new Switcher component I PR’d to HA will work with the new device too.
It’s based on the PyPi module I made aioswitcher, which is of course also based on your script.

:smiley:

1 Like

@TomerFi
Hi Tomer, is there and option to define the entities properly in new lovelace UI (using yaml)?
For example for turn on and off I was able to solve it by creating custom template switch, this way:

switcher_aio_switch:
    friendly_name: Boiler
    icon_template: mdi:thermostat-box
    value_template: "{{ is_state('switcher_aio.control_device_switch', 'on') }}"
    turn_on:
        service: switcher_aio.turn_on
        data:
            entity_id: switcher_aio.control_device_switch 
    turn_off:
        service: switcher_aio.turn_off
        data:
            entity_id: switcher_aio.control_device_switch

But what about “switcher_aio.timer_minutes_input_select” and “switcher_aio.turn_on_timer_script”?
If I just add them as entities, they will look as below and I have to do additional click on them for the pop-up to be opened and then I can use them.

2019-03-26_21-19-44

Thanks in advance.

Hi,

I have switcher v2 firmware 3.0
discover option works fine but extract option doesn’t work
I am getting

[ <em>] Waiting for broadcast from Switcher device...
[</em> ] Sending Login Packet to Switcher...
[+] Received SessionID: 00000000

Then the next stage fails with

[+] Press the "Enter" key to continue...
[*] Waiting for a valid Phone ID Packet...
[!] Failed to get data, Please try again!

Thank you

I actually haven’t switched to lovelace yet. :face_with_raised_eyebrow:

I think I read somewhere this might happen and you should try running the script a couple of more times.
But I’m not sure, maybe try the GitHub repo issues for that.

Hi Tomer,
I actually managed to overcome this issue with almost all the entities and to have a working UI in Lovelace without additional pop-ups.

This is known issue. Just run the script again, it will give you same password with one digit change. This is the correct password.

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.

@dmatik

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 :slight_smile: , 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?? :thinking:)
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):

image

image

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. :unamused:

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:

  1. Click the “Update” button in the “Auto Shutdown” screen, or…
  2. 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.