-
-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notify to Lametric Time #235
Comments
Hey, that looks really neat. It's API also seems pretty cookie-cutter (much like some of the other Notifications services). I should be able to rig something up 👍 . I don't actually have one of those devices to test with though, so I'll need your help here to test it out once I've got something. Are you okay with this? 🙂 |
Works for me! I use apprise in docker, so I may need to setup a small dev VM to play around with |
I reached out to Lametric through email hoping that they can set me up with a developer account with test devices (since I don't own a clock). It would make this process a lot easier. If they don't get back to me or tell me they can't help me out, I'll use your first link you shared (thank you for that btw) and see if i can figure out how their API works that way. The only problem with the latter is that it's really cumbersome to develop something and keep asking you to try it out (for both of us). |
Sounds good. LMK what they say. Otherwise, I'm happy to join the discord and help troubleshoot in as real time as I can if needed. |
Just letting you know, i realize it's been almost 2 months now; Update: I reached out to Lametric again after this post (here) via another email to them, and they replied to that by setting me up an account in their public help forum. So I'll once again ask there and see if i'll have any luck 🤞 Update 2: I'm making progress; hopefully i'll have something for you to test soon. The confusing thing about Lametric is there appears to be 2 ways to notify the same device. You can either post to the device itself, or your can post a notification to Lametric's upstream developer website. |
@poblabs I think I've done it.... Here is how you can test it out for me on your clock: # Create a virtual environment to work in
# This way you can just destroy it after when it's all over.
# The below will create a directory called apprise
python3 -m venv apprise
# Change into our new directory
cd apprise
# Activate our virtual environment
source bin/activate
# Install the branch with the Lametric feature:
pip install git+https://github.com/caronc/apprise.git@lametric-time-support
# Give it a go:
apprise -vv -b "Hello" lametric://{apikey}@{ipaddr_of_device}
# Try different message types if you want:
apprise -n warning -b "Oh No" lametric://{apikey}@{ipaddr_of_device}
# You can customize the message a bit too using the URL
apprise -vv -b "Hello" \
"lametric://{apikey}@{ipaddr_of_device}?sound=knock&priority=critical&icon_type=alert" Now I also added Cloud support too which contacts their end to update your clock. You loose out on some features though when you do this (such as # Cloud messages u
apprise -vv -b "Cloud" "lametric://{client_id}@{client_secret}" I'm not sure what the message limits are.... like how many characters you can specify in the body. I'm also not sure how new lines are interpreted |
Awesome I'll give this a try as soon as I can. We got hit by that tropical
storm and have been without power or internet for a few days. Once I'm able
to test I'll let you know!
…On Wed, Aug 5, 2020, 10:37 PM Chris Caron ***@***.***> wrote:
@poblabs <https://github.com/poblabs> I think I've done it.... Here is
how you can test it out for me on your clock:
# Create a virtual environment to work in# This way you can just destroy it after when it's all over.# The below will create a directory called apprise
python3 -m venv apprise
# Change into our new directorycd apprise
# Activate our virtual environmentsource bin/activate
# Install the branch with the Lametric feature:
pip install ***@***.***
# Give it a go:
apprise -vv -b "Hello" lametric://{apikey}@{ipaddr_of_device}
# Try different message types if you want:
apprise -n warning -b "Oh No" lametric://{apikey}@{ipaddr_of_device}
# You can customize the message a bit too using the URL
apprise -vv -b "Hello" \
"lametric://{apikey}@{ipaddr_of_device}?sound=knock&priority=critical&icon_type=alert"
Now I also added Cloud support too which contacts their end to update your
clock. You loose out on some features though when you do this (such as
priority, sound, and icon_type)
# Cloud messages u
apprise -vv -b "Cloud" "lametric://{client_id}@{client_secret}"
I'm not sure what the message limits are.... like how many characters you
can specify in the body. I'm also not sure how new lines are interpreted
\r\n... Maybe you could experiment with some of this and report back?
Even if you could just let me know that this is working, that would be
awesome!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#235 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2SYZ7JAWGMLZZV2ACA2GLR7IJOPANCNFSM4NVAR4TA>
.
|
Hi, I have a LaMetric Time and can test... Getting an error:
Matt |
@mattpackwood Thank you so much for joining in! Your help is always appreciated! 👍 You're definitely getting that error because you're not using the If you did do that, then maybe the |
Chris, this is what I get (forgive the length):
|
Thanks @mattpackwood, I'm stumped on this one, is
One command i did that you'll see above (after activation) was this: # what binary script will i launch if i type the word `apprise`
which apprise
# My response was: ~/tmp/apprise/bin/apprise
# Good! This is the directory (/tmp/apprise) that i created my virtualenv in Based on your error message you're going to get a different directory path. The connection error i got showed that it parsed 'exactly' what you provided, but since i don't have a clock, i got the expected time. Thanks for all your help so far though! Keep me posted if you figure it out. |
Chris, I dropped down so I was in: Then ran: And got |
Matt, Perfect! thank you! I think i just fixed that problem. Do a Good Luck Chris |
Chris, It is working, but I get:
In my terminal window |
That got it! |
Awesome! We're getting closer! I just pushed another small update that will accept the 201 HTTP response code (as it should). You'll need to do a Would you mind trying different message sizes for me? I'd be curious how big you can make them before it's an issue upstream. Also try running the command as: # -t introduces a title which will cause 2 lines to be sent upstream
# i'll be curious how LaMetric handles new lines
./apprise -vv -t "title" -b "Hello" lametric://{apitoken}@{device_ip} Chris |
You just get As for length, I used |
Wiki Page ready to go! Just adding a few final touches and will merge the code shortly to the master branch. |
Code merged; closing off issue. Please let me know if any of you have any issues! |
Works great! I'm wondering if we can use a custom icon? I see there's the defaults listed, but maybe an option to do "custom" then we could do |
That's a great idea. I was going to bundle a new official release today, but i'll do this first so it can be part of it. |
Thanks again!
…On Tue, Sep 1, 2020, 5:10 PM Chris Caron ***@***.***> wrote:
That's a great idea. I was going to bundle a new official release today,
but i'll do this first so it can be part of it.
I'll stick it i a new ticket though so it's easier to track that way.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#235 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2SYZ4UOYPOYM76WHB3FT3SDVPM3ANCNFSM4NVAR4TA>
.
|
@poblabs can you make the web based notifiactions work? |
I'm only using local notifications since my Home Assistant is local. Haven't tried the cloud at all. Is it not working for you? |
@mattpackwood i might have to rebuild the Apprise API for you to get the latest code changes. Does it work from the CLI and just not from the API? |
Ah, I am running the Apprise API in a docker container, and I did have to go into the docker container and run a pip upgrade on the apprise package. Not clean by any means but it worked. |
I am running on an Ubuntu machine, I just updated to the latest version, still no joy.... @poblabs how do you have your LaMetric API configured? |
@mattpackwood I've got it running in a docker container, then curl to send a notification, or use Home Assistant's POST_JSON notify service. The IP of the lametric time is DHCP reserved, and the last URL is the server hosting apprise docker
|
@poblabs Sorry, I was being unclear, I can run it locally using: But no luck with Cloud Mode: |
That sucks, you're my first tester for this. I probably wrongfully assumed it would just work. Would your mind sharing with me the output of |
No worries, here you go...
|
💡 The Idea
I have a Lametric Time and I'd like to be able to send notifications to it! There's a Python library here which may be able to streamline this feature.
https://github.com/keans/lmnotify
🔨 Breaking Feature
Nope, additional notification group
The text was updated successfully, but these errors were encountered: