Send Motion-user mailing list submissions to
        motion-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        motion-user-requ...@lists.sourceforge.net

You can reach the person managing the list at
        motion-user-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Re: Getting a Percent Sign (%) into on-Screen Text (tosiara)


----------------------------------------------------------------------

Message: 1
Date: Tue, 20 Oct 2020 14:17:41 +0300
From: tosiara <tosi...@gmail.com>
To: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Getting a Percent Sign (%) into on-Screen
        Text
Message-ID:
        <cachtdwq06lw7ugov9trhupepfv5qp2nsh70trbdq-gfqaav...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

When using curl to communicate with motion, all the params must be
URL-encoded as required by HTTP protocol. Percent symbols is a special one
that is used to encode hex values. In order to use percent symbol as is it
is required to encode it as double percent: %%, or as a hex value (like you
are using) %25

However, the percent symbol is also a reserved special symbol in motion. So
after the URL conversion you will end up having a string with a trailing
percent sign. Which confuses motion as it expects a specifier to follow.

Registered as a bug: https://github.com/Motion-Project/motion/issues/1227


On Mon, Oct 12, 2020 at 11:41 PM John Vaccaro <jvacc...@gmail.com> wrote:

> Hello Motion Users;
>
> I'm using Motion 4.3.1-1 on a Raspberry Pi 3 Model2  using PiOS (Raspbian
> GNU/Linux 10 (buster); Kernel 5.4.51-v7 5.4.51-v7)
>
> All is working as advertised and I have bash code to collect weather and
> rainfall stats and put them into the picture using text_left via *curl*.
>
> The problem I'm encountering is trying to include the Percent sign (%)
> after the humidity level.
>
> No amount of jiggering will get the % appended to the humidity value.
>
> This is the string I am feeding to string_left that works correctly:
> *Partly%20Cloudy%2079F%20Humidity%3A60\nWind:South@{10}mph*
>
> This string gets me an error message from Motion daemon:
> *Mostly%20Cloudy%2081F%20Humidity%3A58%25\nWind:South@{11}mph*
>
> The error message is *The server did not understand your request.*
>
> What do I do to protect the *%* sign or its hex equivalent *%25* from
> having Motion interpret the string as a hex code other than that of the
> percent sign?
> --
>
> All the Best?
>
> *John *
> _______________________________________________
> Motion-user mailing list
> Motion-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
Motion-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 172, Issue 9
*******************************************

Reply via email to