Montag, 31. März 2014

Vision Security ZP 3102 EU

This is a nice a very reliable PIR sensor which even offers a temperature monitor. But in Vera Lite UI5 there is no device added to use this as temperature probe.

Workaround:

Procedure :
o App/Develop App/Create device
o Enter "D_TemperatureSensor1.xml" in the field "Upnp device filename"
o Enter whatever you want in the field "Description" -> it will be the virtual sensor name...
o Choose a room if applicable
o Click 'Create Device'
o Open the newly created device, go to 'advanced' tab.
o Enter "urn:upnp-org:serviceId:TemperatureSensor1" in the field 'New service'
o Enter "CurrentTemperature" in the field 'New Variable'
o Enter "0" in the field 'new value', click 'Add'

=> Then you must create a scene that runs every x minutes (like 5 minutes).
o In the scene luup code, enter :
 local my_temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature",motion_id)   
 luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", my_temp, virtual_id)  
 return true  


replace 'motion_id' by the ZP3102 device ID, replace 'virtual_id' by the virtual sensor device ID

o Save the code, finish the scene (name, room etc), save

=> Now, when clicking 'Run scene', the virtual sensor temperature should update with the one of the ZP3102...


If you want to use more than one ZP3102, just make sure to create a scene which updates the temp for each device. One scene for every device. Adjust the device and virtual IDs!

edit: Today I had a look again at it and there is a easier way if you have more than one device. You can all put it in ONE scene which runs every 5 minutes. All you need to to is rename there variable for every sensor.

 local my_temp1 = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature",21)  
 luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", my_temp1,38)  
 local my_temp2 = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature",31)  
 luup.variable_set("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", my_temp2,37)  
 return true  

The first variable is called my_temp1, the second my_temp2. Make sure you set the corresponding IDs of the sensor and the virtual probe correctly. The code above is illustrating my setup with two sensors (ID 21 and ID 31) and the two virtual probes ( ID 37 and ID 38).

Sonntag, 23. Februar 2014

TL-WR710N VPN Settings

By popular demand:

Once you got your second router which supports L2TP or PPTP on the WAN interface, you can start settings up this little device. I used a TL-WR710N  by TP-Link. Small and handy. Other produkts might work too, I especially recall the TP-Link and D-Link routers to support this. But before you buy check whether they do support it or not.

So what else do you need besides this second router? Well, an ethernet cable to connect it to the original Base-Router and of course an active VPN-subscription of your choice. You will need an provider which overs pptp or L2tp access. But most do. Just check their packages avaibilbe or chat with the support.

Just a small reminder here again:

What are we trying to achieve?
  1. Connect a router to a VPN server
  2. Provide the VPN connection to multiple devices
  3. All without flashing special firmware to a router, NO guarantee voided!
  4. Using a 2nd cheap router as VPN router, NO interference with existing setup 

I am using the TL-WR710N as example here. Should be similar for other devices though!

prerequisite: Working home wifi/network with base-router. Connect the VPN-router WAN-port to a regular LAN-port on your base router. Power up the VPN router. Connect to the new VPN-router Wifi and do the "Quicksetup", or use a wired connection from the VPN-router LAN-port to your Laptop/PC.

Now you got a second, secluded wifi/network running on the VPN-router. To turn this network into a VPN routed one, go to "Network", "WAN" and change the connection Type to L2TP or PPTP and input your server credentials. Change the MTU value down to 1400. This fixes some issues while surfing. Choose "Connect Automatically", Hit SAVE and you are done. Every device (iPhone, AppleTV, Laptop, PC) connected to this VPN-router (wireless or wired) will be routed thru the VPN-server and avoid any GEO-blocking.





Dienstag, 21. Januar 2014

Internet in Dubai

Hi everybody,

I am in Dubai now and want to share some information about the internet connction there. I live in a house in a community called "Arabian Ranches". The ISP is du Telecom or know as EITC ( Emirates Integrated Telecommunications Company ). They are the only ISP providing Internet service in the gated community " Arabian Ranches " (despite that there are only two telcos in UAE anyway, du and Etisalat ).

Okay, so I live in a house in this neighborhood. As I couldn't get any informations prior actually being in Dubai in my house, I ll try to give some information for people who might have similar question.

DU offers FTTH here. There is a CPE in a cabinet in the house. The CPE is doesn't need power, so I assume they are using a passive optical network (PON). Speeds are up to 100 Mbit. I sticked to the smallest bandwith with 8. Upgrade is always possible.

So the CPE is connected with a double optical cable to the so-called "optical" Layer 2 switch. They installed a Vood 292 "Layer 2" switch next to the CPE. This makes the transition from optical to copper RJ45. You ll find more information on the Vood 292 on the internet.





Two Rj11 are available for analog phone (they do it VoIP -style). Works. 

So the technicians came, did some stuff, asked me where my computer is did some more work and left. They told me to buy a router if I want wifi. After they left, I checked their work....  They did some wiring in the cabinet, put the Vood 292 in and connected the house-cat6 cables to the Vood. The funny thing is, that they did a bad job regarding wiring. They were friendly and all, but they obvious have no idea to a proper cat-wiring.

All the Cat6 cables from the house terminate in this cabinet and they are punched down onto a "Block 66" not a patchpanel! As it hurts my eyes looking in this cabinet, I ll get a patchpanel and install it there. The cabinet isn't a 19"-rack and there are only 10 cat6 so a small patchpanel for wallmounting will be enough. I ll add a small switch and do the job properly. Once I find my camera, I ll make some decent pictures.

You can hardwire your stuff to the Vood 292 and they ll get an external IP. But As I wanna use homenetworking I ll just hardwire one of the eight Vood LAN ports to the WAN of my router. the 7 other won't be used. I am pretty sure if you gonna use IP-TV ( DU offers over 200 FTA channels ) your IP-TV decoder box gonna need hardwire contact on the Vood LAN as they probably use vLAN tagging.


Freitag, 10. Januar 2014

Softether - Raspberry Pi

Just found a very good writen German manual.

Also für alle dies auf deutsch lesen wollen, schaut euch ihn mal an:

http://go-seven.de/softether-vpn-auf-dem-raspberry-pi/

Copyright Pascal Tippelt

Sonntag, 5. Januar 2014

Virtual Ethernet LAN cable

As an ongoing effort, I am trying to connect my different homes and flats with some kind of VPN so that we can all share the same resources. I recently tried connecting my routers (which run DDWRT or TomatoUSB) with some kind of client/server construction based on PPTP or openVPN. Neither of the protocols were to my satisfaction as openVPN requires routers with more flashmemory and ddwrt is a mess with its GUI.

Enter... Softether

http://www.softether.org/4-docs/2-howto/1.VPN_for_On-premise/3.LAN_to_LAN_Bridge_VPN

I stumbled upon this nice piece of software one day as I was looking a solution again for my problem. It is just perfect for me. It's a bit similar to Hamachi, but in my oppinion even a bit handier.

Imagine Softether being a virtual network cable expanding your existing home network with a virtual lan cable going to a virtual "cloud switch". Adding Softether to all your different home networks amd connecting them to the same cloud switch just connects all your networks on layer 2! Its really like pulling network cables from all your places to one central switch without actually pulling real cables between your homes/flats.

Those virtual network cables are route through a special VPN tunnel and terminat in the virtual hub in the cloud. The network really behaves like being linked with a regular patch cable! It works so good, that I even was assigned an IP address from router A's DHCP pool, even though I was actually on router B's physical net ("problem" was solved by enabling "Filter DHCP packets on Virtual Switch").

So, like I said, this can be used to merge multiple networks to one big one. I am using this even on the same TCP/IP subnet 192.168.67.0, here is how:

Router A has 192.168.67.1 with DHCP pool ...2-...99
Router B has ...100 with DHCP pool ...101-...149
Router C has ...150 with DHCP pool ...151-...199

Every router is by default the gateway of its physical network, but all devices are in the same subnet. Using printers, IP-cams, NAS like on your homenetwork.

My network C is in an VoIP restricted country. I can't use SIP over there. Ports blocked, deep packet inspections running on ISP side, SIP via VPN is not as easy too. Because you can't port-forward thru VPN that easy. So my SIP-phone on network C is configured manually to use IP 192.168.67.254 (out of every DHCP pool) and use 192.168.67.1 as gateway and DNS. Router A has a portforward on port 5060 to 192.168.67.254, so it is reachable from outside.

Sounds like a nice setup right?

But now even better: Softether of course requires to run on each physical network segment you want to connect with each other. You could put it on a regular desktop machine and its fine. But it needs to run 24/7 so that the virtual cable is up. But that'S not preferable solution, too much waste energy.

Enter ... Raspberry Pi

There is a Linux ARM build available from Softether. So easy to install, so low energy, such wow, so lol.

2GB SD card. fresh debian for Raspberry, connect raspberry with router (lan cable), power the raspberry (i used usb port of routers!), ssh into your Pi, apt-get update upgrade, expand filesystem, set timezone

meanwhile set up dhcp reservation for the pi, portforward 5555 to pi  (only necessary for server pi)

ServerPi: wget latest Softether Server ARM EABI build for Pi, follow these blog post more or less:

http://tomearp.blogspot.de/2013/11/setting-up-l2tpipsec-vpn-with-softether.html

Client Pis: wget latest Softether Bridge ARM EABI build for Pi, same procedure like server just replace server everywhere with bridge

I even doubt anyone will ever read this but if someone ever does and is stuck, just comment. Just a rough sketch of what to do.

To config all the settings on the Pis just use the "Server manager Tool" on any desktop machine and connect to the Pis IP. There you can setup everything. All you need to do on the Pis is installing Softether moduls and ensuring the autostart on boot. The whole config stuff is easy made from normal computer with nice GUI




More Z-Wave Stuff

I recently added some door/window contact sensors to my setup. Easy install. In addition I also added a motion sensor and a siren. All products are battery powered. If they sense a motion or an door/windows opening, they wake up from hibernation and send their new state to the z-wave controller.

The siren is also battery powered, but it useses something like Flirs. It sleeps for 900ms seconds, then wakes up, checks for new instructions for 100ms and then sleeps again. This way it can conserve battery power but is also ready for new commands like "power up the siren, we have an intrusiuon!".

But until I haven't tested the whole setup for false alarms and tripping sensors, I ll stay with email notifications until i feel comfortable enabling the siren in the alarm pattern. Because once this thing goes off, it really makes a hell of a noise.

Dienstag, 17. Dezember 2013

Z-Wave Home Automation

I recently decided to renew my shutters in the living room and the dining room. The old plastic ones were getting yellowish from the sun and some elements had dents and cracks. I decided to get new Aluminium shutters with can be operated with a motor.

As motors I chose simple "dumb" Oximo WT by Somfy. They have 4 wires running down from the motor, PE, N, P1 and P2. P1 and P2 are used for either up or down and are the same as L.

They were installed with a simple switch to control them locally. But I wanted them to be more "smart". They should open in the morning and close in the evening. I chose the Z-Wave system as it seems promising for future additions.

To control the shutters I chose the Düwi 05436, which have L N Com P1 P2. Connecting those to the Oximo WT was quite easy, just keep in mind that you need to connect Com from the 05436 to L of your installation. A simple small "bridge" to connect them is all you need. If the shutters run up when pressing the down button, just change P1 and P2.

Now I have shutters in my house which can be operated locally with a switch (same as before) but can also be controlled via Z-Wave technology. The Z-Wave hub (like the "central") is a MiCasaVerde Lite, a small controller hub. It's connected to your local network via LAN cable and provides a user interface via its local IP address. Adding the shutter controllers to it wasn't a big deal, pretty standard procedure straight from the manual.

But then problems started. I couldn't access the UI of the Vera Lite any more. Long story short, using Chrome's "private tab" solved the problem. Now I can control my shutters with the UI from any computer or smartphone. I also invested in a dimmable wall plug  to control a light remotely. Works fine too. Moving the bar to a specific % works perfectly for the dimmable wall plug.

Sadly, it does not work the same way for the shutters. As I found out, the % indicated there is a time-% of the total operating time of either state "up" or "down" by default its is set to 120s. So 50% would be 60s of operating. But for example my small window (just 30cm wide) is closed completly by the Oximo WT within 20s. So If I would like to close the small window shutter only down to 50% I need to set the shutter to 8,3%.

You can modify the "total time need to operate to 100%" in the advanced Z-Wave settings somehow... But haven't read into that yet. For now I am happy to operate them to full close/ full open.

I have read in the Düwi 054368 that there is a "calibration" mode of the switch to do this process directly on the device. I ll try that on my Düwi 05436 next weekend. If this works, I think the Düwis will set their "total time needed to operate to 100%" by themselves.

What else did I got for my Z-Wave system?

I fetched myself a Düwi 05431 wall switch to control the balcony light. But i couldn't install it as the provided wall mount plate and all the exterior of the switch ( Everlux series ) is not compatible with my already installed switches. Will go to the hardware-store and look for a double housing which is compatible with the Everlux. Or maybe just get an Everlux wall socket. Whatever is cheaper.

And I got me an PHI_PAN06 from Philio. It is a relay which can control two separate loads of max 1500 Watts. Before I tried to mount it in my garage to control the garden illumination and the garden power sockets ( some Christmas decoration lights are connected to the garden sockets), i quickly connected it to a spare wire in my hobby room to test it. And I am glad I did. Because the Vera Lite didn't really discovered it, merely added four devices which were not functional. After some digging I found out that you need to update the "device library" of the Vera Lite so that the Vera know what device it is and how to handle it. Compare it to installing some new drivers on the Vera. Otherwise the Vera does not know what a PHI_PAN06 is.

So you do this by adding an MiOS app on the Vera Called Updater. Search the App Store of the Vera for the device list updater and run an update. After that the Vera discovers the relay and it works fine. Although it added 4 devices again with different functions, I don't care. Now they work.

The next part is installing the relay in the garage. Should be not a big deal, will do next weekend before Christmas. Will need some more stuff from the hardware store to do this properly. Like a small fuse box to put all the cabling in. And some external regular wall switches to operate the relay locally as well. Always handy to have a local option if the Z-wave shouldn't work for any reason.