Guide
Another LaMetric IoT script – power control
Because I have currently holiday here is another post which is not related to virtualization …
I combined my new “gadgets” the LaMetric time and my new wifi Smart-Plug from MyStrom. The goal was to report the current power consumption of power plug and the possibility to control the plug with the smart ticker.
MyStrom has a very straight forward API (https://mystrom.ch/en/mystrom-api), and the possibility to create apps for LaMetric is pretty easy what I’ve already mentioned in an past blog post.
All what is needed to implement this solution is:
- a web server which can parse PHP
- two small scripts
- and a private app for LaMetric
This is the script to see the current power consumption:
{
"frames": [
{
"index": 0,
"text": " <!--?php //$host = "http://192.168.1.59/report"; //Call with parameter, e.g.: http://192.168.1.20/LaMetric/myStrom.php?host=192.168.1.59 $host = "http://" . $_GET["host"] . "/report"; $filestring = file_get_contents($host); $startpos = 0; while($pos = strpos($filestring, "\"power\"", $startpos)) { $string = substr($filestring, $pos, strpos($filestring, ",", $pos + 1) - $pos); //echo $string. " "; $newstring = str_replace("\"power\": ","","$string"); echo round($newstring, 2); $startpos = $pos + 1; } ?--> Watt",
"icon": "i1692"
}
]
}
I just read the content from the API, which is already in JSON format, but I reformat it that it is in that way which I need to bring it to the LaMetric.
This is the script to control the power outlet:
<!--?php $host = "http://" . $_GET["host"] . "/report"; $filestring = file_get_contents($host); $startpos = 0; while($pos = strpos($filestring, "relay", $startpos)) { $string = substr($filestring, $pos, strpos($filestring, "}", $pos + 1) - $pos); $newstring = str_replace("relay\": ","","$string"); //echo $newstring; $startpos = $pos + 1; } $newstring = str_replace(chr(13), "", $newstring); if ($newstring == "false ") { echo "Ist ausgeschaltet, wird nun eingeschaltet"; $URL = "http://" . $_GET["host"] . "/relay?state=1"; $data = file_get_contents($URL); } else { echo "Ist eingeschaltet, wird nun ausgeschaltet"; $URL = "http://" . $_GET["host"] . "/relay?state=0"; $data = file_get_contents($URL); } ?-->
And the LaMetric private app:
This simple poll app call the script on the webserver (192.168.1.20) with the parameter of the MyStrom plug (192.168.1.59).
On button action the controller script is launched with change the status (off to on or visa verse)
(192.168.1.59 is the ip of my Power outlet. 192.168.1.20 is the address of my web server, this can be a raspberry pi or a Synology.)
Citrix User Profile Manager 5.3 ?
The hidden release of UPM 5.3, the finding of today … 2 days ago the Feature Pack 3 for XenApp & XenDesktop which contains the new Citrix Virtual Desktop Agent which should support Windows 10 .
I replaced the VDA Tech Preview with this Version on my Win 10 VDI. In my updating fever I also tried to update it on my Win7 VDIs, and wow, I found out that it contains a new version of Profile Manager, version 5.3!
I was surprised that with the installation of FP3 some profile issues i had was gone on my W7 VDIs.
But unfortunately I have issues with the Keyboard when I accessing my VDI’s from Mac OSX clients
http://discussions.citrix.com/topic/371328-xendesktop-76-fp3-3-vda-keyboard-issue-with-mac-receivers/
Problem: I want to solve my profile issues but I cannot install FP3 VDA because of this issue.
Erik Bakker (@bakker_erik) gave me the great hint to unzip the VDA Source (VDAWorkstationSetup_7.6.300.exe or the vdaserversetup.exe) to extract the files needed for UPM 5.3. Thanks!


Installation of UPM 5.3 also appears on appwiz.cpl

So if you are in a similar situation like I was this is a possible way to get early a UPM 5.3 installation without the need to update the VDA. But keep in mind, this is a dirty hack an I’m pretty sure that it wouldn’t be supported from Citrix … All what you do, you do on your own risk. Possibly there’s a reason that UPM 5.3 is not yet officially released … see http://discussions.citrix.com/topic/371286-profile-management-53
Update: Seems there are Issues with UPM 5.3 on Windows 10, I propose to wait with the installation of 5.3.
Citrix Synergy First-Timer Preperation
This year I have the chance to join the Citrix Synergy in Orlando, FL, USA, THE Citrix conference.
For more Information: http://www.citrixsynergy.com
There is already a very good guide for the preparation of this conference from Neil Spellings, see the The ultimate Citrix Synergy survival guide – 2015 , that covers a lot of needed information.
But I add in this post some information for a first timer comes from overseas (Switzerland, Europe) like me.
Revision history
because this is a “living Blog-Post”:
- 26.04.2015: Added “Join evening together Central & Eastern Europe Team”
Avoid the Jetlag when coming from overseas
My personal best method to avoid the Jetlag (Switzerland, Europe to Florida, US -6 hours):
- I will arrive early, even Synergy starts on the 13th, I take already the plane on the 9th of May. That gives me some days to get in the correct day/night rhythm.
- I stay waked up after arrival until my normal sleeping time, even if I’m very tired!
- If I wake up in the middle of the first night because it’s morning in Europe (and in my day/night rhythm), I’ll take a soft Sleep Aid called MidNite, available in a lot of US Stores (e.g. CVS).
- I get up after sunrise an go outside to the Sun to let my inner day/night rhythm know thats now day.
Stay online without expensive mobile roaming costs!
Instead of the Net10 card what is mentioned in the blog of Neil spellings I will buy a AT&T GoPhone Prepaid Card with e.g. 2GB for 25$ and I put it in my Huawei E5372. If you intend to use an other device or provider be aware of the used frequencies. This combination gives you a Mobile Hotspot which works in thr US with AT&T and Europe on 2G/3G and 4G mobile network.
Plan your sessions
You can plan the Sessions you want to attend on the Synergy Session Catalog Website . If you are already registered for Synergy you can login with your Synergy account subscribe to the sessions you like to attend (first come first served, no possibility to reserve the seats with exception of the 99$ Pre-event Training Workshop). and afterwards you can download a PDF with all your sessions or you can download the Calendar-Files.
Plan Meetings!
- After login to your Synergy Account you have the possibility for an Attendee Search and request meetings:

- Try to meet people you known today just virtual from twitter or from a blog to get a face behind of a URL or a Username.
If you register for Citrix Synergy and like this post or this blog
Please use my referral code in the registration:

It’s my email address with MyPeer at the end. That gives me the chance to win Converse sneakers .
If you are from Central & Eastern Europe join the snacks, beer and networking event
Check your Mailbox, and the Spam-Folder about an invitation from Dirk Pfefferle, to a “evening together with Citrix Central & Eastern Europe Team”. I just found in my Spam folder an invitation for this snacks, beer and networking event.



