Code Monkey home page Code Monkey logo

hassalarm's People

Contributors

eifinger avatar fixxcz avatar izzysoft avatar johboh avatar mvn23 avatar sjohboh 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  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  avatar  avatar

hassalarm's Issues

Support for host without port

I am running hass behind a reverse proxy, thus I don't need/want a port.
Currently if no one is specified it automatically appends 8123 as the port.

Entity not available after HA restart

After restarting HA it loses the sensor identity of hassalarm until I either turn my alarm on/off, change the time or start the hassalarm app and tap 'save and test'.

As I'm often tinkering with the system after my gf's gone to bed and has set her alarm, this presents a problem.

Is there any way to tackle this?

Won't work I think I have an issue with 12h vs 24 hr clock time

My automations won't trigger even though my next alarm is being updated and my date & time is correct, what I think may be the issue is that my alarm times reports as 8:30 AM and my date & time sensor is reporting on a 24 hour clock without Am/Pm so they never truly match and the automation never fires. Is there a way I can fix this?

Connection failed - Trust anchor not found

Hi,

First of all, thanks for this great app. It has been working flawlessly for me before, however since I moved my Home Assistant (Hass.io) to my Synology NAS it is not working anymore.

I created a new Long-Lived Access Token and updated the server address accordingly but got the following error:

Using long lived token
Entity ID is of type input_datetime
Request: POST /api/services/input_datetime/set_datetime

Request headers: Authorization: Bearer

Request body: {"datetime":"2020-04-16 08:00:00","entity_id":"input_datetime.next_alarm_daan"}

Failure: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

The connection itself is working and also the Long-Lived Access Token works in Tasker.

Any idea what might be the problem here?

Thank you in advance for your help!

Kind regards,
Daniel

Alarm label

Hi,
Is it possible to also get the alarm label ?
Thanks for the great work !

FR: Store app (intent) which triggered a certain alarm update

I've been facing the issue as in #19. Ignored apps is a good fix. My challenge is to know which app to block. At the moment, the only way to do this is by acting on the moment it's been set up as "next alarm" to ignore it. However, I might not have a chance to check at that moment. I would love to understand for all the history of publishes, which app triggered which.

In short, the request here would be to store and show the app source of the alarm on the "Publish history".

For example, instead of:
@23-03-25 10:48:17 alarm @: 23-03-26 09:30

Show something like:
@23-03-25 10:48:17 alarm @: 23-03-26 09:30 by "com.sec.android.app.clockpackage"

Alternatively, this information could be shown on click, similar to the popup information when you click on errors.

At the moment, this would be only for information, so we can diagnose the source of the problematic apps to ignore. In the future, we could also change it so you could have a one click to add that app to the Ignore apps list.

APK download

Are there any plans to make the app available outside of Google's walled garden – e.g. by providing the APK attached to its corresponding release tag here, or bringing it to F-Droid?

Manage multiple device ?

Hi,

First thanks you for your app, this is the best and easiest way to sync my alarm with HA. With 1 device it work great but... any solution to use it with more than one device ? Like this:

  • input_datetime.user1_next_alarm
  • input_datetime.user2_next_alarm

It would be great, and with this feature we can make automation depending the user.

Benjamin

Can't get to automatically trigger

The app broadcasts fine and hass updates the next alarm. I can manually trigger the automation, and it does what it's supposed to. But the value template does not seem to work?

I implemented it from the UI and edited until it looked correct (for easier editing in the future)
Here it is:

image

Restarted hass without luck.

Possible to show next alarm in HA card?

Hey, so I just got the hassalarm installed and I'd like to see my next alarm in a card in HA card, is it possible? if yes, how?
"Next alarm: tommorow OR mon,tue,wed..... at 00:00"

Hassalarm does not determine the correct date / time for the upcoming alarm

Hassalarm does not determine the correct date / time for the upcoming alarm. In case of the settings below it says the next alarm is today (Saturday) at 15:33. I have no (in)-active alarm today or any alarm on that time

Alarms set:

  • Monday - Thursday 07:00
  • Friday 08:00

Hassalarm version 1.1
Samsung A70
Android 9

Alarm has changed before automation can be triggered

Hi,
I´m still testing hassalarm on Samsung S10E and the next alarm value is triggered correct.
I´m using an automation based on your example, but if the alarm is triggered on my phone, the next_alarm is set to the next one, immediately.
These seems to happen so fast, that the automation is not triggered...
Can you add some delay or do you have any idea, how can I solve the problem?
Thank you!

Regards, Michael

Feature Request: History of alarms

Hi. A history of alarms would be cool; even if only 1.

I ask this because I'm hunting down an errant app that seems to be creating then immediately deleting an alarm.

A bit of backstory; I switched to this app after facing the same issue using the official Home Assistant app (where I have an automation that works with the Next Alarm sensor)

crash if Google Alarm Clock is usd on huawei ANE-LX1

i'm not able to submit an alarm scheduled if the schedule comes from google alarm clock app. when i tap the homeassalarm's icon the app close immediately but it is still running.
the only way to interact with the application is to disable the scheduled alarms in google alarm clock.

let me know what can i do to help in solving the issue

Sync the alarm's enabledness

What's the expected behaviour if I disable all alarms on my phone? If I go into Hassalarm, it says "No next alarm scheduled", but it doesn't perform any successful requests to Home Assistant while in this state. So in Home Assistant, the alarm time stays as it was, as though I hadn't disabled it.

I'm not sure what the sensible thing to do here really is. Perhaps set the alarm time to an arbitrary date in the past or far future? Seems a bit inelegant, but would be an improvement on the current behaviour.

Can't get automation to trigger

Hi,

I tried your app and intergtration, however, i ran into some problems.

In Developer Tools -> States i can see the next alarm on my phone (correct value)
image

When entering the following test code in Developer tools -> Templates, i get empty string (a date in 1970):

{ states('sensor.date_time') }}
{{ state_attr('input_datetime.next_alarm', 'timestamp') }}
{{ state_attr('input_datetime.next_alarm', 'timestamp') | int | timestamp_custom('%Y-%m-%d, %H:%M', True) }}

I get this output:
image

Why does the input_datetime.next_alarm have the correct value in the states menu, but no value when testing the template? (neither when used in a automation)

Best regards,
Martin

Incorrect timestamp

I believe there is a bug, but I'm unsure if it is due to Hassalarm or HA.

I have two sensors: input_datetime.next_alarm - through Hassalarm -, and sensor.abelphone_next_alarm - through the app. They both sync my alarm time with HA and the times match, see pic 1.

However, I believe there is an error when converting it to a timestamp (see pic 2), they lead to different values. The required value is 7:05 (UTC), which for me is 8:05 (CET, Paris).
Hassalarm converted to timestamp and back reports: 1608277500 Is equivalent to: 12/18/2020 @ 7:45am (UTC)
App alarm converted to timestamp and back reports: 1608275100 Is equivalent to: 12/18/2020 @ 7:05am (UTC)

My first guess would be that since Hassalarm does not add the timezone, that should lead to mistakes. However this does not match with an offset of 40 minutes. Would you have an idea how this is caused?

1
image
2
image (1)

Unable to connect with SSL self signed certificate

Screenshot_20201217-074627~2

The following issue is occuring when trying to connect to my HA Instance via SSL using self signed certificates. Both the Root and Intermediate CA are installed in Android and Chrome showes the connections certificates as valid. Is there any remediation for that issue?

Next alarm always showing as January 1, 1970, 12:00 AM

I just set it up the first time, and feel like I did everything correctly according to the readme, but I'm not getting the proper alarm time and date in home assistant.

grafik

My configuration.yaml

# Sensors
sensor:
  - platform: time_date # for Hassalarm
    display_options:
      - 'date_time'

# For Hassalarm
input_datetime:
  next_alarm:
    name: Nächster Wecker
    has_date: true
    has_time: true

My automations.yaml (for webhook).
Note, I haven't created any automation to use the alarm yet.

- id: 'hassalarm'
  alias: Webhook for Hassalarm
  trigger:
    platform: webhook
    webhook_id: hassalarm-webhook-2323
  action:
    service: input_datetime.set_datetime
    data_template:
      entity_id: "{{ trigger.json.entity_id }}"
      datetime: "{{ trigger.json.datetime }}"

The app reports "Published Successfully" and correctly shows what the next scheduled alarm is.

Any ideas? Thanks!

automation

Thanks for the very useful app. Do you have suggestions to easily automate the synchronization, in case I forget to start up the app?

e.g.

  • would there be a way of not having to push the button "Save and test connection" to synchronize everything? This would allow to start up the app with apps like MacroDroid or Tasker (e.g. every time I get connected to my wifi network, the sync occurs).
  • or would there be relevant parts of the app that could be easily added to a script which can be automatically called?

thanks!

stopped working

Hello,

I have something very strange, the app worked fine but stopped working for some reason on 19 december.
Now, if I try to replicate what's in the log in python on my laptop it doesn't work either ...

from requests import get,post
import json
import headerfiles as parameters
headers=parameters.headers
address_hass=parameters.address_hass

url='http://'+address_hass+':8123/api/services/input_datetime/set_datetime'

payload='{"entity_id": "input_datetime.next_alarm","timestamp": "1609911060"}'

test=post(url,data=payload,headers=headers)
test.text

This leads to '400: Bad Request' (same messages as on my phone).

However, if I change the payload to payload='{"entity_id": "input_datetime.next_alarm","datetime": "2020-01-06 06:31:20"}', it works fine.

So I'm wondering if something went wrong with using this timestamp payload?

regards
Stijn

Showing alarm when none is

Sometimes Hassalarm gets an alarm which is not set (see both screenshots). I am using the Google alarm clock app on Samsung S10e.

Screenshot_20200626-085108_Clock

Screenshot_20200626-085100_Hassalarm

Alarm in the same hour is in UTC format and not in GMT+1

I'm having an issue with the time format. I think there is an error with formatting it to UTC. I have updated to the latest version of the app. The issue was already there with the previous version.

Time of testing: 01:20 local time or 00:20+1 (GMT+1)

Alarm in phone: --- Value in HA:
01:50 / 00:50+1 --- 01:50+1 <-- Incorrect
02:50 / 01:50+1 --- 01:50+1
03:50 / 02:50+1 --- 02:50+1
04:50 / 03:50+1 --- 03:50+1

If the alarm is within the same hour (max 60 minutes from now), the format is not in GMT+1 but GMT+0 or UTC. This shouldn't be the case. The screenshot is when the alarm is set to 01:50 local time so HA needs to output Wed Dec 23 00:50:00 GMT+01:00 2020

Schermafbeelding 2020-12-23 om 01 42 46

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.