Code Monkey home page Code Monkey logo

Comments (23)

RedNo7 avatar RedNo7 commented on May 23, 2024 1

Hi there - sorry, no it's been pretty busy. I hope to try it later this week. I'll let you know!

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024 1

OK, it's working most of the time. If I tap softly on the iPhone it seems wot work much better. šŸ‘

Thanks for your patience!

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024 1

will do - but later today - thanks!

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024 1

Iā€™m so sorry. I got it working with ā€˜toggleā€™ and forgot to test turn_on. Iā€™ll try to get to it this weekend. Thanks for your continued interest!

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024 1

Yes, absolutely. Thanks for your patience.

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

Hi @RedNo7,

First of all, try to check if there are any errors in the logs.
If there are no errors, first try with a simpler configuration instead of a complex one, remove all the user filters and add just one profile with a very simple secret (e.g. ["tap", "tap"]) enable the notification parameter and check if it si triggered, if it works start to add more complexity, more complex secrets and more filters.

Later Iā€˜ll try with my partnerā€˜s device (an iPhone), I have only tested it with a MacBook Pro, an Android phone and an Android tablet.

Let me know your results.

Regards

Edit:

This will not work by the way, your previous configuration is OK, do not add target because it is not needed:

action: call-service
  service: input_boolean.turn_on
  data:
    target:
      entity_id: input_boolean.kiosk_mode

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

I've added the repository installed via HACS, add the extra_module_url, added www\secret-taps.yaml, reset the front-end cache on my iPhone but I cannot get it to work.

Donā€˜t forget to restart Home Assistant.

Later Iā€˜ll try with my partnerā€˜s device (an iPhone), I have only tested it with a MacBook, an Android phone and an Android tablet.

Tested on the iOS device of my partner and it also works.

Just take into account the speed at which you are trying to tap, maybe you are too fast or too slow, these are the parameters to recognise the taps:

  • Maximum press time in ms: 250
  • Maximum time in ms between multiple taps: 300
  • Maximum time between taps secuences in ms: 1000 (this can be changed with the threshold parameter)

Try to slow down a bit if you are going too fast or try to speed it up if you are going too slow, I am sure that you will find the spot quickly. But first we need to be sure that the plugin is loaded correctly.

IOS

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024

Hi!

Thanks for replying!

I have no relevant errors in my logs.
I did start and I cleared the front-end cache.
I changed the secret to tap, tap and set notification: true, I get no notification so perhaps the plugin is not loading.

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

Hi @RedNo7,
Yes, the first thing to check is if the plugin is loaded and that it is installed properly.
Check that the relevant files are in the www/community/home-assistant-secret-taps/ folder. It is hard to test from the App, could you check that it is working in a computer browser first?
Regards

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

Hey @RedNo7,
Did you have time to check the installation and test it in a desktop browser?

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024

Hi,

The debug* option has been helpful.

I can see the following so it is picking ups the taps but the service-call is not working:

home-assistant-secret-taps: tap Ā» double-tap Ā» tap
home-assistant-secret-taps: checking if there is a scret with the previous event stack
home-assistant-secret-taps: secret found, executing secret
home-assistant-secret-taps: secret executed!
home-assistant-secret-taps: { (home-assistant-secret-taps-plugin.js, line 1)
    "taps": [
        "tap",
        "double-tap",
        "tap"
    ],
    "action": "call-service",
    "service": "input_boolean.turn_on",
    "data": {
        "entity_id": "input_boolean.kiosk_mode"
    }
}

edit: typo* and added extra log lines

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024

btw, do I need to restart if I change the contents of secret-taps.yaml? (I have been restarting up until now).

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024

I switched notification: true and get this error whenever I taps executes - it's inline with my logs, but that entity_id is correct.
Screenshot 2024-03-04 at 12 04 58

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

I can see the following so it is picking ups the taps but the service-call is not working:

That's great, that means that the taps are working but it is failing to call the service. We need to figure it out why.

btw, do I need to restart if I change the contents of secret-taps.yaml? (I have been restarting up until now).

No, it doesn't need a restart, only if you change the configuration.yaml it needs a restart.

I switched notification: true and get this error whenever I taps executes - it's inline with my logs, but that entity_id is correct.

Letā€˜s try to find what is happening, go to Developer tools > Services, change it to yaml mode and execute this:

service: input_boolean.turn_on
target:
  entity_id: input_boolean.kiosk_mode

And let me know if it works.

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024

huh. It's just started working - no idea why.

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

huh. It's just started working - no idea why.

Are the taps working now?

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024

Yes, but only on the desktop (not on my iPhone).

Then I turned debug and notification off and it stopped working on the desktop again.

I am restarting and clearing the cache (desktop and iPhone) after any chnage so not really sure what iOS going on, tbh.

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

Yes, but only on the desktop (not on my iPhone).

Then I turned debug and notification off and it stopped working on the desktop again.

I am restarting and clearing the cache (desktop and iPhone) after any chnage so not really sure what iOS going on, tbh.

I really donā€˜t know what could be happening. Try to delete the Companion App cache in the app settings.

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

Then I turned debug and notification off and it stopped working on the desktop again.

These options are not related to the funcionality itself, they are just extras to log stuff, it should not make any difference.

from home-assistant-secret-taps.

RedNo7 avatar RedNo7 commented on May 23, 2024

Try to delete the Companing App cache in the app settings.
I do this after every change & restart.

These options are not related to the funcionality itself, they are just extras to log stuff, it should not make any difference.
It didn't. My mistake and sorry for that bad steer. I made another change which meant it worked or doesn't work.

  • input_boolean.toggle works
  • input_boolean.turn_on does not work

I can systematically make it work / not work by making changing .toggle with turn_on. I had assumed that because input_boolean.toggle worked, they would both work.

OK, so 100% working on the desktop but only with input_boolean.toggle.

Also, this is one of the reasons that It was never working on the iPhone - as, when I got it working with input_boolean.toggle on the desktop, I changed it to input_boolean.turn_on to try on the iPhone.

So the iPhone now also works, but it is hit and miss for me. The exact same sequence of taps (from a speed point of view) will now always work on the desktop and only sometimes work on the iPhone. I assume that I am on the threshold of speed (sometimes under, sometimes over).

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

I can systematically make it work / not work by making changing .toggle with turn_on. I had assumed that because input_boolean.toggle worked, they would both work.

It doesnā€˜t make much sense, could you try to reproduce it on the Develper tools > Services tab?

So the iPhone now also works, but it is hit and miss for me. The exact same sequence of taps (from a speed point of view) will now always work on the desktop and only sometimes work on the iPhone. I assume that I am on the threshold of speed (sometimes under, sometimes over).

Try to make it slower, real taps with fingers tend to be faster than with a touchpad/mouse. Slow your taps a bit and you will find the sweet spot.

Letā€˜s try to focus on why turn_on is not working for you. Make some tests in the dev tools to see if you have the same there.

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

Hi @RedNo7,
Did you have time to test it?
Regards

from home-assistant-secret-taps.

elchininet avatar elchininet commented on May 23, 2024

Hi @RedNo7,
When you get some time to check this, open a new issue related to the turn_on service.
Closing this one.
Regards

from home-assistant-secret-taps.

Related Issues (1)

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.