Switcher V2 All In One Full Control

Hello

I’ve made a special “All In One” custom component for full control of the Switcher V2 water heater.
The component allows the following:

  • Turn On/Off
  • Turn On with 15/30/45/60 minutes timer.
  • Real-Time (3-4 seconds) state updates.
  • Automatic calling of the various notify services upon state changes.
  • Retrieving, Creating, Enabling, Disabling or Deleting recurring and non-recurring Schedules.

And the coolest feature…
You don’t have to anything besides adding it to your Home Assistant and configuring it.
The component creates its own entities, groups and even a designated view.

With these 4 lines in your configuration.yaml:

switcher_aio:
  phone_id: "your phone id"
  device_id: "your device id"
  device_password: "your device password"

You’ll get the following added to your Home Assistant:

I’ve shared the component on my github page:

I’ve also made a video tutorial for the all process, starting with the use of @NightRanger script for retrieving the needed information from the device and ending with a demonstration of the component.
I hope you’ll like it. :grinning:

1 Like

Hello @TomerFi
There is any problem with the component ?
I start to get an error:
Log Details (ERROR)
Sun Aug 12 2018 02:46:45 GMT+0300 (Israel Daylight Time)

Error executing service <ServiceCall switcher_aio.turn_on (c:b496b3dba21c43e7879942c95e05248f): entity_id=[‘switcher_aio.control_device_switch’]>
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1115, in _event_to_service_call
await service_handler.func(service_call)
File “/home/homeassistant/.homeassistant/custom_components/switcher_aio/init.py”, line 1007, in async_switcher_control
_LOGGER.debug("received: " + service.service + " with call id: " + service.call_id)
AttributeError: ‘ServiceCall’ object has no attribute ‘call_id’

Same error here.

Did you fix it? @myakove

Use this one https://github.com/TomerFi/home-assistant-custom-components/tree/master/switcher_heater

I looked into the exception and it seems to be a missing call_id in the service call to Switcher
I removed the relevant log lines (everywhere it states call_id), cleaned the pycache and restarted HA

Now I have full control over my switcher again, hope it helps you and anyone else reading this

Hi All

Great work , really appreciated.
Unfortunately , it doesn’t work well, and I couldn’t find out out why.
When I operate the switcher from the app, HA is responding and showing all timers, current and status with no problem. it responds very good.
When I try to turn on the Switcher from HA, it takes around 30 seconds to turn on, and tuning it back off doesn’t work at all. At that moment HA hangs, and takes it about 2-3 minutes to recover back and be functional.
There are some errors in the log - see it below
Any help would be appreciated.

Hillel

Unable to remove unknown listener <function ServiceRegistry.async_call.<locals>.service_executed at 0x6f5bddf8>

12:08 AM core.py (WARNING)

failed to turn on with timer for switcher_aio.control_device_switch

12:08 AM custom_components/switcher_aio/init.py (ERROR)

failed to control the device Traceback (most recent call last): File “/config/custom_components/switcher_aio/init.py”, line 789, in async_send_command_to_device sock = get_socket(ip_address) File “/config/custom_components/switcher_aio/init.py”, line 565, in get_socket sock.connect((ip_addr, SOCKET_PORT)) TimeoutError: [Errno 110] Operation timed out

12:08 AM custom_components/switcher_aio/init.py (ERROR)

failed to connect socket to xxx.xxx.xxx.xxx Traceback (most recent call last): File “/config/custom_components/switcher_aio/init.py”, line 565, in get_socket sock.connect((ip_addr, SOCKET_PORT)) TimeoutError: [Errno 110] Operation timed out

12:08 AM custom_components/switcher_aio/init.py (ERROR)

Unable to find service input_select/select_option

12:06 AM core.py (WARNING)

Unable to remove unknown listener <function ServiceRegistry.async_call.<locals>.service_executed at 0x70067bb8>

12:06 AM core.py (WARNING)

failed to turn off the device

12:06 AM custom_components/switcher_aio/init.py (ERROR)

failed to control the device Traceback (most recent call last): File “/config/custom_components/switcher_aio/init.py”, line 789, in async_send_command_to_device sock = get_socket(ip_address) File “/config/custom_components/switcher_aio/init.py”, line 565, in get_socket sock.connect((ip_addr, SOCKET_PORT)) TimeoutError: [Errno 110] Operation timed out

12:06 AM custom_components/switcher_aio/init.py (ERROR)

failed to connect socket to xxx.xxx.xxx.xxx Traceback (most recent call last): File “/config/custom_components/switcher_aio/init.py”, line 565, in get_socket sock.connect((ip_addr, SOCKET_PORT)) TimeoutError: [Errno 110] Operation timed out

12:06 AM custom_components/switcher_aio/init.py (ERROR)

failed to turn off the device

12:03 AM custom_components/switcher_aio/init.py (ERROR)

failed to parse state response message Traceback (most recent call last): File “/config/custom_components/switcher_aio/init.py”, line 1873, in init temp_time_left_seconds = int(temp_time_left[6:8] + temp_time_left[4:6] + temp_time_left[2:4] + temp_time_left[0:2], 16) ValueError: invalid literal for int() with base 16: b’’

12:03 AM custom_components/switcher_aio/init.py (ERROR)

Unable to remove unknown listener <function ServiceRegistry.async_call.<locals>.service_executed at 0x6f45ed20>

12:03 AM core.py (WARNING)

failed to turn off the device

12:03 AM custom_components/switcher_aio/init.py (ERROR)

Hello everyone

Sorry for the delayed response, I was away for quite a long time.

So, as it turns out in one of the HA’s version, the ‘call_id’ attribute of the service calls was canceled.
Hence the AttributeError: ‘ServiceCall’ object has no attribute ‘call_id’.

I removed all the call_id references from my code on GitHub,
If you still getting the call_id error, please update to the latest version.

Hi Tomer

Great work, It works like a charm now, Thx alot , appreciate it.

Would it be possible to implement the power consumption in the GUI?

Thx
Hillel

@hshir
Again, sorry for the late response.
Perhaps you can try the history_graph component.
Maybe you’ll have to first create a couple of template sensors representing the values from the device attributes:

{{ states.switcher_aio.control_device_switch.attributes.current_power_consumption }}
{{ states.switcher_aio.control_device_switch.attributes.electric_current }}

Hi tomer

great project! most of the controll works perfecllty, except for the timer minutes selection wihch i recive a message “Failed to call service input_select/select_option”

can you please look for this one? :pray:

@alamit
Thank for the feedback. :slight_smile:

The component is using the input_select component’s select_option service,
yet it does nothing to load the input_select component, it just assumes the component is already initialized.

I’m guessing you don’t have any input_select entities in your configuration, which means the the select_option service doesn’t exists.

Maybe try and configure a dummy Input Select entity, restart and see if the issue is fixed.

BTW
I’m currently working on a new and better component for controlling Switcher.
I will update as soon as I can.

Hi @TomerFi
Great project! Thank you for making this.
I implemented this component inside the hassio and everything work great. I just have one question:
Is it possible to ass it to the Home app on the iPhone?

Thanks

Can anybody confirm/refute that this component/domain works with the new Switcher Touch product?

Also, there are two components here: “Switcher V2 Boiler Support” and “Switcher-AIO”
I get that one is a switch and the other is a domain, so does one install both, or just the AIO? The delineation of features is not clear (to me) in the documentation.

I don’t believe it’ll work with the new Switcher Touch,
But I’d love to be corrected.

For now, please use the switcher_aio component only.
Very soon there’s is going to be a new component that will deprecate the old one.
Until then, switcher_aio is the way to go.

Thanks for the swift reply.

I can confirm that this isn’t compatible with the Touch. I hope it can be reverse engineered again, but I suspect (from the packets I sniffed) that the touch’s authentication uses an end to end VPN solution, though the telemetry seems to be in unencoded python.

Since there’s a Google Home component I can use voice to activate/deactivate (switch) but no timer command (eg “turn on for 30 minutes”), unfortunately.

I hope the new version will support the touch units, but thanks anyway.

1 Like

I’m using the switcher_aio component with Switcher Touch and everything is working correctly.
Do note that the script for getting the device password got a wrong password on the first try, I could see the status with switcher_aio, but couldn’t control the device, on the 2nd attempt to get the password I got a correct password (which only one digit different than the wrong one…)

1 Like

@NightRanger
Any thoughts about the new Switcher Touch device?
:smiley:

@TomerFi

Not really, I don’t have one, But I know of few people who have it and successfully used it with the script Aviad and I published.

If someone is experiencing issues with the new switcher it would be helpful if he can provide access so we can debug the issue and see if there are any major changes that may affect the operation of the script.