I've done a script in Python to access to ZipaBox API, the login is successful when done thru the Cloud, but the same script trying to login directly to Local ZipaBox doesn't work ...
Is there someone who succeed talking to ZipaBox locally ?
Hi zipateam !
I discovered the link to API in the dashboard . . . and tested some requests . . .
It's seems working when requesting to the cloud (my.zipato.com) but not working in local . . . "Not Authenticated" message appeared.
I try to use http://localip:8080/zipato-web/rest/user/login?username=XXX&token=XXXX but the API seems not implemented totaly ?
Could you make me on the right way ?
Thanks . . .
There will be firmware update which will fully support our API in local mode. You will be informed about that.
For now you shouldn't use it in local mode.
There will be firmware update which will fully support our API in local mode. You will be informed about that.
For now you shouldn't use it in local mode.
You need to add "&method=SHA1" at the end of your URL ;)
You need to add "&method=SHA1" at the end of your URL ;)
Thanks for this answer.
Your answer don't help me . . . but . . . i successed with cloud url.
I get the nonce string to make the good token using SHA1 (with php)
Despite, i could not do the same directly to the zipabox in local mode.
/zipato-web/rest/user/init ou ../login return :
404 Not Found
No context found for request
When i tryed /zipato-web/rest/rooms/ it's return a "Not Authenticated" . . .
???
Thanks for this answer.
Your answer don't help me . . . but . . . i successed with cloud url.
I get the nonce string to make the good token using SHA1 (with php)
Despite, i could not do the same directly to the zipabox in local mode.
/zipato-web/rest/user/init ou ../login return :
404 Not Found
No context found for request
When i tryed /zipato-web/rest/rooms/ it's return a "Not Authenticated" . . .
???
HI,
Same for me, i successed to login with cloud url by gerating the right token but not at all in local mode : error 404.
HI,
Same for me, i successed to login with cloud url by gerating the right token but not at all in local mode : error 404.
Hello,
try with the code I already posted here. http://community.zipato.com/responses/add-charts-to-meters It works like a charm since 1-2 months
Hello,
try with the code I already posted here. http://community.zipato.com/responses/add-charts-to-meters It works like a charm since 1-2 months
There will be firmware update which will fully support our API in local mode. You will be informed about that.
For now you shouldn't use it in local mode.
There will be firmware update which will fully support our API in local mode. You will be informed about that.
For now you shouldn't use it in local mode.
Nenad,
So i will make my test with could API for the moment . . . .
Thanks for this inormation . . .
Nenad,
So i will make my test with could API for the moment . . . .
Thanks for this inormation . . .
Any update about that? Im insterested in local mode
Any update about that? Im insterested in local mode
I tried to use the local API with the new firmware but it doesn't work...
When do you plan it ?
I tried to use the local API with the new firmware but it doesn't work...
When do you plan it ?
I get it work.
I just changed a bit my code but it is very similar :
First step is the same to get id etc etc. The second step is:
Hope it helps. Basically instead of sending data in the post I pass it in the URL.
I get it work.
I just changed a bit my code but it is very similar :
First step is the same to get id etc etc. The second step is:
Hope it helps. Basically instead of sending data in the post I pass it in the URL.
actually it works partially. It seems some API are not yet fully functionnal
actually it works partially. It seems some API are not yet fully functionnal
see https://community.zipato.com/responses/local-mode-api-
see https://community.zipato.com/responses/local-mode-api-
Hi Thijs,
I've already read this thread ...
According to discussion with Tech Support, there was an issue that has been fixed for next firmware.
Thanks,
Hi Thijs,
I've already read this thread ...
According to discussion with Tech Support, there was an issue that has been fixed for next firmware.
Thanks,
any news?
any news?
any updates, its now 1 year further
any updates, its now 1 year further
In fact, it does not work yet on ZipaMini ...
In fact, it does not work yet on ZipaMini ...
Any update?
Any update?
Will local mode available in v1.0?
Will local mode available in v1.0?
Is there any progress for having the API locally? just stopped an ordr for the boxes and modules after discovered there is no local interface.
Is there any progress for having the API locally? just stopped an ordr for the boxes and modules after discovered there is no local interface.
there is a local login mode, and the Zipabox itself can run locally only if needed, it will run rules and scenes and lighting controls, but rules that use external servers such as weather stations will obviously not work. But to edit rules, add devices and a ton of other usefull features like push notifications, etc you will need to be connected to the internet. You can also access the api if you want to here https://my.zipato.com/zipato-web/api/
there is a local login mode, and the Zipabox itself can run locally only if needed, it will run rules and scenes and lighting controls, but rules that use external servers such as weather stations will obviously not work. But to edit rules, add devices and a ton of other usefull features like push notifications, etc you will need to be connected to the internet. You can also access the api if you want to here https://my.zipato.com/zipato-web/api/
Has the local API been implemented yet? I tried using http://[local IP]:8080/zipato-web/v2/user/login and got a failed logon, but the same code works on the my.zipato.com site.
Has the local API been implemented yet? I tried using http://[local IP]:8080/zipato-web/v2/user/login and got a failed logon, but the same code works on the my.zipato.com site.
Same here... can't login to local URL, always got an 404.
I´d really like to use the non-universal iPhone-App on my iPad but in offline/local mode only, but i don't know in what i´ve to change the Server URL in the settings!?
furthermore every help i found was´t answered yet, so please can someone help?
Same here... can't login to local URL, always got an 404.
I´d really like to use the non-universal iPhone-App on my iPad but in offline/local mode only, but i don't know in what i´ve to change the Server URL in the settings!?
furthermore every help i found was´t answered yet, so please can someone help?
Hey guys. I made a .NET SDK around the Zipato API and now it works with the Remote and Local API. The Local API is listening on http://<ip>:8080/v2 . The API methods are the same. However, I noticed that the JSON results might differ. The Local API returns less data. The JSON structure is the same, but some elements are missing.
Note that the remote api uses HTTPS while the local one uses HTTP on port 8080.
My .NET SDK is hosted on https://github.com/leonmeijer/Zipato.NET
Hey guys. I made a .NET SDK around the Zipato API and now it works with the Remote and Local API. The Local API is listening on http://<ip>:8080/v2 . The API methods are the same. However, I noticed that the JSON results might differ. The Local API returns less data. The JSON structure is the same, but some elements are missing.
Note that the remote api uses HTTPS while the local one uses HTTP on port 8080.
My .NET SDK is hosted on https://github.com/leonmeijer/Zipato.NET
If Node.js is your bag of chips, there is a NPM module available too:
https://github.com/djoulz22/zipabox
It's not my project, but definitely worth to mention in this thread :)
If Node.js is your bag of chips, there is a NPM module available too:
https://github.com/djoulz22/zipabox
It's not my project, but definitely worth to mention in this thread :)
Does it handle the session the same? I don't seem to get back the jsessionid and the nonce the same way in the JSON when I init/logon through the Local API.
Does it handle the session the same? I don't seem to get back the jsessionid and the nonce the same way in the JSON when I init/logon through the Local API.
Yes the session initialization is the same between local and remote on the http://ip:8080/v2 endpoint. Remember to use HTTP without S.
Yes the session initialization is the same between local and remote on the http://ip:8080/v2 endpoint. Remember to use HTTP without S.
Thanks for the affirmation. I dug deeper and found that the status code on an attribute put is a 200 using the local api and a 202 using the web api. That was throwing my code off.
Thanks for the affirmation. I dug deeper and found that the status code on an attribute put is a 200 using the local api and a 202 using the web api. That was throwing my code off.
I used to connect to zipato remotely with php code, it works perfectly, but with local connection (http://ip:8080/v2) I get invalid username or password. The code is the same, only url differ...
help...
I used to connect to zipato remotely with php code, it works perfectly, but with local connection (http://ip:8080/v2) I get invalid username or password. The code is the same, only url differ...
help...
here is the test code :
$url= "http://192.168.1.24:8080/v2";
$user = "my user";
$passw = "my passw";
$json = json_decode(file_get_contents($url."/user/init"));
$jid= $json->{'jsessionid'};
$nonce = $json->{'nonce'};
$token = sha1($nonce.sha1($passw));
print_r($json)."\n";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url."/user/login?username=".$user."&token=".$token);
curl_setopt($ch, CURLOPT_COOKIE, 'JSESSIONID='.$jid);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
print_r($output)."\n";
With remote access (https://my.zipato.com:443....") I manage to connect with result :
"success" : true,
"jsessionid" : "FBA2F9533539038A39836FFA08CA4290-n1.frontend2",
but the same code with local addresse, give :
"error" : "No such username or bad password",
"jsessionid" : "ltD7KvzmimxyZBljkPpZAm2dSryLwfP9",
"nonce" : "K6YZ6eArnKArAp19xyxZL4wveE6mza4n",
"success" : false
the jsessionid is different. may be the init failed ?
here is the test code :
$url= "http://192.168.1.24:8080/v2";
$user = "my user";
$passw = "my passw";
$json = json_decode(file_get_contents($url."/user/init"));
$jid= $json->{'jsessionid'};
$nonce = $json->{'nonce'};
$token = sha1($nonce.sha1($passw));
print_r($json)."\n";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url."/user/login?username=".$user."&token=".$token);
curl_setopt($ch, CURLOPT_COOKIE, 'JSESSIONID='.$jid);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
print_r($output)."\n";
With remote access (https://my.zipato.com:443....") I manage to connect with result :
"success" : true,
"jsessionid" : "FBA2F9533539038A39836FFA08CA4290-n1.frontend2",
but the same code with local addresse, give :
"error" : "No such username or bad password",
"jsessionid" : "ltD7KvzmimxyZBljkPpZAm2dSryLwfP9",
"nonce" : "K6YZ6eArnKArAp19xyxZL4wveE6mza4n",
"success" : false
the jsessionid is different. may be the init failed ?
use: http://ip:8080/zipato-web/v2/user/init
as url
Which gives you nonce. Keep the jsession id and nonce in cookie and proceed with further proceedings.
use: http://ip:8080/zipato-web/v2/user/init
as url
Which gives you nonce. Keep the jsession id and nonce in cookie and proceed with further proceedings.
Not better with this url, I got the same error.
nonce is not needed in cookie, and if you place it in cookie, it doesn't work with classic https:443 url neither
Not better with this url, I got the same error.
nonce is not needed in cookie, and if you place it in cookie, it doesn't work with classic https:443 url neither
In my case, this URL works :
http://myzipaboxip:8080/zipato-web/rest/user/init
In my case, this URL works :
http://myzipaboxip:8080/zipato-web/rest/user/init
I get the nonce an jsessionid with /user/init, that part works, but the /user/login doesn't. I can't figure out why.
user/init :
(
[jsessionid] => vwwxVSVLzz9Qwqmg1kq9IgBy1Zo3iX17
[nonce] => snOZ1lNtwNJlidJciGrzMXOvehgdYugi
[success] => 1
)
login :
{
"error" : "No such username or bad password",
"jsessionid" : "vwwxVSVLzz9Qwqmg1kq9IgBy1Zo3iX17",
"success" : false
}
httpCode : 200
I get the nonce an jsessionid with /user/init, that part works, but the /user/login doesn't. I can't figure out why.
user/init :
(
[jsessionid] => vwwxVSVLzz9Qwqmg1kq9IgBy1Zo3iX17
[nonce] => snOZ1lNtwNJlidJciGrzMXOvehgdYugi
[success] => 1
)
login :
{
"error" : "No such username or bad password",
"jsessionid" : "vwwxVSVLzz9Qwqmg1kq9IgBy1Zo3iX17",
"success" : false
}
httpCode : 200
Is there a way to test local connection directly without coding ?
Is there a way to test local connection directly without coding ?
What is the firmware version of Zipabox.
We have developed a whole mobile app. using the zipato local API.
What is the firmware version of Zipabox.
We have developed a whole mobile app. using the zipato local API.
The firmware is 1.0.21 (latest official I think).
It's very starnge, works prefectly remotely, but no connection localy, whatever url I use.
The firmware is 1.0.21 (latest official I think).
It's very starnge, works prefectly remotely, but no connection localy, whatever url I use.
BTW, don't forget that URL needs to be encoded, so username account with @ should be translated to %40
BTW, don't forget that URL needs to be encoded, so username account with @ should be translated to %40
Thought about it already, it changes nothing
Thought about it already, it changes nothing
have you emailed support and asked them? surely they could help. The more apps out there the better, it shows that Zipato is a widely supported and developing system.
have you emailed support and asked them? surely they could help. The more apps out there the better, it shows that Zipato is a widely supported and developing system.
I just opened a ticket with my issue. Just have to wait now... if I get an answer
I just opened a ticket with my issue. Just have to wait now... if I get an answer
Here the answer from support :
"I'm sorry but we cannot help you with this issue.
Local connection is currently not available for users."
closed...
Here the answer from support :
"I'm sorry but we cannot help you with this issue.
Local connection is currently not available for users."
closed...
That is strange, especially that I'm using it since more than a year.
That is strange, especially that I'm using it since more than a year.
i think what they mean is that local api is not available, not local connection.
i think what they mean is that local api is not available, not local connection.
Nope !
I'm using LocalAPI with local connection since more than a year ...
Nope !
I'm using LocalAPI with local connection since more than a year ...
It works for me.
1. run init: http://yourip:8080/zipato-web/v2/user/init
2. Parse JSESSIONID and nonce
3. Create token. SHA-1
4. Do a login with http://yourip:8080/zipato-web/v2/user/login?username=yourusername&token=yourtoken
Don't forget to set JSESSIONID in the header. setHeader("Cookie", "JSSESIONID=xxxx")
5. Set the JSESSIONID in the header for each call to the zipabox.
Is the token created correctly?
I do this in Java:
combined = nonce + hashToken (I think its my password hashed)
token = Hex.encodeHexString(sha1.digest(combined))
It works for me.
1. run init: http://yourip:8080/zipato-web/v2/user/init
2. Parse JSESSIONID and nonce
3. Create token. SHA-1
4. Do a login with http://yourip:8080/zipato-web/v2/user/login?username=yourusername&token=yourtoken
Don't forget to set JSESSIONID in the header. setHeader("Cookie", "JSSESIONID=xxxx")
5. Set the JSESSIONID in the header for each call to the zipabox.
Is the token created correctly?
I do this in Java:
combined = nonce + hashToken (I think its my password hashed)
token = Hex.encodeHexString(sha1.digest(combined))
I do the same but in php.
but I think the init goes wrong, because JSESSIONID do not look the same at all.
on local I have json like :
{
[jsessionid] => wCIE81PR0cJ9MhjzF2EgtXXcKk9ABR3d
[nonce] => SHlRmAwQj0pKaMUropvW6qJeOoIa0MUf
[success] => 1
}
and remotely :
{
[success] => 1
[jsessionid] => 0979C178CE1915A95CDCC4E994481A6A-n1.frontend5
[nonce] => MkhmEdoPlZdkkDzG
}
and firmware is 1.0.21
I do the same but in php.
but I think the init goes wrong, because JSESSIONID do not look the same at all.
on local I have json like :
{
[jsessionid] => wCIE81PR0cJ9MhjzF2EgtXXcKk9ABR3d
[nonce] => SHlRmAwQj0pKaMUropvW6qJeOoIa0MUf
[success] => 1
}
and remotely :
{
[success] => 1
[jsessionid] => 0979C178CE1915A95CDCC4E994481A6A-n1.frontend5
[nonce] => MkhmEdoPlZdkkDzG
}
and firmware is 1.0.21
@sguyomard: Did you manage to resolve this issue?
From your descriptions in this thread I believe I have the same issue, and would be happy to see if you have found out anything more on this.
@sguyomard: Did you manage to resolve this issue?
From your descriptions in this thread I believe I have the same issue, and would be happy to see if you have found out anything more on this.
found a working solution :
connect to thombox/zipabox locally
==================================
first issue init request (GET)
================
http://<local_ip>:8080/zipato-web/json/init
in response you get :
{
"jsessionid": "xDLY2.....",
"nonce": "LVag......v",
"success": true
}
second issue login request (GET)
==========================
format token using test.js :
code with node.js
_______________________________________________
var crypto = require('crypto');
var password = 'your password';
var nonce = 'nonce received at init';
function sha1( data ) {
var generator = crypto.createHash('sha1');
generator.update( data )
return generator.digest('hex')
}
var token = nonce + sha1(password);
console.log( sha1(token) );
_______________________________________________
token = sha1 (nounce + sha1(password));
in header add :
Content-Type:application/json
Cookie:"jsessionid=xDLY2....."
http://<local_ip>:8080/zipato-web/v2/user/login?username=name%40domain&token=<token>
don't forget to URLencode '@' in user name if it's email address (%40)
you should get answer :
{
"success": true
}
then you're connected, and can issue requests to the box
========================================================
keep in request header :
Content-Type:application/json
Cookie:"jsessionid=xDLY2....."
http://<local_ip>:8080/zipato-web/v2/box/
(GET)
answer :
{
"serial": "....",
"name": "Demo",
"remoteIp": "X.X.X.X",
"localIp": "<local_ip>",
"timezone": "CET",
"gmtOffset": 7200000,
.....
}
found a working solution :
connect to thombox/zipabox locally
==================================
first issue init request (GET)
================
http://<local_ip>:8080/zipato-web/json/init
in response you get :
{
"jsessionid": "xDLY2.....",
"nonce": "LVag......v",
"success": true
}
second issue login request (GET)
==========================
format token using test.js :
code with node.js
_______________________________________________
var crypto = require('crypto');
var password = 'your password';
var nonce = 'nonce received at init';
function sha1( data ) {
var generator = crypto.createHash('sha1');
generator.update( data )
return generator.digest('hex')
}
var token = nonce + sha1(password);
console.log( sha1(token) );
_______________________________________________
token = sha1 (nounce + sha1(password));
in header add :
Content-Type:application/json
Cookie:"jsessionid=xDLY2....."
http://<local_ip>:8080/zipato-web/v2/user/login?username=name%40domain&token=<token>
don't forget to URLencode '@' in user name if it's email address (%40)
you should get answer :
{
"success": true
}
then you're connected, and can issue requests to the box
========================================================
keep in request header :
Content-Type:application/json
Cookie:"jsessionid=xDLY2....."
http://<local_ip>:8080/zipato-web/v2/box/
(GET)
answer :
{
"serial": "....",
"name": "Demo",
"remoteIp": "X.X.X.X",
"localIp": "<local_ip>",
"timezone": "CET",
"gmtOffset": 7200000,
.....
}
Replies have been locked on this page!