Git Product home page Git Product logo

Comments (10)

KiraPC avatar KiraPC commented on July 3, 2024

Hi @LIrahara I did not get you.

Could you please explain better, maybe attaching some screenshots of what you have on switchbot and what you would have in HomeAssistant, or what you already have.

Thanks

from ha-switchbot-remote.

LIrahara avatar LIrahara commented on July 3, 2024

Yeah sure,

So in the first screen shot, it shows the buttons for control that have been automatically populated by switch bot on positive identification of the AC unit. I noted that these buttons have varying names and assumed that it would need to be added exactly in supported functions, which is what I did.
The following 2 screen shots show where I am adding the buttons into home assistant.
Once added into HA, and assigned to a button, they don't perform as expected. The unit does not turn off and turn on from HA. The AC unit does respond like it has accepted a command but it's like its a command for increasing the temp for example. It just double beeps and carries on running. When sending the off command I would expect a long beep and for it to stop running.
It seems something is being lost in translation here. I might be doing something wrong.

Your guide indicates support for custom buttons.
Is that the only way to achieve what I'm talking about or should I be able to do it with the pre populated ones as described above.

Hope that makes a bit more sense.
Screenshot_20240220_174500_SwitchBot

Screenshot_20240220_174723_Home Assistant

Screenshot_20240220_174801_Home Assistant

Screenshot_20240220_174835_Home Assistant

Screenshot_20240220_174906_Home Assistant

from ha-switchbot-remote.

KiraPC avatar KiraPC commented on July 3, 2024

Hi @LIrahara

Now it's clearest.

You should see your switchbot devices under the integration page under the configured hub.

from ha-switchbot-remote.

LIrahara avatar LIrahara commented on July 3, 2024

So I'm doing everything right?

The functions are not working if I do it this way.

Do I need to make custom buttons repeating the functions? Like do I need to make my own ON button for this to work?

from ha-switchbot-remote.

KiraPC avatar KiraPC commented on July 3, 2024

I don't know.

Do you see your configured device in the HA devices list?

Can you publish your HA screens?

Also logs would be helpful

from ha-switchbot-remote.

LIrahara avatar LIrahara commented on July 3, 2024

Apologies Kira,

Have been out of the country. Ill be home in a few days and will tackle this. Its difficult if im not testing locally.

from ha-switchbot-remote.

LIrahara avatar LIrahara commented on July 3, 2024

Hi Kira,

Okay so I did a bit of work today. I have a bunch of new hubs, so I just started from scratch. By the way, is there a way to clear hubs that are no longer used in the integration? I tried to delete and Reinstall but couldn't.

Anyways,
So I added a hub, and set up the ac control. It works from the switchbot app interface as well as the prepopulated control interface on home assistant. So that's all happy days.

The issue comes in when trying to add the individual button as an entity in he assistant.
Following what I put up previously,

  1. Go to the switchbot app and note the name of the button which is case sensitive.
    Screenshot_20240308_153346_SwitchBot

  2. Go to Home Assistant and go into the configuration of the AC control and add it into the button names
    Screenshot_20240308_153432_Home Assistant

  3. Go into the new entity in Home Assistant and trigger it. Note the timestamp here.
    The ac does respond to a received command but it's not the off command and the unit keeps running.
    Screenshot_20240308_153524_Home Assistant

  4. On checking the logs in the Switchbot app, it is confirmed that the Off command was not sent but rather a temp change and fan change and a few other ones.
    You can see this timestamp lines up with the one in Home Assistant.
    Screenshot_20240308_153608_SwitchBot

  5. Knowing I can get a successful Off response from the ac unit using the control in the switch bot app, I went back and hit that button. AC turned off with no issue.
    Screenshot_20240308_153655_SwitchBot

  6. The logs in the Switchbot app reflect the turn off command. This is obviously different from what was sent in the steps above, but just done as a confirmation.
    Screenshot_20240308_153727_SwitchBot

  7. So looking at the logs, they hold case sensitive commands, which lines up with what your guide says and the newly noted "Turn off" in the log led me to believe that what's on the button may be incorrect so I went back and added another button in the Home Assistant config reflecting this.
    Screenshot_20240308_153759_Home Assistant

  8. Tried hitting this new entity and again the correct command was not received by the ac unit.
    Screenshot_20240308_153834_Home Assistant

  9. You can see this reflected in the Switchbot logs.
    Screenshot_20240308_153914_SwitchBot

Unsure what I'm doing wrong here. I feel like it might be something simple though.

from ha-switchbot-remote.

KiraPC avatar KiraPC commented on July 3, 2024

Can you attach logs?

You can't remove hub from the integration you had to unlink them from your switchbot account.

from ha-switchbot-remote.

LIrahara avatar LIrahara commented on July 3, 2024

Sorry, new to the home assistant scene.

I've enabled logging and debugging for the integration and filtered for the created "off" button shown in the screenshot below.

Is that what you need or are you chasing something else? I just found a log file in my phone also. That might be what you're chasing. Logging was not enabled for the tests I outlined in the previous post.

Screenshot_20240308_213907_Home Assistant
error_log-2.txt

from ha-switchbot-remote.

KiraPC avatar KiraPC commented on July 3, 2024

I analyzed the logs and it seems there is no issue when request is sending to the switchbot systems.

2024-03-08 21:34:00.951 DEBUG (SyncWorker_2) [custom_components.switchbotremote.client.remote] Sending command setAll
2024-03-08 21:34:00.952 DEBUG (SyncWorker_2) [custom_components.switchbotremote.client.remote] Command payload {'commandType': 'command', 'command': 'setAll', 'parameter': '28,2,1,on'}
2024-03-08 21:34:00.952 DEBUG (SyncWorker_2) [custom_components.switchbotremote.client.client] Calling service https://api.switch-bot.com/v1.1/devices/01-202403081452-14540302/commands
2024-03-08 21:34:02.190 DEBUG (SyncWorker_2) [custom_components.switchbotremote.client.client] Call service https://api.switch-bot.com/v1.1/devices/01-202403081452-14540302/commands OK
2024-03-08 21:34:06.531 DEBUG (SyncWorker_62) [custom_components.switchbotremote.client.remote] Sending command setAll
2024-03-08 21:34:06.531 DEBUG (SyncWorker_62) [custom_components.switchbotremote.client.remote] Command payload {'commandType': 'command', 'command': 'setAll', 'parameter': '19.0,2,1,on'}
2024-03-08 21:34:06.532 DEBUG (SyncWorker_62) [custom_components.switchbotremote.client.client] Calling service https://api.switch-bot.com/v1.1/devices/01-202403081452-14540302/commands
2024-03-08 21:34:07.713 DEBUG (SyncWorker_62) [custom_components.switchbotremote.client.client] Call service https://api.switch-bot.com/v1.1/devices/01-202403081452-14540302/commands OK
2024-03-08 21:35:02.526 DEBUG (SyncWorker_29) [custom_components.switchbotremote.client.remote] Sending command OFF
2024-03-08 21:35:02.527 DEBUG (SyncWorker_29) [custom_components.switchbotremote.client.remote] Command payload {'commandType': 'customize', 'command': 'OFF', 'parameter': 'default'}
2024-03-08 21:35:02.527 DEBUG (SyncWorker_29) [custom_components.switchbotremote.client.client] Calling service https://api.switch-bot.com/v1.1/devices/01-202403081452-14540302/commands
2024-03-08 21:35:03.925 DEBUG (SyncWorker_29) [custom_components.switchbotremote.client.client] Call service https://api.switch-bot.com/v1.1/devices/01-202403081452-14540302/commands OK

Also you confirm that from the switchbot app you can see the request sent by the integration. So I cannot help you more than this.

I'm sorry

from ha-switchbot-remote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.