[mythtv-users] using mythtv as clockradio

Hika van den Hoven hikavdh at gmail.com
Thu Jan 21 04:32:12 UTC 2016


Hoi Bill,

Thursday, January 21, 2016, 5:10:45 AM, you wrote:

> On 01/20/2016 09:33 PM, Hika van den Hoven wrote:
>> If I try to change the value with:
>> <backend>:6544/Myth/PutSetting?HostName=<frontend>&Key=WatchTVGuide&Value=0

> First guess is that you're not sending it as a POST.

> FYI, you might like this:

>     
> https://www.mythtv.org/wiki/Python_API_Examples#The_module_used_in_the_examples_above

> to handle all the sending/receiving from Python. Returned data is
> in a Python dict rather than an Element Tree.

> The above would be something like:

>    import Utilities as api
>    postdata = { 'HostName':args.fe, 'Key':'WatchTVGuide', 'Value':0 }
>    api.Send(host=args.host, port=args.port,
> endpoint=Myth/PutSetting, postdata=postdata)

Yes, I saw that stuff about sending as a POST and didn't know what
that meant. Thanks for the link as the main service api only links to
Perl examples.
but that would not count for calling the single value and getting an
empty answer, while the value is there! Or must such a specific info
call also be packed in a 'POST'?
I did find though how to get data as json, which in Python is way
easier then xml.


Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list