basst85 / nextremotejs Goto Github PK
View Code? Open in Web Editor NEWSimple webinterface for the Ziggo Next setopbox
Simple webinterface for the Ziggo Next setopbox
Currently the app crashes when changing to replay tv, dvr or youtube for example
There are more sourcetypes we could add ;-)
if(payloadValue.status){
if(payloadValue.status.uiStatus === "mainUI"){
if(payloadValue.status.playerState.sourceType === "linear"){
filtered = _.where(stations, {serviceId: payloadValue.status.playerState.source.channelId});
uiStatus = payloadValue;
currentChannelId = uiStatus.status.playerState.source.channelId;
currentChannel = filtered[0].title;
console.log('Current channel:', filtered[0].title);
}
else if(payloadValue.status.playerState.sourceType === "replay"){
uiStatus = payloadValue;
}
else if(payloadValue.status.playerState.sourceType === "VOD"){
uiStatus = payloadValue;
}
else if(payloadValue.status.playerState.sourceType === "nDVR"){
uiStatus = payloadValue;
}
}
else if(payloadValue.status.uiStatus === "apps"){
}
}
Installed NPM on Synology and Raspberry but both end up with an error given NPM run.
root@Discstation1:/volume1/web/NextRemoteJs# npm run Lifecycle scripts included in nextremotejs: start node index.js test echo "Error: no test specified" && exit 1
Hi @basst85,
I am trying to install (update from previous version) but I get an error.
Note: I first have deleted my previous install directory "home/pi/Ziggo"
and then performed the following steps:
pi@NodeRED-Pi:~ $ mkdir Ziggo
pi@NodeRED-Pi:~ $ cd Ziggo/
pi@NodeRED-Pi:~/Ziggo $ git clone https://github.com/basst85/NextRemoteJs.git
Cloning into 'NextRemoteJs'...
remote: Enumerating objects: 86, done.
remote: Counting objects: 100% (86/86), done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 121 (delta 42), reused 58 (delta 19), pack-reused 35
Receiving objects: 100% (121/121), 30.25 KiB | 2.16 MiB/s, done.
Resolving deltas: 100% (56/56), done.
pi@NodeRED-Pi:~/Ziggo $ npm install
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/Ziggo/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/Ziggo/package.json'
npm WARN Ziggo No description
npm WARN Ziggo No repository field.
npm WARN Ziggo No README data
npm WARN Ziggo No license field.
up to date in 1.121s
found 0 vulnerabilities
pi@NodeRED-Pi:~/Ziggo $ cd NextRemoteJs
pi@NodeRED-Pi:~/Ziggo/NextRemoteJs $ npm start
> [email protected] start /home/pi/Ziggo/NextRemoteJs
> node index.js
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module 'winston'
Require stack:
- /home/pi/Ziggo/NextRemoteJs/lib/logger.js
- /home/pi/Ziggo/NextRemoteJs/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/pi/Ziggo/NextRemoteJs/lib/logger.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/pi/Ziggo/NextRemoteJs/lib/logger.js',
'/home/pi/Ziggo/NextRemoteJs/index.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-04-11T11_44_41_174Z-debug.log
pi@NodeRED-Pi:~/Ziggo/NextRemoteJs $
This is the Log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/Ziggo/NextRemoteJs/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle [email protected]~start: CWD: /home/pi/Ziggo/NextRemoteJs
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node index.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1022:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/pi/Ziggo/NextRemoteJs
16 verbose Linux 5.4.72-v7+
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v12.20.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node index.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
What can I do about this?
How can I execute the powerKey command directly?
is this possible with a json post? or is there another way?
Thanks!
How can I adjust the script to include a pause / play option in it?
Hi Bas, I need your help. I'm trying to make your component work for python. In your code you have a mqtt post to CPE.getUIStatus But that only sends messages when connected to the ziggogo.tv web app.
My best guess is that something else in de code of ziggogo.tv is done to make this possible. Are you willing to help me reverse engineer the code to find out why ziggogo.tv is working, but your code doesn't? Since my javascript skills are not that good, maybe you can find your way in it? If you are not can you tell me how you reverse engineered te code, so i can try it myself?
I recently replaced my old Horizon box with Ziggo Next.
Checking whether I can access the Box without using native Ziggo box.
I followed instructions, but are not allowed access :
`You don't have permission to access "http://web-api-prod-obo.horizon.tv/oesp/v3/NL/nld/web/channels" on this server.<P>\n` +
'Reference #18.9d18dd58.1672430938.8bbf3bda\n
Any clue ?
Any network requirements ?
Since a couple of days, the call to Ziggo URL doesn't work work anymore (404).
I understand this isn't an issue with your code, but a change at Ziggo's site.
Any idea why or how this could be fixed/alternatives?
Hi,
I have a question about NextRemote.js....not sure if you can help me but you never know
I have installed this on a Raspberry Pi (Raspbian Buster).
On the same Pi I also run Node-Red, which I use to talk with to the NextRemote.js. with http requests (see 1st picture).
It is a very simple flow...I only want to turn the Next ON or OFF (part of a domoticz group which turns on/off all my AV devices in a certain order)
in the example picture below is the flow to turn the Next on/off
and one flow which syncs the Next on/off button with a Domoticz on/off switch, when the Next remote is used
The sync flow is catching the Status() value of your script, the blue node injector is a heartbeat of 1 second to retrieve the lastest state of the Next.
But every day (at a random time) I get connection errors shown in the picture below. If I reset the Pi, the connection is working again untill the next next ;-) connection error
Do you have any idea what may cause the connection error?
Getting this error, any idea?
const getSession = async () => {
^
SyntaxError: Unexpected token (
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
Beside current channel it also would be nice to have some current program information
maybe we can get this info ?
Something like this you get the current program info
locationid and stationid, you can get from the channels
and the endtime you can get at this url
https://web-api-prod-obo.horizon.tv/oesp/v3/NL/nld/web/time/65535
If I switch off the mediabox with the remote control, the TV is also switched off by the mediabox. When i use the power key in NextRemoteJs, it will switch off the media box only. The TV stays on. Is it also possible to switch off the mediabox and the TV with NextRemoteJs?
Thanks
Promising stuff! Upon starting, I receive a "getSession: Request failed with status code 403" error. My runtime environment is Windows. Can it have to do with multi-factor authentication configured on the account?
Is it possible to support multiple boxes? It looks like it's taking the last one now...
Btw, do you know where to find more information about the mqtt topics of this STBs?
just an idea...
It would be nice if this software could act as a mqtt gateway
So the mqtt payload from ziggo will be send/receive to/from a local mqtt broker
I mean I added the current channel json to the local api:
server.get("/api/currentchannel", (req, res, next) => {
res.json(filtered);
console.log('Current Channel');
});
It would be nice if this info is available on my local mqtt broker.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.