Playing with WeMo Insight Switch

I finally couldn’t resist getting my hands on a WeMo Insight Switch anymore. It’s a kind of expensive gadget, considering how clumsy it is and that all it can do is turn one thing on or off. Also, I read in some specifications that it was consuming a considerable amount of energy itself. However, I’m the unlucky owner of a Thomson modem from the Danish ISP Stofa, and this thing consumes about 12.4 W, so I’ve been wanting to do something about that for a while, since I’m only using it for my backup internet connection (WAN 2) and for IP telephony.

Unpackaging
Just kidding. After connecting the switch you have to install the 33 MB app from Belkin to get it up running. After this I searched the net for API’s and alternate ways to control it. Half an hour later I had a working curl command to turn it on or off, as well as a working Tasker configuration using RESTask for Tasker, which I just found for the job (since Tasker doesn’t seem to support setting custom headers in HTTP POST requests).

The hardware
Before jumping to my first project/solution, a few words on the hardware:

  • Power consumption: When the relay is off, it consumes approx. 1.5 W. When on, approx. 1.7 W.
  • Socket: The socket is a Schuko socket, which is problematic for the Danish market, since you cannot plug in the traditional Danish flat and round connectors – they physically don’t fit in.

Controlling WeMo from Tomato
Since my Tomato router firmware (by Shibby) comes with curl preinstalled, controlling WeMo from the router is not a problem. What I wanted to do was having my router turn on the modem for WAN 2 when WAN 1 is down. I decided to ping the DNS server to check if I’m connected to the internet, and to do this once a minute. So in Administration/Scheduler I added this custom script to run every minute:

# Turn on WeMo when WAN is down, hoping for WAN2...
if ! ping >/dev/null -c 1 8.8.8.8; then
  curl -d '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:SetBinaryState></s:Body></s:Envelope>' -H 'SOAPACTION: "urn:Belkin:service:basicevent:1#SetBinaryState"' -H 'Content-Type: text/xml; charset="utf-8"' -X POST http://wemo.local:49153/upnp/control/basicevent1
fi

After switching over to WAN 2, DNS will still be unavailable for a while – and yes, this method will try to turn on the WeMo over and over again. However, this shouldn’t really cause any problems if it’s already turned on. On the other hand, it might actually save the day, if the first packet is lost (WeMo is on Wi-Fi).

Next project
Next project will be to set up openHAB on a Raspberry Pi (for starters) and try to teach it when at least one person is at home. Then I can have back my IP telephony (requiring the modem on) when arriving at home and until going to bed.

Miele@mobile 2.02

By incident I found out yesterday that the Miele@mobile app was updated in Google Play back in May. For some reason Pushbullet didn’t notify me, and I’m not allowed to download the app from Google Play myself, since I’m resided in Denmark and Miele@home is not supported here. Strangely, the only visible change I found in this update since 2.01 was a complete Danish translation. Nice – hopefully this means that Miele@home support in Denmark is not too far away. Update, September 6th 2016: I just found out that the geo-restriction in Google Play is also gone, or at least expanded to include Denmark. It’s now also possible to select Miele Denmark as origin for the Miele user account.

Today’s small rant:

  • Why this geoblocking? I’m allowed within EU to buy all the hardware in Germany, but the only app that exists for the system, I’m not allowed to use. With my very expensive appliances and Miele@home gateway/modules I might add. Luckily in Android there are ways to get the app anyway, but my girlfriend can’t download the app for iPhone and use the system at all.
  • Why not open up the new JSON-RPC API, so better 3rd party apps could be written, that didn’t have to depend only on the old broken Homebus protocol? This would make the system more useful since new ways to use the sytem would arise.

Miele XGW 3000 firmware 2.03

For quite some time, I’ve been holding back a post introducing my Miele@home Android project. So in the wrong order, here’s an attempt to get in touch with some fellow Miele@home geeks: Sharing my findings about the new XGW 3000 firmware upgrade, which was released last week.

My findings are only about the Homebus protocol and multicast packets, since the new JSON-RPC protocol isn’t for public consumption (or so it seems). So here we go – changes since version 2.0.0:

  • Element ‘type’ in http://<gateway>/homebus/ seems to be working again (e.g. <type>WMV960</type>). I’ve never seen this work since the original firmware of my gateway (1.1.0).
  • Prior to 2.0.3, multicast packets would refer to a ZigBee MAC address (at least when communicating with XKM 3000 Z modules): “id=hdm:ZigBee:<MAC>”. This is now changed to device UID.
  • For some devices numeric values are now included in the http://<gateway>/homebus/device XML:
    <key name="State" value="Running" type="state" raw="5"/>
    <key name="Program" value="Cottons" type="program" raw="1"/>
    <key name="Phase" value="Rinses" type="phase" raw="5"/>
    

    This is true for my WMV 960, but not my TKR 350 WP or H 5581 BP. They all have the XKM 3000 Z module, but the WMV has firmware version 1.16, while the other two are version 1.02 (does anyone know if these modules are firmware-upgradeable and/or where to find a changelog?).

Bugs still present:

  • Language parameter not respected for http://<gateway>/homebus/device?language=en. Gateway language is always used.
  • Bizarre values for key “Start Time”. Will update the post on this later.

That’s it for now. I’ll return later with more information about my project as well as rants about the Homebus protocol and Miele’s secrecy and lack of support.

Synology DS cloud broken

The latest version of Synology’s Android app DS cloud stopped working with the Cloud Station package on my DS508, which is stuck with DSM 4.0. The app was released on Google Play March 2nd 2016 – version 2.6. Cloud Station package version is 2.2-3047.

CloudStation is running on the DS. My Android phones and tablet are shown as offline in the client list. On the devices DS cloud is shown as running, but no files are synchronized. Synchronization is missing both ways – files are not pushed to the phone, and files updated on the phone are not pushed to the DS.

To fix this I went to apkpure.com and downloaded version 2.5 of the app. Before installing, the existing app has to be uninstalled, so reconfiguration is needed.

I created a support ticket at synology.com, so they are informed.

Update, March 10th 2016: Synology reported back to me that they had analyzed my logs and found the problem: The database was corrupted. So it must be a bug in the database upgrade in version 2.6 of the app. After clearing the app data and reconfiguring it works perfectly.

Denon receiver plugin for Yatse

I probably made my most niche thing ever today: A plugin for an Android app. I found out yesterday that a new API for Yatse was made available, so today I took on the challenge, and created a plugin for my Denon A/V receiver. I can now control the volume on my receiver directly from Yatse. In a few days I might clean the code up and finish it, so it can be released either here or on Google Play.

Update, August 8th 2015: I’ve just released the plugin!
Get it on Google Play.

The downfall of Samsung

First of all, I’m a big Samsung customer. I own two Samsung LCD TV’s, a PC monitor, a cellphone, a Blu-ray player and a hard drive. Heck, I even own a Samsung vacuum cleaner. I don’t own any Apple products. So this is not about the ongoing Samsung vs. Apple patent war or me dishing Samsung because I’m an Apple fanboy. It’s about me being a critical, but fair, customer.

In January I bought a top-of-the-line 55″ LED Smart TV – UE55D8005. This is a very nice TV, but the “Smart” also makes it a computer – a computer that needs software.

Next, in June I also bought a smartphone, Galaxy S3 – finally making the switch from my ancient HTC Desire (that became useless because of the lack of internal memory – but that’s a completely different story).

I’m relatively satisfied with both products. However, I’m not at all impressed by Samsung’s understanding of software and product life cycles. It seems that Samsung abandons software support for a specific model almost before the last item has shipped.

The TV came with a Galaxy 5″ Wi-Fi tablet. This tablet came with an app called Samsung Smart View. A nice little app to control the TV and even stream video from the TV to the tablet. However, this app is not compatible with Samsung Galaxy S3, their flagship smartphone. It’s been four months now, so why is this still not working? I contacted Samsung about this issue, but didn’t get any useful answers. I asked four times before I got confirmation that they were even aware of the issue, but their support is completely broken.

Yesterday Netflix was introduced in Denmark. So I also asked Samsung how to get the Netflix application for the TV back – I couldn’t find it anywhere, but I knew that the app exists for my model and works with the American Netflix. Their support couldn’t help me with this, but told me that the latest TV models (E models) would get an update today or tomorrow.

What’s the point of all this? Samsung simply don’t get it. Not being able to integrate a top model of their TV’s with the current top model smartphones is ridiculous. There are so many reasons why this would make sense. Just to name a few features that would be nice to have on the phone:

  • Remote control.
  • Using the phone as a keyboard.
  • Scheduling timed recordings.
  • Automatic pause/time shifting when the phone rings.

The TV also integrates with services on the net, for example YouTube. Samsung cannot just abandon the firmware once a new TV model has been released – and render “old” models useless when services change and need software upgrades. At least not if they want customers to stick. I don’t get it. Is the logic that I will buy a new TV only nine months after buying a 2.000 € TV – only to get the latest software? If this is the case, they are doomed – I’d never buy another Samsung Smart TV after experiencing a complete lack of support and upgrades once.

Then there’s the poor quality of the software. I prefer Android to iOS because of its open nature. But everything Samsung has built on top of Android sucks. Period. Just to name a few:

  • TouchWiz: Well, this is actually decent, but has some stupid bugs – like folders opening on their own. So annoying.
  • Calendar: First of all, it’s ugly. When creating new events, it always defaults to “Samsung Calendar”. Who would prefer Samsung Calendar to Google Calendar – and what is Samsung Calendar? What’s up with the up/down arrows when setting date and time – why not use a scroll wheel? And how about some nicer widgets for the calendar?
  • ChatON, Samsung Apps, S Suggest: Who cares about these things?
  • Sometimes it wants me to connect to my Samsung account, but doesn’t say why. If the wrong password is typed in, the application leaves and prompts for both username and password again. They shouldn’t release software that works like this.

To summarize, Samsung is a hardware company in a software world. They have no talent for writing software whatsoever, and they don’t even manage to support and integrate their own products. Apple and Google get this. This is why I believe Samsung will have a very hard time, once the competition is ready to take them out. Like Google killed Altavista in the late 1990’s. Like Netflix killed Blockbuster. I know I’m ready for an alternative to both Apple and Samsung.