Interfacing Arduino or Raspberry Pi to Zipabox / Zipatile
Hello community,
I have a couple projects at home to automate and integrate with Zipato controllers but there is no commercial interface that I can buy so, I have decided to remember my electronic skills I had when I was in university and create my own device, however looks like raspberry pi and arduino are the coolest kids on the neighborhood and doing some research I can imagine why. I really don't have experience with linux so for me arduino would be more familiar, but also looking into all the stuff they got available could be a difficult decision to make.
I want to ask your opinion and share your experience with any of these devices and which way would be more easy, reliable and deeply integrated, so far these are my options;
1. Arduino YUN using HTTP requests.
2. Arduino ONE with Wifi shield using HTTP requests.
3. Arduino ONE with Xbee Wifi shield using HTTP requests (looks like Xbee has their own online automation platform)
4. Arduino ONE with Xbee Zigbee shield, using Zigbee as comm protocol. Not sure if these devices will be compatible with Zipabox Zigbee expansion module.
5. Raspberry Pi using HTTP requests.
I just bought a couple books and trying to decide wether to go with arduino (and which comm protocol) or Raspberry. I know a few people have integrated raspberries so any light you can shed will be greatly appreciated.
Although it is overkill, I prefer the Raspberry Pi using Python and Flask. Currently, I am using my Pi to control my garage. It has garage door open/close sensors, it can open/close the doors, and I am working to integrate the PiCamera. I am getting ready to get a second Pi to use in my main house to interface between my legacy X10 devices and Zipato. I already have the X10 interface, but want to move it off my main server.
Although it is overkill, I prefer the Raspberry Pi using Python and Flask. Currently, I am using my Pi to control my garage. It has garage door open/close sensors, it can open/close the doors, and I am working to integrate the PiCamera. I am getting ready to get a second Pi to use in my main house to interface between my legacy X10 devices and Zipato. I already have the X10 interface, but want to move it off my main server.
Alberto, have a look: https://z-uno.z-wave.me
Alberto, have a look: https://z-uno.z-wave.me
I use the combi arduino nano and fibaro universal sensor a number of projects.
I use the combi arduino nano and fibaro universal sensor a number of projects.
I think the coolest kid these days are NodeMCU enabled devices. They cost next to nothing and have on-board Wi-Fi. You can program It with the Arduino IDE. To keep It kewl you should use MQTT and hope for Zipato MQTT support before you finish programming it 😉
The second coolest kid has to be the new Raspberry Pi Zero, now with Wi-Fi and bluetooth. Linux can be a pain in the ***, but usually you can find all the help you need online.
I think the coolest kid these days are NodeMCU enabled devices. They cost next to nothing and have on-board Wi-Fi. You can program It with the Arduino IDE. To keep It kewl you should use MQTT and hope for Zipato MQTT support before you finish programming it 😉
The second coolest kid has to be the new Raspberry Pi Zero, now with Wi-Fi and bluetooth. Linux can be a pain in the ***, but usually you can find all the help you need online.
Hello community,
So, I have spent some free time developing my new "interfaces" using arduino, I have managed to control all sensors to my Arduinos (ultrasonic for water level, relays, current sensors, gas sensors, LCD, 433 Mhz RF and more) the problem I'm having is communicating my Arduino YUN to Zipato Virtual meters, I have spent several hours reasearching how to perform HTTP GET/POST requests using the YUN but I haven't managed to communicate it succesfully with Zipato.
I'm writing this to see if some of the IT guys around here can help me with this, I know very little about HTTP requests. I have seen many ways (libraries) on the internet of guys uploading data to web servers but most of the requests are very different, Zipato ones seem very simple in comparison to these, no headers, no body, just URL... this is the only piece of the puzzle left so I can integrate these interfaces to zipato.
BTW Z-uno is now available on US frecuency, however for some of my solutions Z-wave range is not optimal and I really want to integrate these through WIFI, if anyone has some experience with Arduino YUN or Arduino Uno with Xbee S6B wifi I would really appreciate some help, I will share my Arduino code to see if someone can give me some adavices or help, thank you.
PS.- I have asked for help on Arduino forum but doesn't seem to be very helpful yet.
Hello community,
So, I have spent some free time developing my new "interfaces" using arduino, I have managed to control all sensors to my Arduinos (ultrasonic for water level, relays, current sensors, gas sensors, LCD, 433 Mhz RF and more) the problem I'm having is communicating my Arduino YUN to Zipato Virtual meters, I have spent several hours reasearching how to perform HTTP GET/POST requests using the YUN but I haven't managed to communicate it succesfully with Zipato.
I'm writing this to see if some of the IT guys around here can help me with this, I know very little about HTTP requests. I have seen many ways (libraries) on the internet of guys uploading data to web servers but most of the requests are very different, Zipato ones seem very simple in comparison to these, no headers, no body, just URL... this is the only piece of the puzzle left so I can integrate these interfaces to zipato.
BTW Z-uno is now available on US frecuency, however for some of my solutions Z-wave range is not optimal and I really want to integrate these through WIFI, if anyone has some experience with Arduino YUN or Arduino Uno with Xbee S6B wifi I would really appreciate some help, I will share my Arduino code to see if someone can give me some adavices or help, thank you.
PS.- I have asked for help on Arduino forum but doesn't seem to be very helpful yet.
These are a few attempts using Arduino YUN, I have replaced my serial and API numbers for obvious reasons.
#include "Bridge.h"
#include "HttpClient.h"
//Zipato Settings
String ZipatoAPI = "https://my.zipato.com/zipato-web/remoting/attribute/";;
String MySerial = "MyZipatoSerial";
String MyAPIkey = "MyAPIkey";
String ValueString="value15=150";
const int PostInterval = 15000;
// Variable Setup
long lastConnectionTime = 0;
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
Bridge.begin();
Serial.begin(9600);
}
void loop(){
delay (1000);
digitalWrite(LED_BUILTIN,HIGH);
HTTP_PostZipato1(ZipatoAPI,MySerial,MyAPIkey,ValueString);
delay(2000);
HTTP_PostZipato2(ZipatoAPI,MySerial,MyAPIkey,ValueString);
delay(2000);
HTTP_PostZipato3(ZipatoAPI,MySerial,MyAPIkey,ValueString);
;
delay(PostInterval);
digitalWrite(LED_BUILTIN,LOW);
}
void HTTP_PostZipato(String ZipatoAPI, String MySerial, String MyAPIkey, String ValueString)
{
//https://my.zipato.com/zipato-web/remoting/attribute/set?serial=MyZipatoSerial&apiKey=MyAPIkey&value15=150
HttpClient client;
String talkBackCommand;
char Response;
String URL = ZipatoAPI + "set?serial=" + MySerial + "&apiKey=" + MyAPIkey + ValueString;
client.get(URL);
Serial.println(URL);
while (client.available()) {
Response = client.read();
talkBackCommand += Response; // talkBackCommand = talkBackCommand + CharIn
Serial.println(talkBackCommand);
}
}
void HTTP_PostZipato2(String ZipatoAPI, String MySerial, String MyAPIkey, String ValueString)
{
String URL = ZipatoAPI + "set?serial=" + MySerial + "&apiKey=" + MyAPIkey + ValueString;
Process p;
p.runShellCommand(URL);
Serial.println(URL);
while(p.running());
// Read command output.
while (p.available()) {
int result = p.parseInt();
Serial.println(result);
}
}
void HTTP_PostZipato3(String ZipatoAPI, String MySerial, String MyAPIkey, String ValueString)
{
//POST https://my.zipato.com/zipato-web/remoting/attribute/set?value15=150&ep=MySerial&serial=MyZipatoSerial&apiKey=MyAPI
HttpClient client;
String talkBackCommand;
char Response;
String URL = "POST https://my.zipato.com/zipato-web/remoting/attribute/set?value15=150&ep=MySerial&serial=MyZipatoSerial&apiKey=MyAPI";;
client.get(URL);
Serial.println(URL);
while (client.available()) {
Response = client.read();
talkBackCommand += Response; // talkBackCommand = talkBackCommand + CharIn
Serial.println(talkBackCommand);
}
}
These are a few attempts using Arduino YUN, I have replaced my serial and API numbers for obvious reasons.
#include "Bridge.h"
#include "HttpClient.h"
//Zipato Settings
String ZipatoAPI = "https://my.zipato.com/zipato-web/remoting/attribute/";;
String MySerial = "MyZipatoSerial";
String MyAPIkey = "MyAPIkey";
String ValueString="value15=150";
const int PostInterval = 15000;
// Variable Setup
long lastConnectionTime = 0;
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
Bridge.begin();
Serial.begin(9600);
}
void loop(){
delay (1000);
digitalWrite(LED_BUILTIN,HIGH);
HTTP_PostZipato1(ZipatoAPI,MySerial,MyAPIkey,ValueString);
delay(2000);
HTTP_PostZipato2(ZipatoAPI,MySerial,MyAPIkey,ValueString);
delay(2000);
HTTP_PostZipato3(ZipatoAPI,MySerial,MyAPIkey,ValueString);
;
delay(PostInterval);
digitalWrite(LED_BUILTIN,LOW);
}
void HTTP_PostZipato(String ZipatoAPI, String MySerial, String MyAPIkey, String ValueString)
{
//https://my.zipato.com/zipato-web/remoting/attribute/set?serial=MyZipatoSerial&apiKey=MyAPIkey&value15=150
HttpClient client;
String talkBackCommand;
char Response;
String URL = ZipatoAPI + "set?serial=" + MySerial + "&apiKey=" + MyAPIkey + ValueString;
client.get(URL);
Serial.println(URL);
while (client.available()) {
Response = client.read();
talkBackCommand += Response; // talkBackCommand = talkBackCommand + CharIn
Serial.println(talkBackCommand);
}
}
void HTTP_PostZipato2(String ZipatoAPI, String MySerial, String MyAPIkey, String ValueString)
{
String URL = ZipatoAPI + "set?serial=" + MySerial + "&apiKey=" + MyAPIkey + ValueString;
Process p;
p.runShellCommand(URL);
Serial.println(URL);
while(p.running());
// Read command output.
while (p.available()) {
int result = p.parseInt();
Serial.println(result);
}
}
void HTTP_PostZipato3(String ZipatoAPI, String MySerial, String MyAPIkey, String ValueString)
{
//POST https://my.zipato.com/zipato-web/remoting/attribute/set?value15=150&ep=MySerial&serial=MyZipatoSerial&apiKey=MyAPI
HttpClient client;
String talkBackCommand;
char Response;
String URL = "POST https://my.zipato.com/zipato-web/remoting/attribute/set?value15=150&ep=MySerial&serial=MyZipatoSerial&apiKey=MyAPI";;
client.get(URL);
Serial.println(URL);
while (client.available()) {
Response = client.read();
talkBackCommand += Response; // talkBackCommand = talkBackCommand + CharIn
Serial.println(talkBackCommand);
}
}
Hello all in case someone is attempting to do the same I would like to give you an update on this, I finally managed to communicate my Arduino YUN to my Zipabox, replace "MYSERIAL", "MYAPIKEY" and "MYEP" for your information and you will be succesfully sending one HTTP post to write a random value on a virtual meter. Open you serial monitor to make it work, this is my first succesfull test, I'm currently working on a more advanced interface to integrate all the sensors I want to upload and receive all commands from Zipato. Will post my finished project.
Hello all in case someone is attempting to do the same I would like to give you an update on this, I finally managed to communicate my Arduino YUN to my Zipabox, replace "MYSERIAL", "MYAPIKEY" and "MYEP" for your information and you will be succesfully sending one HTTP post to write a random value on a virtual meter. Open you serial monitor to make it work, this is my first succesfull test, I'm currently working on a more advanced interface to integrate all the sensors I want to upload and receive all commands from Zipato. Will post my finished project.
This is my most up to date working example, much more polished, put together in one function and all commented out. In case someone wants to give it a try.
This is my most up to date working example, much more polished, put together in one function and all commented out. In case someone wants to give it a try.
Update,
I also created a subroutine that makes requests synchronously to Zipato which also works, and saves some space by not using BridgeHTTPClient library;
Unfortunately I have found a mayor roadblock, after being uploading data for a while to Zipato the YUN curl commands stopped working, after some research looks like there is a problem on the WIFI chip of the YUN which cannot be fixed by software and causes random issues like this one, I tried to apply all suggestions I could find without luck this is for sure on the YUN side, perhaps that is why the YUN is now an obsolete board replaced by TIAN. I will resume my tests with a UNO + Xbee wifi.
Update,
I also created a subroutine that makes requests synchronously to Zipato which also works, and saves some space by not using BridgeHTTPClient library;
Unfortunately I have found a mayor roadblock, after being uploading data for a while to Zipato the YUN curl commands stopped working, after some research looks like there is a problem on the WIFI chip of the YUN which cannot be fixed by software and causes random issues like this one, I tried to apply all suggestions I could find without luck this is for sure on the YUN side, perhaps that is why the YUN is now an obsolete board replaced by TIAN. I will resume my tests with a UNO + Xbee wifi.
Replies have been locked on this page!