Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Need help with NetwrokSender

If you have a question or need help, this is the place to be.
Post Reply
mpg732
Experienced User
Posts: 92
Joined: Mon Aug 05, 2013 6:59 pm

Need help with NetwrokSender

Post by mpg732 »

I am trying to use the following Python script with Netwrok sender and getting an "NetworkSender failed" error.

import urllib
import json
f = urllib.urlopen('http://192.168.0.116:8080/tv/getTuned')
result = f.read()
data = json.loads(result)
duration = data["duration"]
eg.plugins.NetworkSender2.plugin.Send("Dir.Channel", [duration])

I have tested that NetworkSender is working correctly with this line,
eg.plugins.NetworkSender2.plugin.Send("Set.Volume", ["test"])
and the word "test" does show up on the other side.

Below is what I was hoping to see in the variable "Duration"
{
"callsign": "FXHD",
"date": "2008",
"duration": 7200,
"isOffAir": false,
"isPclocked": 3,
"isPpv": false,
"isRecording": false,
"isVod": false,
"major": 248,
"minor": 65535,
"offset": 2105,
"programId": "7495528",
"rating": "TV-G",
"startTime": 1387994400,
"stationId": 3900906,
"status": {
"code": 200,
"commandResult": 0,
"msg": "OK.",
"query": "/tv/getTuned"
},
"title": "Madagascar: Escape 2 Africa"
}
Post Reply