Git Product home page Git Product logo

ha-switchbot-remote's Introduction

👨‍💻 Pasquale Carmine Carbone (@KiraPC)

Software Engineer with a strong passion for the technology since I was a child.

I like design and develop solutions using common patterns and best practices, finding the better way.

There's almost always a better way.

while(true) {
  doBetter()
}

My Github stats

KiraPC's GitHub Stats

ha-switchbot-remote's People

Contributors

joshepw avatar kirapc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

joshepw

ha-switchbot-remote's Issues

Use channel number for settop box

Hi :-)
First, thank you very much for this integration!
I have a problem, assuming I'm just too dump to set it up correctly...
Your description says "Channel number to source via service" should be possible for settop boxes.
But if I try to add the numbers to my settop box (which is shown and power on/off works fine), I get the error, that the buttons do not exist. So I added a completly custom remote where I added the number buttons and on/off button. On/off again works fine, but trying to trigger one of the numbers prompts this error:
Screenshot_20231014_084050_Home Assistant
"Error calling service button/press. OtherRemote.command() takes from 2 to 3 positional arguments but 4 were given."
Could you please tell me how to set it all up to send eg. a "23" command via automation to my settop box? Preferably with the "normal" remote, but if it only works with the completly custom remote that's also fine for me.
I do not have much experience with services yet and I just don't know, where to start...

Out of sync state with power sensor

Sometimes the state of the entity can be wrong even if there is a power sensor set on the configuration that is reporting the right state.

How to reproduce the issue:

  • Having a hub mini as a manager for an AC unit
  • Having a contact sensor as the power sensor of the AC unit (on the flap of the AC so closed = OFF, opened = ON)
  • Obstruct the hub mini with something in a way that the IR blaster can't reach the AC
  • Turn on the AC on HA, the status of the AC is reported as ON but the contact is still closed (because no IR was received from the AC in truth)
  • For HA the AC is ON even if the physical object is still OFF
image

Here is a screen rapresenting the current scenario.
The "Porta" -> "Closed" is the contact sensor targeted in the power sensor setup.

The steps I've presented are of course done to let the IR blaster fail, but the original issue showed off randomly with the IR blaster sometimes failing to fire off the command or the unit to receive it, not sure, but in the way described above it's quite easy to test it.

Do we have a way to force refresh the entity status based on the power sensor or is it worth to add a recheck based on it and not trust only the entity updated status from HA?

Extra info:
Using the version 1.1.2 of the Custom Integration
Using the version 2024.1.3 of HA Core
Using the version 2023.12.1 of the HA Supervisor
Using the version 11.4 of the HA OS

Commands not working

Hi, I just added the integration and added my custom Buttons just like they are named in the switchbot app but when I try to use said buttons i get this error
image
also I took a screenshot from the Device Info Page in Homeasistant
image and what is weird is that in the app all the names are in Caps Lock and I added them using all caps lock names but in HA they show up as just the first letter Caps idk why and if thats the problem.
Also when I press the Power Button (the icon not the button named Power) it turns my TV on and off but when I call the service MediaPlayer.turnon or off it doesnt work and nothing happens which is really weird I think and that means I cant do any Automations with it.

Could you please help me ?

Regards Jonas

Add information from HUB 2 - API 1.1

Via API 1.1 it is possible to query the temperature and humidity of a HUB 2 (new version from Switchbot)

It would be interesting to add Hub 2 with its data to this integration.

As a support I send the instructions via API 1.1 to be sent after authentication to create the sensor which are currently in my configuration.yaml and which work correctly.

Thank you

  - resource: https://api.switch-bot.com/v1.1/devices/HUBDEVICEID/status
    scan_interval: 300
    headers:
      Authorization: "{{ states('input_text.switchbot_token') }}"
      sign: "{{ states('sensor.switchbot_sign') }}"
      t: "{{ state_attr('sensor.switchbot_sign','t') }}"
      Content-Type: "application/json"
      nonce: ""
    sensor:
      - name: "SwitchBot Hub 2 Temperature"
        unique_id: switchbot_hub_2_temperature
        value_template: "{{ value_json.body.temperature }}"
        unit_of_measurement: "°C"
        device_class: temperature
      - name: "SwitchBot Hub 2 Humidity"
        unique_id: switchbot_hub_2_humidity
        value_template: "{{ value_json.body.humidity }}"
        unit_of_measurement: "%"
        device_class: humidity

Cannot conifgure projector

Hello, I am super excited to finally have this functionality integrated into Home Assistant!!

I am having trouble with the device I would like to control, which is a projector, and I only need to turn it on/off.

I have gotten my Hub Mini added to the integration with no errors. Next step I tried was to click the "Configure" button next to the integration entry:

image

Then I see the following modal:

image

When I click "Submit" I get a "Configure device" modal, but no content inside of it. I click the "Submit" button, but nothing seems to happen:

image

I do get a confirmation screen:

image

Is there something I need to do differently? Is it because the device is categorized as a "Projector" on Switchbot instead of a "TV"?

Please add support for fan devices

I just discovered this integration and it works great for my tv but I also have an IR fan connected to the hub.
I know that fan support it is not yet implemented, but I would like to ask you if you please could add it when you have time.
Thank you very much for your work on this integration.

Control Functions as Entites in Home Assistant

Hi Kira,

This isn't much of an issue but more of a question.
I'm having trouble getting the control functions for my AC to show up as usable entities in home assistant. Can this only be done through custom buttons, or is there a way to get the pre populated buttons to work?

I followed the naming conventions in the guide and they did show up in home assistant, but don't seem to be doing what they say. On and off just cause a beep like a command has been sent through but it doesn't switch off or anything.

Is there a guide for this anywhere?

Cheers

Please Add Support for Learned Devices

I've been using this integration and its fantastic - one issue I've noticed though is that some AC settings are not supported by switchbot (silent mode, turbo mode, certain types of oscillation) and a workaround I have used is to create these using 'Learn Buttons' instead of smart matching or selecting a device manually.

For example I have a setting for rapid cooling which maxes out the fan and chooses some settings not supported by switchbot, after learning the signal it is available as a basic On/Off switch which would be great for use in automations.

However, these types of remotes don't appear to be discovered by the integration currently - is it possible to add support for these?

Some of the code, specifically the configure flow already appears to see these, but they don't show up as devices or entities

Custom Remote Type:
image

Appearance when Configured:
image

Learned Remotes in Config Flow:
image

But not present in devices:
image

Seeing the Air con but not adding it.

Hi there, I have added this excellent integration, and followed the instructions, however when I click configure, it seems to see the remote on the hub.

Settings_–Home_Assistant-_2023-09-11_07 34 05

I click Submit and get this..

Settings_–Home_Assistant-_2023-09-11_07 34 36

Then submit again and get this...

Settings_–Home_Assistant-_2023-09-11_07 34 53

After that nothing happens, any ideas, I have so far, reloaded, rebooted, re-installed.

Thanks.

Andrew

No this command

Hi there, I'm not sure what I did wrong. I named the buttons exactly as they are in the SB app, but I get the No this command error. Any ideas?
image

Brand Icon

To make Homeassistant display an icon for a custom integration it need to be in the brands repository: https://github.com/home-assistant/brands/tree/master

I'm not good with graphics thinks or some of this stuff, so let me ask to you to prepare some simple pngs (refer to the ones inside the repo for dimensions).

I was thinks to something like original switchbot logs greyscaled with a remote or something similar.

Thanks.

AC not turning off.

Hello,

Thank you for such a great application. Makes it very easy to set up.

It seems like the off button switches off the AC and then puts it back on Auto, which would require switching off the unit from the SwitchBot app. Not sure if you are aware of this.

Is there any way that this can be solved?

Thank you.

Power status out of sync

I feel like this option is already here and I’m just not sure how to configure it correctly. Hopefully someone can help!

I’ve successfully programmed a TV to my him and integrated it to HA. I can turn the TV on and off no issue. The problem I have is that if someone uses the physical remote, the status is out of sync. I do have the TV plugged into a smart plug that is always on and measures power and have the power meeting selected in the configuration of the integration.

What am I missing?

Please add Speaker and Lights as IR Devices

I have successfully connect the Switch Bot Hub 2 with this integration my tv can now control by home assistant. I have also a Soundbar I have add the soundbar as IR Device in SwitchBot but it not show up in Homeassistant. Also my IR Light.

Integration Issue When Adding Secret

Hi @KiraPC,

Apologies if this has been answered somewhere. I cant seem to find anything. Im just at the stage where Im trying to add the integration after downloading from HACS. When I add it from the list, it asks for a name for the Hub and the token and secret. On entering the details the window flashes away and the form is shown with all the fields empty. I cant actually get to the stage where it is shown with all of the other integrations. Im fairly new to Home Assistant and may be doing something wrong here.

Followed instructions on downloading through HACS
Sourced the token and secret via the app on mobile device
Tested response using the API URL via power shell with positive response (API v1.0) so secret works
Use of these when adding the integration returns a suspected error. The same thing happens if I put "a" in all 3 fields, just faster as the failed response is returned faster.
Just wondering if there are any quirks im missing here. I also rolled back to v1.1.1 incase there was an issue with the latest. Unsure what im doing wrong.

https://youtu.be/5CiSmIjn8QE

Add binary sensor to entities to indicate device status

I have an IR controlled air conditioner which I have attached an aqara contact sensor to. This sensor indicates whether or not the device is turned on. This would be useful for icons, status and possible power toggling of devices etc.

It'd be great if you are able to add support for binary sensors as status indicators for IR controlled devices

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.