GithubHelp home page GithubHelp logo

Comments (3)

jmattheis avatar jmattheis commented on May 26, 2024

What kind of image is it? Is it accessible in a browser? The example you provided has invalid syntax and the priority must be an integer. E.g. this example works for me:

{
  "title": "Title",
  "message": "![Info](https://placebear.com/400/300)",
  "priority": 5,
  "extras": {
    "client::display": {
      "contentType": "text/markdown"
    },
    "client::notification": {
      "bigImageUrl": "https://placebear.com/400/300"
    }
  }
}

from server.

Circenn5130 avatar Circenn5130 commented on May 26, 2024

Per our discussion on Element:

Hi, this is a setup for Blueiris. The images in the "message" and "bigimageurl" are accessible from a web browser.
the image format is .jpg

Confirming that the provided layout was exactly what I needed and resolved my issue. Thank you so much for your help!

from server.

Circenn5130 avatar Circenn5130 commented on May 26, 2024

Here's the final version of the script in case anyone else wants to do similar. It was definitely a pain since Blueiris has it own set of variables which made it so I couldn't just script in powershell and be done. Otherwise BIs variables wouldn't work.

  1. I had to create an alert action set to write to file -- powershell extension (.ps1) - (overwrite) with the code below pasted in.
  2. Another action set to send the photo to the web server I use to so that it's accessible without requiring logging in to blueiris,
  3. And a final alert action set to run the .ps1 powershell file from step 1 using powershell 7

A kind of messy solution I'm sure, but I'm over it after struggling with it for the last couple days lol

$TITLE="&CAM &MEMO"
$MESSAGE="![Blueiris](https://url/&ALERT_PATH)"
$IMG="https://url/&ALERT_PATH"
$URL="https://url/message?token=<token>"
$Priority="5"

$json = '{
    "title": "'+$Title+'",
    "message": "'+$MESSAGE+'",
    "priority": '+$Priority+',
    "extras": {
        "client::display": {
        "contentType": "text/markdown"
        },
        "client::notification": {
        "bigImageUrl": "'+$IMG+'"
        }
    }
}'

curl.exe $URL --header 'Content-Type: application/json' --data-raw $json

from server.

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.