Archive

Posts Tagged ‘infrared’

Flic Hub Controls WiFi, Bluetooth, and IR Devices with Bluetooth LE Buttons (Crowdfunding)

July 10th, 2017 No comments

This week-end, I wrote about 1btn open source WiFi button that can allow you directly control WiFi appliances, and/or set scenes without the need for a smartphone. We also discussed limitations of WiFi due to high power consumption, security issues and the one-way aspect of RF communication, and that Bluetooth 5 may be a better option for range and battery life if possible. Flic Hub is another way to approach the issue, as it combines Bluetooth LE buttons with a gateway supporting WiFi, Bluetooth, and infrared.

Flic Hub gateway specifications:

  • Connectivity – Bluetooth Classic, Bluetooth LE, WiFi, Ethernet, IR via optional add-on accessory.
  • Audio – 3.5mm audio out/mic in
  • Power Supply – 5V via micro USB
  • Power Consumption – 1.5W typ.
  • Security – SPARKE2+ Bluetooth encryption
  • Dimensions – 85 x 50 x 15 mm
  • Weight – 99 grams

Users can configure workflows by setting up Flic with IFTTT, Zapier, Microsoft Flow or even the HTTP request function in their apps. A Flic SDK for iOS and Android is also available, The Flib Hub runs Linux, and they encourage hacking it to fit your project/application.

You can control individual devices with the Hub, but also set scenes such as turning off light, blinds, and aircon, as well as locking with the door when you leaving by pressing once, and cancel this mode with two clicks when you comeback. It can also be used to order items online with one to multiple press, and short and long presses.

The Flic button has actually been around for a little while, as it was launched in 2015 via Indiegogo, and initially relied on your smartphone to act as a gateway. They added to Flic Hub to control more than just Bluetooth devices, and offer a more capable gateway working without smartphone, so for example you can now use up to 60 buttons, instead of just 8 with a smartphone, and anybody in your home can easily use the buttons.

The Flic buttons battery life has also been increased to up to 3 years. You can find reviews of the first Flic buttons without hub on sites like CNET, as well as somewhat mixed customers’ reviews on Amazon.

Flic Hub is now on Indiegogo with 10 days to go, and over $300,000 raised. If you already own some Flic buttons, you can pledge $69 to get the Flic Hub only, and if you plan to control IR devices too, then you’ll want to add the infrared accessory for a total of $79. If you are new to Flic, you may prefer option for Flic Hub with 3 buttons for $109, or $124 with the IR accessory. They also offer glow in the dark buttons for $59 (2 buttons) or $99 (4 buttons) that could be very useful in some situations. Shipping is free to the US, $10 to the European Union, and $15 to the rest of the world. Delivery is scheduled for October 2017.

Thanks to Leon for the tip.

Olimex ESP32-EVB Board with Ethernet, CAN Bus, and Relays up for Sale for 26 Euros

May 30th, 2017 3 comments

One of the new feature of Espressif ESP32 SoC over ESP8266 is the inclusion of an Ethernet MAC interface, but so far few boards come with an RJ45 jacks. ESP32 Monster board is an option, also including an OLED Display and CAN Bus, and sold on Tindie for $35, but Olimex has now stocked their ESP32-EVB board with Ethernet, CAN Bus, and two relays, and you can purchase it for 26 Euros per unit, and less in larger quantities.

Olimex ESP32-EVB Rev. B specifications:

  • Wireless Module – ESP32-WROOM32 module with 802.11 b/g/n WiFi and Bluetooth LE
  • Wired Connectivity – 10/100M Ethernet with RJ45 jack (via LAN8710A)
  • External Storage – micro SD slot
  • Relays – 2x 10A/250VAC relays with LED status
  • Expansion
    • 40-pin GPIO female header (2.54mm pitch)
    • UEXT connector for sensors and modules
    • CAN Bus
  • USB – 1x micro USB port for debugging (CH340T) and power
  • Misc – Reset and user buttons, IR receiver and transmitter with up to 5 meter range
  • Power Supply
    • 5V via power jack or micro USB port
    • LiPo charger and step up converter allowing ESP32-EVB to run from LiPo battery
  • Dimensions – 75 x 75 mm

The specifications are a little different compared to the Rev. A prototype shown in February, as they added IR transmitter and receiver, a CAN bus, and a micro USB port for debugging, which increases the size of the PCB, and also explains why the price went up from an expected 22 Euros to 26 Euros for the final board.

The board is open source hardware, and you’ll find hardware design files on Github. The software directory is empty for now, but the Tindie page about ESP32 Monster board indicates that “Ether and CAN programming requires ESP-IDF environment and still not by Arduino IDE”, so if you want to use the latter you may have wait a little longer. Olimex is also planning for a color 2.8″ LCD 320×240 pixel display board connected through UEXT header.

Karl’s Home Automation Project – Part 4: MQTT Bridge Updated to Use YS-IRTM IR Receiver & Transmitter with NodeMCU

April 20th, 2017 1 comment

In a previous article, I wrote about an MQTT bridge by 1technophile. I added a DHT temperature and humidity sensor as well as a light sensor. Previously it included a software decoder to decode the IR signal. I never did test the IR transmitter on the gateway, as I didn’t have the parts. But thanks to IC Station, who sent me over a small YS-IRTM hardware based decoder and NodeMCU that I am writing about today. I have replaced the software based version with the YS-IRTM module in the latest update.

Click to Enlarge

Click to Enlarge

I found this project challenging. I admit I am a little weak in my programming skills. It was difficult to find documentation but I found a forum talking about this device and basics of how it works. When an IR code is recognized it sends 3 hex codes via serial connection on the transmit pin. To transmit, it expects 5 hex codes: A1,F1,xx,xx,xx. A1,F1 tells it to send the following codes. You can also set the baud rate but I left default 9600.

It is simple wiring wise. It only takes 4 dupont wires. It took a bit of coding to get it working but I finally got it to communicate via software serial. I started on a Arduino Uno with the code and then migrated it over to the ESP8266 board. I did have a little trouble when I first moved to the ESP board. I initially thought I might need a level shifter but that didn’t help. I am a little surprised I didn’t need a level shifter because the ESP needs only 3.3 volts. I was getting some weird responses and finally figured out I had to put in a slight delay. Maybe the ESP’s speed comes into play.

The way to use this is fill out your SSID and password and your MQTT server with credentials. Flash the device. You will need to add the necessary libraries. 1technophile has good documentation in his wiki.

Once flashed and ready to find your IR codes you will need to subscribe to the topics with the Windows command below. Give the gateway a moment to connect and point your IR remote at the sensor and press a button to find out code.

In your window, you will get something like this “home/sensors/ir 4,fb,8,” which is my power button for my TV. To test the code:

With this code, the TV will toggle on and off.

Click to Enlarge

After this you can use your favorite home automation project and control your IR devices with automations. You can omit any sensors that you don’t need. You will get some erroneous MQTT data if not all sensors are used. Below are the bits of Arduino code added for the IR module, and here’s the link to the github code:

I plan on 3D printing an enclosure with CR-10 I am reviewing, and I will remove the IR LED, and move it to a more suitable position, as both facing the same way isn’t ideal for my setup.

I would like to thank IC Station for sending the NodeMCU ($5.81 shipped) and IR transmitter and receiver ($3.39 shipped) for review. You can get 15% discount with coupon Karics. I finally have a complete gateway.

How to Control Your Air Conditioner with Raspberry Pi Board and ANAVI Infrared pHAT

March 12th, 2017 15 comments

Leon ANAVI may be a full-time software engineer, but in his spare time he has started to develop open source hardware project with the help of others and by himself. Last year, I got hold of his RabbitMax Flex HAT for Raspberry Pi, and tested it with the provided LCD display, one temperature sensor, and a Raspberry Pi 2 board. The board also featured IR receiver & transmitter, and I tried to use it with my aircon remote control, but at the time I did not find a way to do it easily, and control my TV with LIRC instead. Leon has now made a simpler, smaller, and cheaper add-on board for Raspberry Pi Zero, and other Raspberry Pi boards with a 40-pin header, with 3x I2C headers, two IR transmitters, and one IR receiver. He sent me a sample of “ANAVI Infrared pHAT”, and after quickly describing the board, I’ll show how to I could control my air conditioner with a Raspberry Pi 2 board and his Infrared pHAT.

ANAVI Infrared pHAT

The top of the has the 3x I2C header for 3.3V sensors, a UART header to access to serial console, two x 5mm IR transmitters (IR LEDs), and one IR receiver (IR photo sensor). It also has an EEPROM to store the HAT ID.

Click to Enlarge

The other side comes with the 40-pin female header to connect to your Raspberry Pi board.

The board was designed with KiCAD, and the hardware design files are released under a “Creative Commons Attribution-Share Alike 3.0 United States” License on github.

ANAVI Infrared pHAT Connection to Raspberry Pi Board

There’s only one step: insert the board on the 40-pin connector of your RPi board. You can only make one mistake, inserting it the wrong way. It has to be connected in away that it covers part of the board.

I’ve connect it with a Raspberry Pi 2 board with a battery kit, but it fits even better on the Raspberry Pi Zero, or newly released Raspberry Pi Zero W.

Setting up Raspberry Pi, and Controlling the Air Conditioner with LIRC

It’s time to start software setup in order to control the Haier air conditioner pictured below.

You’ll need to install Raspbian, and some packages including LIRC, but I’ve already explained how to do that in RabbitMax Flex Getting Started Guide, so I’m not going to repeat those steps here, especially you can find them in ANAVI Infrared pHAT user’s manual too, and I’ll assume you have already setup your board.

The reason why I could record IR commands from my TV remote control, and not my aircon remote control last time around, is because aircon remotes send not only one byte but also status info each time. The trick is to use mode2’s “alternative display mode” to capture pulse/space data as raw config files.

Let’s do that:

Now I faced the IR receiver and pressed the power key on the remote control:

Wow, that’s a whole bunch of numbers, but that’s exactly what we need as those are the duration of the high and low levels of the IR signal. I have repeated the same command, but capturing 4 keys: off, on, up to 29C, and down to 28C.

Then we need to edit our lircd-haier-ac.conf file manually:

Note that you need to delete the first “big number” from each captured command. For example, I had to delete “4989552” from the first capture of the power key. If you want full control, you’ll need to record all keys. You may want to read lircd.conf manual to understand parameters like aep or aeps. I used the default values, but in case it does not work for you, or works unreliably, you may have to adjust them, possibly from data obtained using an oscilloscope. I did not have such problem, and copied the file to /etc/lirc/lircd.conf:

In theory, you can restart lircd from the command line:

but in my case, I always had troubles when running irsend command:

So I had to reboot the board with sudo reboot to enable changes. Later I used the reload command (to take into account the update config) after restart, and I could avoid a reboot:

Once it’s all working, we can list the keys we’ve just defined in lircd.cong:

To turn on the aircon:

Then I was not sure what action would happen when I recorded the up key once setting the temperature. So I first set the temperature to 23C to check whether it would increment the temperature to 24C, or set it to 29C:

And the later happened, which means you need to record all temperatures you want to set, and there’s no such thing as UP and DOWN keys.

You’ll already guessed how to turning off the aircon:

Then I realized that since “29C” and “28C” commands send the temperature, it might also send the power status, and indeed I can turn on the aircon @ 28C directly with with 28C command. So instead of recording keys for your aircon, you are actually recording “scenes” which you could name “night”, “25Cfanlowswingup”, “off”, and so on. I added 25Cfanlowswingup with temperature set to 25C, fan speed set to low, and swing set to up, added it to lircd.conf, and a single command would turn on the aircon and set all those values:

Pretty neat.

While the instructions above will work with any board with IR receiver (for first time setup) and IR transmitter, you may be interested in getting ANAVI Infrared pHAT on Indiegogo for $9 plus shipping ($5 to  $7). There are also other rewards including the pHAT, I2C sensors, and debug tools. The campaign has already surpassed its funding target ($500), and delivery is planned for September 2017.

Sevenhugs Smart Remote is a Universal Direction Aware WiFi, Bluetooth and IR Remote Control (Crowdfunding)

November 25th, 2016 2 comments

You may have all sort of remote control devices around your home from the traditional IR remote control for your TV, air conditioner, audio system etc.., as well remote control apps for WiFi or Bluetooth objects such as smart light bulbs or water pumps running on your smartphone. Sevenhugs Smart Remote promises to replace them all, and all you have to do is to point the remote control to your devices, or setup virtual actions to your door or window to order a Uber drive or check the weather.
sevenhugs-remote-control

Sevenhugs Smart Remote specifications:

  • MCU – ARM Cortex-M4 @ 200 MHz
  • System Memory – 32 MB RAM
  • LCD – 3.43″ touch screen IPS display; Dragontrail damage ans scratch resistant cover glass, anti-fingerprint & anti-glare
  • Wireless Connectivity – IR transceiver, 802.11 b/g/n WiFi and Bluetooth 4.1 LE connectivity
  • USB – USB C port for charging
  • Sensors – Indoor positioning sensor, accelerometer, gyroscope, compass, ambient light sensor
  • Misc – Small speaker
  • Dimensions – 135 x 41 x 9.7 mm

The remote comes with a charging base including a lost & found button to make the remote control ring in case you can’t locate it, as well as three room sensors to place close to the object/service your want to control, for example one close to your TV, the other on your door, and the last one next to your window. You’ll still need a smartphone running Android or iOS to install an app to configure the remote control for your devices, and currently 25,000 devices using Wi-Fi, Bluetooth or Infrared are supported with more being added daily.
smart-remote-room-sensorsOnce this simple setup is complete, simply point to remote to the device or service you want to control, and the screen interface will adapt to the objects pointed with for example volume control for an audio system, and weather forecast when pointing to a window. If you have several objects in a zone for example a TV with set-top box and AV receiver, you can use the carousel on the remote control to switch between each of them. This also means you can control other WiFi devices from any room in your home.

The company will also release a Lua SDK based in C/C++, first allowing to add new devices to be released in June 2017 but with an early release already available in github, and then allowing much more control over the remote such as developing custom gesture, screens, and menus. The Level 2 part of the SDK is scheduled for release at the end of 2017.

The remote control has been launched in Kickstarter, and have been very successful so far having raised over $700,000. Most early bird rewards are gone, but you can still pledge $149 to get  Smart Remote Kit including the charging base and 3 room sensors. Shipping is free to the US and western Europe, but for other countries it will cost you $20 to $35 extra, and delivery is scheduled for July 2017. More details may be found on Sevenhugs Smart Remote microsite.

Broadlink RM Mini 3 is a $10 WiFi IR Blaster for Home Automation

June 28th, 2016 20 comments

Many electrical appliances such as TVs, air conditioners, heaters, and so on are still controlled using an infrared remote control, but as more and more people are getting used to their smartphone to control pretty much everything, devices such as Xiaomi Mi Smart Remote Center that allows to control IR appliances with ANdroid or iOS mobile are starting to come to market. However during my Smart Remote Center review, I noticed that the app was only available in Chinese, and that it was not quite able to perform all the tasks I wanted (e.g. multiple IR codes programming). There’s now a cheaper and small device available in the form of Broadlink RM Mini 3 “Black Bean” that sells for just $9.88 including shipping, and whose app supports not only Chinese, but also English, Russian, Japanese, and other languages.

Broadlink_RM_Mini_3Broadlink RM mini 3 specifications:

  • WiFi – 802.11 b/g/n @ 2.4 GHz
  • IR – 38 KHz frequency; omni directional (6 transmitters); 12 meters range; 1x IR receiver for learning function
  • Misc – Reset button, power LED
  • Power – 5V/500 mA via micro USB port
  • Power Consumption – Less than 0.85W in standby mode
  • Dimensions – 55 x 55 x 64.5 mm
  • Weight – 75 grams
  • Temperature Range – 0~50 degrees Celsius

Broadlink_IR_BlasterThe device can be controlled and configured using Broadlink e-Control app for iOS 7.0 or greater, or Android 4.0 or above. You’ll be able to select a remote from a list of device or make the device learn your appliances’ remote control, and then control the said appliances via your smartphone manually or through timers. There’s also a function for “healthy sleeping” that automatically adjust your aircon temperature at night, and devices can be controlled from anywhere as long as you have an Internet connection.

Click to Enlarge

Click to Enlarge

Considering the low price, I was expecting the solution to be based on ESP8266 processor, but instead Broadlink has gone with Marvell just like in Xiaomi Smart Remote Center.

Broadlink_Marvell_WiFi_IR_Blaster
Beside Banggood, Broadlink RM mini 3 also be purchased on GeekBuying, GearBest, Aliexpress, eBay, and other for $12 to $24.

Thanks to Nanik for the tip.

Xiaomi Mi Smart Remote Center Review

October 7th, 2015 2 comments

Xiaomi Mi Smart Remote Center is a tiny box with WiFi connectivity and IR transmitters that is used to control infrared enabled devices such as TVs, medai players, air conditioners and more with your Android smartphone. The good thing is that it only costs $20, so I asked GearBest to send a sample to check it out, which they did. I’ll start this review by checking out the hardware, before running MiHome app to control a television and air conditioner.

Xiaomi Mi Smart Remote Center Unboxing and Teardown

The package is just a cardboard box with Mi logo.
Xiaomi_Mi_Smart_Remote_Center_PackageOnce you open the page there’s a sticker with the QR core redirecting to MiHome app.
Xiaomi_Mi_Smart_Remote_Center_QR_Code_MiHome
You can peel it off, and take the box out of the package, where you’ll also find a USB to micro USB cable for power, and a user’s manual in Chinese only.

Xiaomi_Mi_Smart_Remote_Center
To open the device (and void your warranty), turn it around…
Xiaomi_Mi_Smart_Remote_Case_Bottom… remove the ring-like rubber pad, and loosen the four screws that hold the case together.

Click to Enlarge

Click to Enlarge

We’ll find 6 (or 7?) IR transmitters in the center of the board, as well as an IR receiver from the side (bottom of the pic) which might be used for IR learning. The solution is based on two Marvell processors: 88MC200-NAP2 ARM Cortex M3 micro-controller with 512KB SRAM, and 88W8801 Wi-Fi SoC supporting 802.11n (1×1) single-band (2.4GHz) WiFi.

Xiaomi Mi Smart Remote Center Tested with MiHome app

The first thing to do is to install MiHome app on your Android smartphone or tablet. iOS is not currently supported. Bear in mind that for some reasons, it requires a lot of permissions, including the permission to make direct phone calls…

Once you power the device, you’ll see a notification indicating a new device is detected (green icon on the screenshot below), and I was pleased to find out the setup part was in English.

Setup and Main Menu

Setup and Main Menu (Click to Enlarge)

You’ll need to click next, setup a WLAN connection to your router, and press next to complete the installation. You’ll then be redirected to the interface in Chinese as shown in the right above, which allows to search and add (+ icon) infrared devices. When I did this a pop-up also showed up, asking for the user action in Chinese. Here’s a tip, the left icon is usually for “Cancel/No” and the right icon for “OK/Yes”.

Firmware Update and Types of Devices

Firmware Update and Types of Devices (Click to Enlarge)

So I clicked on the right icon, and it informed me in English that a new firmware is available, and I proceeded with the installation which was completed successfully in about 1 minute. You’ll then go back to the Chinese only part of the interface, where you can press the ‘+’ icon to get to a list of device type as shown on the right screenshot above. Even if you can’t read Chinese, it’s pretty much self explanatory. For example the second icon on the top row is for TVs, and the first icon on the second row is for aircons.

List of TV Brands, Keys Testing, and TV Remote

List of TV Brands, Keys Testing, and TV Remote (Click to Enlarge)

After clicking on the TV icon, you are offered a list of TV brands, with the most common (in China) listed first.  I own a Sharp TV so I selected Sharp, and I got shown a power button at first. I tapped on it, and the TV turned off. I was then offered to select between the left (Not working) and right (Working) button to confirm, and was then presented with a volume+ button a shown in the second screenshot above. You repeat this for a few more buttons until you find the one that works, and are finally presented with the remote control on the right with more options. It works pretty well, but there’s some delays, and if you press the volume keys too fast, the delay issue is amplified, and all keys pressed are suddenly send a few seconds later, so you may have to readjusted the volume up or down again.

Let’s switch to aircon configuration…

Aircon Brand Selection, Keys Testing, and Aircon Remote

Aircon Brand Selection, Keys Testing, and Aircon Remote

Again, you can presented with a list of aircon brands, and mine is made by Haier. Configuration is a little different compared to what needs to be done for TVs, as you are presented with four buttons (middle screenshot above), which you need to try, and if it does not work, tap on > to switch buttons, until you are satisfied, and you can press the button on the bottom.  Once this is done, you’ll get an aircon remote on the device. Temperature, mode selection, and fan strength buttons work, but not blade direction, so it did not match exactly my remote control. For some reason the sleep / timer button is grayed out.

You can watch a short demo with both the TV and air conditioner controlled with an Android smartphone and MiHome app below.

So overall it works, but I was expecting to use some more featuring, such as a single key press sending multiple IR code, for example to turn on the aircon, configure blade position and set the timer. Unfortunately, my Chinese skills are not good enough, so I could not check this in details, and people would can’t read Chinese should better wait for a multilingual version of the app.

I’d like to thanks GearBest for sending a sample. They sell it for $19.90 shipped, but you can also purchased the device from other resellers for around $25 including Banggood, Tinydeal, or Aliexpress.

$20 Xiaomi Mi Smart Remote Center Controls Infrared Home Appliances via Your Smartphone

September 28th, 2015 12 comments

Home automation used to be costly and complex to install, and some solutions are still that way, but several devices have dramatically brought the cost down and simplicity up including Orvibo Wiwo S20 WiFi smart socket, now selling for $16, Semlamp SL-011 – an $8 audio controlled relay -,  or smart light bulbs like Yeelight. All three items have the advantage of being plug-and-plug, inexpensive, and controlled wirelessly using your iOS and Android smartphone. There are also been some WiFi, IR and RF gateways on the market, such as Broadlink RM2 / Pro, that can control devices such as smart socker, air conditioner, TV, and items using the 315/433MHz band. If you only want to control IR (and WiFi?) devices, and don’t need to control RF devices, Xiaomi Mi Smart Remote Center sells for half the price for Broadlink Pro for just $19.99 on GearBest.

Xiaomi_Mi_Smart_Remote_AppXiaomi Mi Smart Remote complete specifications might be somewhere on the “Chinese web”, but so far I only have some of the key features :

  • Processor – Marvell MCU
  • Wifi (802.11 b/g/n) connection to smartphone
  • 360 degree all IR remote control up to 20m
  • Misc – Reset button, Power and “activity” LEDs
  • Power Supply – 5V/1A via USB port
  • Operating Temperature Range – -10 to 50 degrees Celcius
  • Dimension – 10 x 10 x 2.5 cm
  • Weight – 88 grams
  • Material – Black light transmissive material, that reduces reflection, and improves infrared penetration

The device only ships with a USB cable and a user’s manual in Chinese, so you’ll have to provide your own 5V power supply.

Xiaomi_Mi_Smart_Remote

You’ll also need to download and install MiHome app on your Android 4.4 or greater Android smartphone, in order to configure the remote control of your air conditioner, TV, set-top box, AV receiver, etc…  There’s currently no app for iOS. The Android support at least Chinese and English languages.


The video above shows you need to input the product number of your remote control, and I’m not sure if there’s an IR learning function to handle the case where your remote control is not part of the Xiaomi database.

Xiaomi Mi Smart Remote Center can also be found on other shops for around $24 to $26, such as Banggood, Tinydeal, or Aliexpress.

Thank you Onebir!