Inicio

Windows 10: enable/disable Hyper-V from CLI

Assuming we’re running a Windows shell with administrator privileges, using next commands is possible to enable, or disable, Hyper-V. In my case this is needed because when Hyper-V is running Virtualbox only can run 32bit virtual machines. I require Microsoft VM manager Hyper-V because I also run Docker for Windows and it’s a requirement.

#enable Hyper-V
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

#disable Hyper-V
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V

Using Homie for a temperature sensor

The second episode of ESP8266 programming series. In the next video I describe how to code a firmware for ESP8266 using Arduino IDE. The purpose of that firmware is create a temperature sensor and publish the reading in a MQTT broker.

Schema of the system:

temperature-sensor-schema

Pictures of the system, I used ESP12E Devkit and some cheap parts:

dav

mde

mde

References in Aliexpress where I bought the hardware:

thermistor psu

Firmware source code is publishied in my github account: temperature sensor source code for ESP8266.

Homie as a convention for MQTT based IoT solutions

In this video I describe deeply a convention called “Homie“; thanks to that we have a set of rules and assumptions very useful when a firmware device is created and/or an IoT platform have to be configured to support those devices. I love that convention and I used it during my demonstration scenario in Lviv IT Arena.

After this video I’ll follow a series of some other videos, describing how to develop devices following Homie conventions.

Official documentation of the convention can be found in the Github Homie project.

Conference: Smart Home using low cost components at IT Arena, Lviv (UA)

Last weekend I talked on IT Arena event organized in Lviv (Ukraine) at Lviv Arena Stadium created for the Football Eurocup of 2012. It was a very good and well organized event, it was a privilege to participate. I gave a presentation about the automation’s that I created latest years at home thanks to the open software and open hardware. The second part of the presentation was a demonstration about how to set up some IoT devices created ad-hoc.

speech

If you want to review the slides, they are available at slideshare.

Conference was recorded but for a while I don’t have the video clip, if I can get access to the video I’ll upload it to youtube and referenced here. Anyway I created a photo album that you can review in LVIV trip pictures photo album.

IT Arena Oriol' speech

Finally I want to give thanks to Mykhaylo Kramarenko because thanks to his invitation I had that great opportunity. Thanks to Marta Maksym to take care of my trip and accommodation. Thanks to organizers for the 3G SIM card with data and free calls, next time a micro-SIM card will be perfect for my mobile phone XD and last but not least a lot of thanks to Denis Kolesnikov for his guided visit to the Lviv center, really nice place I’ll go back to visit it properly.

Table about Industry 4.0 on Catalan Telecommunications day

Last Thursday I participated in a round table about Industry 4.0 as part of the Catalan Telecommunications Day, really interesting event in a very nice place. I haven’t been in Cosmo Caixa since it was called “Museu de la Ciència” a very long time ago. But I have to say that the place is very trendy and awesome.

diada-telecom

Coming back to the event, I met some good friends and it’s always a pleasure but I also meet very interesting new people with who I’ll be happy to keep on talking and going deep on aligning synergies. One of those are i2cat people, guys we have to find the proper way to collaborate because again and again we meet each other with very compatible points of view.

taula8

About the content of my exposition I want to remark two things:

  • Firstly I think we have the debt to leadership the fourth industrial revolution, and catch up all those companies that never did the third revolution no the present. Catalonia has very powerful minds with a lot of entrepreneurs now it’s time to work together and demonstrate what we can do.
  • Secondly summarize the Fernando Trías de Bes article in “La Vanguardia”
    • In the 90s they said that Internet is going to be like another TV channel in our TVs; companies only need to create a Web page and they are ready for the future. But in the end it changed the ‘P’ of product in the marketing strategy.
    • Early 2000 e-commerce get it real and they said that it’s only another distribution channel, but finally it has been the change of two ‘P’s point of sale and price, both of them became obsolete.
    • In 2006 the revolution come through the social networks, they said only this is only personal webs instead of enterprise web; just create some accounts in those social networks and that’s all.  But ‘P’ of promotion has been redefined with new market segmentation.
    • Since 2010 smartphones sales increased dramatically and they said this is just like a mini PC, just adapt web pages and everything is done. But a lot of markets disappeared or changed deeply: photo cameras, music CDs, telephony, etc. So ‘P’ of point of sale and ‘P’ of product totally redefined. Virtual and physical experiences unified.
    •  First decade of new century Internet 2.0 has been consolidated, they said this is just web where people can participate. Companies only need to add a corner in their webpages where can discuss. ‘P’ of prices digital money and a lot of new business models.
    • Currently we talk about IoT and they say this is about adding electronics to the physical world.  Instead of that what happen is all product in a digital environment tends to be converted in a service. Again the ‘P’ of product is obsolete and has to be totally redefined.

diadatelecos2016123

Having that in mind IMHO we have huge opportunities within reach.

Restricted user for SSH port forwarding

I love “ssh -R” reverse SSH is really useful when you have to get access to a Linux machine behind a NAT or firewall. One of the most powerful scenarios to get that running is use a third machine with a public IP address. The idea will be run reverse SSH command in target Linux and publish a forward port at the third server, so you only have to connect to a published port in that third server and you’ll get the target Linux thanks to the reverse SSH connection open between them.

reverse-ssh-schema

A long time ago I talked about that in my podcast “2×04 SSH avançat“.

With this scenario we have a security challenge with the SSH user account on the “third server”, we want a secure user:

  • without shell and sftp access
  • secure enough to only allow port forwarding features
  • access only allowed with authorized keys

I’m not going to give precise Linux instructions on that limited user, but for user you’re not going to have problems to get that:

/etc/passwd(-):

limited-user:x:1001:1001::/home/limited-user:

/etc/shadow(-):

limited-user:!:17037:0:99999:7:::

/etc/ssh/sshd_config:

Match User limited-user
    GatewayPorts yes
    ForceCommand echo 'This account can only be used for maintenance purposes'

Of course, you’ll have your own UID, GID and use your own username. And at “/home/limite-user/.ssh/authorized_ssh” you’ll have to pub public key of the clients that want to use the service.

I’ve got my inspiration to get that from: How to create a restricted SSH user for port forwarding?. Thank you askubnutu.com.