Giter Site home page Giter Site logo

Comments (8)

Patrick44fr avatar Patrick44fr commented on September 12, 2024 1

Hello, thank you for your answer, I did some research on my installation, tested the curl for the token, everything is ok and I use a let's encrypt certificate.

when consulting the NGINX proxy manager logs, I noticed that there was a double slash behind api.

I removed the slah in the API settings by putting:
https://<homeassistant>/api

It seems that the error is in the readme, the slash is present .
2 Add the URL for your Home Assistant API, e.g. https://<homeassistant>/api/.

all switches and lights work, it's fine.

automations and scripts do not respond to tap, and do not appear in NGINX logs.
I continue my research...

nginx

from garminhomeassistant.

philipabbey avatar philipabbey commented on September 12, 2024 1

I'm looking to close this issue withthe following changes:

  1. All taps must have a service tag. This will be a breaking change so will be done in two parts: firstly to change the schema to prompt people to amend their menus, in a later edition the application will ignore menu items without a service tag.
  2. Implement acknowledgement of automations. These are now able to be both 'toggle's and 'tap's. (Previously they were just 'toggle's)

I hope that meets your expectations @Patrick44fr.

from garminhomeassistant.

philipabbey avatar philipabbey commented on September 12, 2024

Just to acknowledge your submission.

{
  "$schema": "https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json",
  "title": "Domicile",
  "items": [
    {
      "entity": "script.script_ring_desactivation_alarmemaison",
      "name": "Arret Alarme",
      "type": "tap"
    },
    {
      "entity": "switch.tasmota10",
      "name": "Basc. Porte garage",
      "type": "toggle"
    },
    {
      "entity": "switch.tasmota30",
      "name": "Ambiance1 Salon",
      "type": "toggle"
    },
    {
      "entity": "menu.eclairage_salon",
      "name": "Eclairage Salon",
      "title": "Salon",
      "type": "group",
      "items": [
        {
          "entity": "light.halogenes4",
          "name": "Halogene",
          "type": "toggle"
        },
        {
          "entity": "light.lamp_leds",
          "name": "Lampe Led",
          "type": "toggle"
        },
        {
          "entity": "light.lampe_phones",
          "name": "Lampe téléphone",
          "type": "toggle"
        }
      ]
    },
    {
      "entity": "script.script_lampe_couleur_pou_raz",
      "name": "RAZ Lampe",
      "type": "tap"
    },
    {
      "entity": "switch.crnr_tbl_usbs",
      "name": "Corner Table USBs",
      "type": "toggle"
    }
  ]
}

Checks out in the schema checker (you already knew that). You mention working API key and that the menu does display on your Venu2 (same device as me, so this is the most tested!). As you are getting no actions working, I'm going to go with API URL. Please can you re-test your REST command with a copy & paste of your API URL from your watch settings?

Otherwise the next step would be to meet by video somehow so I can see and get a better feel for what's going on here as I'm worried. This should be working.

from garminhomeassistant.

philipabbey avatar philipabbey commented on September 12, 2024

Another thought. Does your set up meet this requirement from the README.md?

"It is important to note that your Home Assistant instance will need to be accessible via HTTPS with public SSL or all requests from the Garmin will not work. This cannot be a self-signed certificate, it must be a public certificate (You can get one for free from Let's Encrypt or you can pay for Home Assistant cloud)."

I've missed an opportunity for some error checking on API URLs. That I can fix.

from garminhomeassistant.

philipabbey avatar philipabbey commented on September 12, 2024

README.md will be amended, thank you for your insights. Good work.

from garminhomeassistant.

Patrick44fr avatar Patrick44fr commented on September 12, 2024

Good morning,
here is the progress of my various tests:

  • for scenes, with 'tap' option and service (scene.turn_on) everything works correctly, there is an execution message on the watch.

  • for scripts, with 'tap' option without service does not work but works well with service (script.turn_on), there is an execution message on the watch.

  • for automation, with the 'tap' option without service does not work, however it works well with service (automation.trigger), there is no execution message on the watch.

in the case of automations, I was not able to test with automation.turn_on, I do not know how to trigger the reception of the command by API. Maybe I didn't understand the principle well.

If it is feasible, an example would allow me to better understand and increase the processing possibilities.

If I can give my opinion, the new service option is really great, it allows you to personalize via known commands in HOME ASSISTANT.

I'm going to highlight this project on the Home Assistant French forum.

Thank you for everything,
Sincerely.

from garminhomeassistant.

philipabbey avatar philipabbey commented on September 12, 2024

Thank you for your testing and feedback.

for scripts, with 'tap' option without service does not work but works well with service (script.turn_on), there is an execution message on the watch.

Hmm, so I have the following working with the emulator.

    {
      "entity": "script.test",
      "name": "Testing...",
      "type": "tap"
    },

Just tried it on the watch and got a different behaviour, like you. (Spookey) And that was definitely working previously.

For our automation we have the following working:

    {
      "entity": "automation.enable_motion_check",
      "name": "Something moved",
      "type": "toggle"
    },

That's with a toggle rather than a tap.

So I will work through your versions of tap to see what is going on.

from garminhomeassistant.

philipabbey avatar philipabbey commented on September 12, 2024

for automation, with the 'tap' option without service does not work, however it works well with service (automation.trigger), here is no execution message on the watch.

curl -s -X POST \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"entity_id": "automation.turn_off_usbs"}' \
  ${URL}/services/automation/trigger \
  | jq .

Returns the empty JSON array []. Presently I check for an item in the returned array with the desired entity name as part of the confirmation. It should be an array of things that changed, e.g. for a scene. So as the array is empty, the condition to acknowledge is not met by the present code.

The returned data also provides the friendly name that I used to display as part of the confirmation. That will be absent for an automation since they return nothing.

from garminhomeassistant.

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.