-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Lametric Time Cloud Mode not working #290
Comments
I don't have one of these devices, so it's really hard for me to test this. I spent some time googling how other plugins connected to the Lametric (through the cloud). I made some pretty drastic changes to the app (cloud mode), i'm not sure how it will work... So as far as the cloud mode goes; forget the
The coud URL should look like this (with the new branch only will this work):
# 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 Lametric chamges
pip install git+https://github.com/caronc/apprise.git@lametric-cloud-support
# Give it a go:
# App ID in the form of a string of numbers and letters
# such as 941c51dff3135bd87aa72db9d855dd50
apprise -t "Title" -b "Body" "lametric://{apikey}@{app_id}?mode=cloud" |
Hi there, Errors on install:
Ran the code:
I added the -vvv as I did not see any message from the "first try".... If you like I am happy to send you (in a secure method) the unredacted version of my credentials (I can always reset them later). |
I made some more changes; they may or may not work. You'll have to do a I would like to take you up on your offer if this doesn't work though. Perhaps you could email me (at lead2gold@gmail.com) your Who knows though; maybe the latest code will work... same rules apply as before though; format it as: |
@mattpackwood Thank you for reaching out to me. You provided the I've pushed some big changes and also a lot of unit-tests to go with it; so it's possible the latest code works too. Thanks for all your help so far! 🙂 👍 |
Chris,
This is what I get at my end…
(apprise) mattpackwood@ubuntu:~/apprise$ apprise -vvv -t "Title" -b "Body" "lametric://9a7affc30b22b3e8a151e034b81b855d9f8fb2d1d2af5035ae350fc8c5f98ada@9403c98d-98aa-2e6e-58ff-246509a5bd2f?mode=cloud"
2020-09-10 10:26:22,058 - DEBUG - Loaded LaMetric URL: lametric://9a7affc30b22b3e8a151e034b81b855d9f8fb2d1d2af5035ae350fc8c5f98ada@9403c98d-98aa-2e6e-58ff-246509a5bd2f/?mode=cloud&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes
2020-09-10 10:26:22,058 - INFO - Notifying 1 service(s) asynchronous.
2020-09-10 10:26:22,058 - DEBUG - Using selector: EpollSelector
2020-09-10 10:26:22,059 - DEBUG - LaMetric POST URL: https://developer.lametric.com/api/v1/dev/widget/update/com.lametric.9403c98d-98aa-2e6e-58ff-246509a5bd2f (cert_verify=True)
2020-09-10 10:26:22,059 - DEBUG - LaMetric Payload: {'frames': [{'icon': 'i620', 'text': 'Title\r\nBody'}]}
2020-09-10 10:26:22,943 - WARNING - Failed to send LaMetric notification: Page not found., error=404.
2020-09-10 10:26:22,944 - DEBUG - Response Details:
b''
Matt
Matt Packwood
E-mail: mattpackwood@gmail.com
Mobile / iMessage: +1-248-346-2166
Skype: mattpackwood@msn.com
… On Sep 9, 2020, at 7:02 PM, Chris Caron ***@***.***> wrote:
@mattpackwood <https://github.com/mattpackwood> Thank you for reaching out to me. You provided the {app_id} in your email (which is great), i just need your Device {apikey} so we can construct : lametric://{apikey}@{app_id}?mode=cloud
I've pushed some big changes and also a lot of unit-tests to go with it; so it's possible the latest code works too.
Thanks for all your help so far! 🙂 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#290 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAIL52ALEIFG7P6BL37VJYLSFACR5ANCNFSM4QYZIA2A>.
|
Thanks Matt,
I reached out to Lametric Time support; their documentation is all over the map. It's really hard to follow how to do things with the cloud pushing.
They got back to me and said that it won't work with a *Notification App*. Instead you have to make an *Indicator App*; see here: https://lametric-documentation.readthedocs.io/en/latest/guides/first-steps/first-lametric-indicator-app.html
This is why we're having a hard time identifying what the Application ID is... the Notification App won't provide us one.
Once you create an Indicator App, the page will provide you a URL that
looks like this:
- `https://developer.lametric.com/api/V1/dev/widget/update/com.lametric.APP_ID`
... only that it doesn't.... the instructions on the official website linked to above creates an Indicator App, but only gives you a local 'Push URL' you can use (after you click on that option when creating the App) that looks like this:
- `https://<device localip>:4343/api/v1/dev/witget/update/com.lametric.APP_ID`
First off, in the example they provide, the word `widget` is spelled wrong `witget` wrong in the URL (it looks like the one above), and they no longer provide a remote URL example like Google turns up for me that you can do.
I've reached out and asked if we can just substitute the APP_ID in the local push for the remote and have it work (i haven't heard back yet). It doesn't make sense to add support for the Local App Notifications since just pushing directly to the device (the mode already supported) offers WAY more options. You lose out on a lot of extra features when you use the *Indicator App* payload options.
I'll keep you posted.. In the meantime, if you want to try generating a Indicator App and set it to 'Local Push', (the only Push option) and share with me the details it might work! Or you can actually try it out for yourself if you like too! 🙂
Chris
|
Chris,
I think I know what the “issue” is…
Looking at the instructions it looks like these are pull, not push notifications…
You can push within a LAN and you can poll a remote server, but I do not see a way to generate a push form outside the LAN…
Matt
|
@mattpackwood i agree; that's the way it appears now, but the screenshots from their website paint a different picture. They show that it used to provide both URLs (for cloud pushing) and there are a lot of sources they still link to that use this technique (so while it appears to be suddenly hidden, it's very much working). See:
When i hear back from LaMetric, i'll let you know. There is a good chance if you create an Indicator App and configure it for a |
@caronc I just e-mailed you the credentials I got from creating an indicator app... |
Thanks a lot Matt! It looks like the APP Access Token isn't universal 🙁. I get the error from their remote server:
Using the latest code I pushed: apprise -vvv -b test "lametric://{APP_ACCESS_TOKEN}@{APP_ID}/1?mode=cloud" Produced...
Edit: The Lametric Tutorial explaining how all this works mentions Publishing your app. Maybe this needs to be done first before you can perform a remote post? Maybe there is some way you can perform this publishing? |
Yep, I get the feeling that this is a "local only" service like the desktop notify. Pity, having a cloud-aware device that does not accept pushes is pity... |
@mattpackwood try opening up your App again (on the Lametric Website) and click on the Draft Tab. You should be able to Publish the app which would make it available (for others i believe too) and you can then post to it with perhaps a new Access Token it generates (or it might just make the one you already have work). |
Chris, it looks like the website is smart enough to say that a local push application can only be set to "Private". |
Matt, Would you be okay with making your App public (for publishing/remote access purposes); you can always delete it later. Keep in mind that no one will abuse it because you're also the only one who can post to it (as no one else has the Access Token). But if you're not comfortable with that, I totally understand! You've been a fantastic help regardless even just to get to this point! 🙂 I'll still probably merge all my new changes on this new Lametric branch just because of the improvements that did come with it regardless. |
Chris, I have published it, the problem seems to be that: I just e-mailed you some info... Matt |
Thanks Matt, I'm merging all of my changes and closing off this issue now. If you have the ability to use the developer.api now; you will be able to use the I reached out to them through their support and haven't heard back. For now I'm closing this issue off because it's about the best it's going to get. If LaMetric updates their documentation or opens up the possibility to use the legacy developer.api code, then the new code pushed in the Pull Request associated with this ticket will work. |
📣 Notification Service(s) Impacted
Lametric Time
🪲 Describe the bug
The
device
mode works fine but thecloud
mode does not. It doesn't appear to have every worked since #235💡 Screenshots and Logs
Current output (thanks to @mattpackwood)
💻 Your System Details:
🔮 Additional context
n/a
The text was updated successfully, but these errors were encountered: