Wednesday, May 22, 2019

Using eir F1000 router with Vodafone Fibre

I signed up for eir Fibre (FTTH) last year, after having eir DSL before that. Original modem was a F1000 (rebranded Zyxel) and I had that configured with all the NAT, DCHP settings and firewall rules that I like.
When I upgraded to FTTH they gave me an F2000, but was reluctant to re-configure all the rules again, so kept the F1000, which connected to the Fibre ONT without any further re-configuration.

(I'm only using the F1000 as a router, WiFi duties are off-loaded to some separate access points.)

So, eir jacked the monthly rate up after a year, and so was time to change provider. Vodafone looked like best option, similar 300MB 'unlimited' package for good money. Easy enough switch over given ONT etc is already in place. But, again didn't want to go setting up all the rules and network bits on a new router. So wanted to re-use the trusty old F1000 again.

Turns out, it's easy enough ...

All you need from your Vodafone 'Gigabox' router is the serial number (off the bottom of the router).

From the F1000 Admin console, go to the 'Network Setting' menu, and then choose 'Broadband'. This brings up a list of interfaces on the 'Broadband' tab.
Select the 2nd interface ETHWAN, but click the 2nd last icon on the right hand side for Edit.
Change Encapsulation to PPoE.
This will bring up the PPP information.
Change the PPP Username to "<your-vodafone-gigabox-serial-number>@vfieftth.ie"
PPP Password is 'broadband'
The MTU also needed to be changed from 1500 to 1492.

WAN Configured Edit screen should look something like this:



Save, and it should bring up the connection.



Yes, yes, yes, I know this old Zyxel is going to be the quickest or best. I'm planning on swapping it out for something more dedicated in the long term, but good to get some long term use out of these things, and they are pretty adaptable.


Saturday, January 14, 2017

Kodi Keymaps and shortcuts

In order to make Kodi a bit more 'wife friendly' I set some remote key shortcuts for common actions.
I used the Red/Green/Yellow/Blue buttons on my TV remote to match these up.

They keymap belows maps Red to EPG TV Guide, Green to recently added TV Episodes and Yellow to recently added Movies.
I have matched Blue to my CCTV camera using a .strm file.

Below is the keymap which goes in your  /storage/.kodi/userdata/keymaps folder.
For my CEC TV Remote I put this in 'remote.xml'

<keymap>
        <global>
                <remote>
                        <red>ActivateWindow(TVGuide)</red>
                        <green>activatewindow(videolibrary,recentlyaddedepisodes)</green>
                        <yellow>activatewindow(videolibrary,recentlyaddedmovies)</yellow>
                        <blue>playmedia(smb://192.168.1.x/path/cctv-montage.strm)</blue>
                </remote>
        </global>
        <TVGuide>
                <remote>
                        <red>ActivateWindow(TVGuide)</red>
                        <green>activatewindow(videolibrary,recentlyaddedepisodes)</green>
                        <yellow>activatewindow(videolibrary,recentlyaddedmovies)</yellow>
                        <blue>playmedia(smb://192.168.1.x/path/cctv-montage.strm)</blue>
                </remote>
        </TVGuide>
        <FullscreenVideo>
                <remote>
                        <red>ActivateWindow(TVGuide)</red>
                        <green>activatewindow(videolibrary,recentlyaddedepisodes)</green>
                        <yellow>activatewindow(videolibrary,recentlyaddedmovies)</yellow>
                        <blue>playmedia(smb://192.168.1.x/path/cctv-montage.strm)</blue>
                </remote>
        </FullscreenVideo>
</keymap>


The .strm file is on an smb share, but could be hosted locally using the special:// protocol (http://kodi.wiki/view/Special_protocol)

The .strm file contains 1 line:
    rtsp://host/path/stream

For Hikvision cameras for example this means
       rtsp://user:pwd@192.168.1.x/Streaming/Channels/1

Sunday, November 8, 2015

Adding content, but keeping it out of 'Recently Added'

Sometimes when adding content your library, you might want to keep it out of the 'Recently Added List' - if you're adding older seasons or building a back-catalog.

To keep it out of Recently Added change the modified time on the files to an older date. You can do this to multiple files with a command like this:

# find . -exec touch -t 201410101010 {} \;

(-t is the time, so this dates is 10th October, 2014 10:10am)

Tuesday, October 27, 2015

VLC init

Daemonize VLC for CCTV Mosaic
https://github.com/salbahra/Security-Camera-Viewer/blob/master/VLC-init

Wednesday, October 14, 2015

Kodi CCTV pop ups #2

I previously talked a using Kodi to show CCTV pop-ups, but I wanted to extend this to show on all active Kodi nodes (I have 4).

(Caveat - I'm no programmer, so most of this stuff is a hack, I'm sure there are better ways to do this, but this works to start with).

The first challenge was finding which nodes were active, to avoid timeouts to nodes which may be suspended. I found a package called 'avahi' which does local network discovery, so with a bit of tweaking, I was able to use this to spit out a list IP's


$ avahi-browse -raptl 2>/dev/null | egrep '_xbmc-jsonrpc.*192' | awk '{split($0,a,";"); print a[8]}' | sort | uniq

then it was a case of looping through the IP's and making the JSON RPC call to each Kodi node:

for line in iter(proc.stdout.readline, ''):
        str = '/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Addons.ExecuteAddon","params":{"addonid":"script.securitycam","params":{"cam":"replace_with_your_cam_IP"}}}'
        req = urllib2.Request('http://' + line.replace("\n", "")  + str)
        try: f = urllib2.urlopen(req)
        except urllib2.URLError as e:
                print e.reason
        except urllib2.HTTPError as e:
                print e.reason
        print f.read()


As mentioned, there are probably tidier ways to do this, but it's a minimum solution right now.

Monday, October 12, 2015

Kodi command line screenshot

I keep forgetting how to do this, so making a note of it here to keep record

$ kodi-send --action="TakeScreenshot"

On OpenElec this dumps it out to Samba 'Screenshots' share for handy pickup.

Sunday, April 5, 2015

Kodi & CCTV Pop-ups

I wanted to be able to alert CCTV snapshots onto my Kodi systems

I found this Security Cam Overlay script, which is brilliant:
http://forum.kodi.tv/showthread.php?tid=182540

You can call the script remotely with the following JSON RPC call:
http://kodi_ip:80/jsonrpc?request={"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.securitycam"},"id":"1"}}

But if you've got multiple cameras, and want to be able to pass the camera IP by JSON RPC you need to make a few changes:


#url       = __addon__.getSetting('url')

arg = sys.argv[1].split('=')
cam = arg[1]

url = "http://" + cam + "/Streaming/Channels/1/Picture" 

And then you can call the API but pass through the CCTV camera IP address:

http://kodi_ip:80/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"Addons.ExecuteAddon","params":{"addonid":"script.securitycam","params":{"cam":"camera_ip_address"}}}

This means you can call the JSON RPC from motion detector or other triggers, specifying the camera you want to see.