I’ve been using XOJO to automate my home. So far I have 30+ mFi outlets and power switches, I have a couple of Raspberry Pi’s taking commands to open my workshop rollup door, and my electric front gate, I have video streaming from cameras on my ranch. I have a Raspberry Pi running Asterix, and using dial codes I can also open the gates, doors, turn on lights etc. I’m now going to add thermostat control of my Nest and possibly the Honeywell smart thermostat in my workshop. Before I start reading up on the APIs available for Nest, I wondered if anyone has done this already and is willing to share some classes?
I’m trying to condense all the smartphone apps I have to use in to one app. Ultimately using geolocation and the mFi sensors to truly automate a lot of it:
5 minutes from home the thermostat kicks on, the lights are set depending on the time of day. pulling up at my gate automatically opens it. My wife’s schedule and my schedule (we own a company and use ShiftPlanning which has APIs to see who is clocked in at work) will also help decide on what events get fired and when.
Hy David, I recently bought my first board raspberry pi 2, and I’m interested in home automation.
I found online several projects, but all in python.
Please could you share some xojo snippets about geolocation and the mFi sensors ?
Thanks
Luciano
Luciano,
geolocation is a goal, I’ve not added it yet.
All the mFi devices can be accessed via SSH. To access the relays on a mFi powerstrip to turn each outlet (up to 10 outlets per strip) on or off you issue the following commands:
cd /proc/power;echo 0 > relay1
(turns outlet 1 off)
cd /proc/power;echo 1 > relay3
(turns outlet 3 on)
You can read their state, read how much power each port is providing etc. The ubnt forums are a good starting place:
https://community.ubnt.com/t5/mFi/Commands-via-SSH-on-mFi/td-p/418751
The mFi ‘ecosystem’ uses a Java based app and it stinks. I believe it is going to be replaced at some point. Accessing devices directly via SSH is much quicker, doesn’t need Java, and provides me with a better experience in general.
I own a license for the complete MBS plugins. I use their SSH class to access the devices.
Thanks David,
I own MBS plugin license too.
I’ll try to play with SSH following forum’s examples link.
I’ll let you known if I’ll do some step forward about geo class and the mFi sensors with xojo.
Luciano