Autor Thema: Domoticz  (Gelesen 4708 mal)

dennisdiving

  • Newbie
  • *
  • Beiträge: 10
  • Gerät: Tablet, samsung S4
  • Version: Andoid, raspberry, Domoticz
Domoticz
« am: 30.04.2015, 12:37:39 »
i am working on the Domoticz part. can not get it working right.

CODE: SELECT ALL
http://outside_ip_domoticz:8080/json.htm?type=command&param=switchlight&idx=245&switchcmd=Onit is true : when i push the test button the switch will work in your app and the light is going on.

but when i leave the zone the URL zone leave and enter is not sending the HTML to my switch light?
Ok i changed the RADIUS and my zone is working.

but the HTML parsing fails:
Error in the get of the server request
[ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - keuken: Error in get of the server request
java.io.FileNotFoundException: http://my_ip:1010/json.htm?type=command&param=switchlight&idx=664&switchcmd=Off
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
at de.egi.geofence.geozone.utils.Api.doGet(Api.java:97)
at de.egi.geofence.geozone.geofence.GeofenceReceiver$1.doInBackground(GeofenceReceiver.java:636)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
2015-04-30 15:08:29,419 -


what did i miss

thanx
Dennis
« Letzte Änderung: 30.04.2015, 15:18:44 von dennisdiving »

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 768
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Domoticz
« Antwort #1 am: 30.04.2015, 18:58:32 »
Hi and welcome to the forum!

Zitat
it is true : when i push the test button the switch will work in your app and the light is going on.
It depends what your command behind the server is doing. But yes, it should be, how you said.

Zitat
but the HTML parsing fails:
Error in the get of the server request
Code: [Auswählen]

[ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - keuken: Error in get of the server request
java.io.FileNotFoundException: http://my_ip:1010/json.htm?type=command&param=switchlight&idx=664&switchcmd=Off
I don´t know what it can be. I think something is misconfigured.
Did you try to put your call in the browser and test it like this?


Schöne Grüße
Egmont

dennisdiving

  • Newbie
  • *
  • Beiträge: 10
  • Gerät: Tablet, samsung S4
  • Version: Andoid, raspberry, Domoticz
Re: Domoticz
« Antwort #2 am: 30.04.2015, 19:04:13 »
yes i put the call directley in the browser and it is ok.
(i will try to reinstall the program and start over again)

let you know

ok i reinstalled the app:
the message changed to : error calling Tasker
Notinstalled: no Tasker App could be found on the device
(sorry this was my misstake "forhet to save the url")

After reinstall still the same message.
The wifi and bluetooth are responding to my Geo radius.

Hope you have a good holiday 8)
« Letzte Änderung: 30.04.2015, 20:05:23 von dennisdiving »

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 768
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Domoticz
« Antwort #3 am: 30.04.2015, 19:24:58 »
The problem is, that I am now on holidays and I am home again in 10 days. So before that I can not debug and look in the code.
Schöne Grüße
Egmont

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 768
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Domoticz
« Antwort #4 am: 30.04.2015, 22:14:41 »
I think it is a bug in combination with the call to a json.
I can try to fix it in about 10 days when i am again at home.
Can you test if then?
Schöne Grüße
Egmont

dennisdiving

  • Newbie
  • *
  • Beiträge: 10
  • Gerät: Tablet, samsung S4
  • Version: Andoid, raspberry, Domoticz
Re: Domoticz
« Antwort #5 am: 12.05.2015, 21:48:01 »
I hope you had a good holiday.
If you like we can call JSON.

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 768
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Domoticz
« Antwort #6 am: 13.05.2015, 05:50:27 »
Didn´t you get my PM yesterday with the link to a test version?
Schöne Grüße
Egmont

dennisdiving

  • Newbie
  • *
  • Beiträge: 10
  • Gerät: Tablet, samsung S4
  • Version: Andoid, raspberry, Domoticz
Re: Domoticz
« Antwort #7 am: 13.05.2015, 18:56:19 »
this is the new logfile from your last update.
i only changed my outside ip and port

[ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - thuis: Error in get of the server request
java.net.SocketTimeoutException: failed to connect to /123.456.789 (port 1234) after 30000ms: isConnected failed: ETIMEDOUT (Connection timed out)
at libcore.io.IoBridge.isConnected(IoBridge.java:236)
at libcore.io.IoBridge.connectErrno(IoBridge.java:171)
at libcore.io.IoBridge.connect(IoBridge.java:122)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
at java.net.Socket.connect(Socket.java:882)
at com.android.okhttp.internal.Platform.connectSocket(Platform.java:139)
at com.android.okhttp.Connection.connect(Connection.java:1194)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:392)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:295)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491)
at de.egi.geofence.geozone.utils.Api.doGet(Api.java:101)
at de.egi.geofence.geozone.geofence.GeofenceReceiver$1.doInBackground(GeofenceReceiver.java:684)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: isConnected failed: ETIMEDOUT (Connection timed out)
at libcore.io.IoBridge.isConnected(IoBridge.java:223)

when i take out the trailing http:// from the  "URL enter and leave zone"
the error is a little different.

[ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - home: Error in get of the server request
java.net.MalformedURLException: Protocol not found: 123.456.789:1234/json.htm?type=command&param=switchlight&idx=692&switchcmd=On
at java.net.URL.<init>(URL.java:176)
at java.net.URL.<init>(URL.java:125)
at de.egi.geofence.geozone.utils.Api.doGet(Api.java:73)
at de.egi.geofence.geozone.geofence.GeofenceReceiver$1.doInBackground(GeofenceReceiver.java:684)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
2015-05-13 20:27:05,449 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - home: NotInstalled: no Tasker App could be found on the device

« Letzte Änderung: 13.05.2015, 20:32:20 von dennisdiving »

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 768
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Domoticz
« Antwort #8 am: 13.05.2015, 21:11:00 »
The right syntax is something like:
http://123.456.789:1234/json.htm?type=command&param=switchlight&idx=692&switchcmd=On

Now it seems to be an other error like in the last version (java.io.FileNotFoundException)!

The second is because you didn´t write the protocol http in the front of the url.

The first error is a timeout. This is because the app can not connect to the server in 30 seconds. You may try to increase the timeout, but I don´t think it will help.
It could be a firewall on your router or server. I don´t know.


Schöne Grüße
Egmont

dennisdiving

  • Newbie
  • *
  • Beiträge: 10
  • Gerät: Tablet, samsung S4
  • Version: Andoid, raspberry, Domoticz
Re: Domoticz
« Antwort #9 am: 13.05.2015, 22:49:52 »
Hi Egmont,

i think we are getting there finally.
http:// is added
server time out increased to 45 seconds.

the error is no Tasker App could be found.

[ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - home1: NotInstalled: no Tasker App could be found on the device
2015-05-13 22:00:57,669 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - home1: NotInstalled: no Tasker App could be found on the device
2015-05-13 22:39:12,332 - [ERROR::de.egi.geofence.geozone.MainActivity::de.egi.geofence.geozone.MainActivity] - Geofences nach Reboot registriert
2015-05-13 22:40:04,211 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - Do not call events after reboot or at update
2015-05-13 22:40:04,231 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - Reboot: true
2015-05-13 22:40:04,231 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - Update: false
2015-05-13 22:41:56,126 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - home1: NotInstalled: no Tasker App could be found on the device
2015-05-13 22:43:34,287 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - home1: NotInstalled: no Tasker App could be found on the device



Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 768
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Domoticz
« Antwort #10 am: 14.05.2015, 08:36:01 »
Probably you setted a task name in the "More options" for the home1 zone without to have the "Tasker App" installed.
Leave te Tasker task fields emoty.
Schöne Grüße
Egmont

dennisdiving

  • Newbie
  • *
  • Beiträge: 10
  • Gerät: Tablet, samsung S4
  • Version: Andoid, raspberry, Domoticz
Re: Domoticz
« Antwort #11 am: 14.05.2015, 11:01:01 »
Hi Egmont,

It's working, nice work, i also changed back the server respond to standard.

What i wanted to do is make multiple radius.
100 mtr all the lights out, and turn on the alarmsystem if someone forget.
5000 mtr turn the heat down in sleep mode.

(off cours all the mobiles from my family needs to be added - no problem)

( my domoticz is ready for this, all the in/outputs works)
I will try myself, but is it possible to make multiple overlapping radius.

thank you very much.
And keep up the good work.
Dennis


Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 768
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Domoticz
« Antwort #12 am: 14.05.2015, 11:22:40 »
Hi Dennis,


It's working, nice work, i also changed back the server respond to standard.
Nice!

What i wanted to do is make multiple radius.
100 mtr all the lights out, and turn on the alarmsystem if someone forget.
5000 mtr turn the heat down in sleep mode.
It should work. Maybe the 100 mtr. are to low depending on diverse circumstances. You have to find out the best radius for you.

I will try myself, but is it possible to make multiple overlapping radius.
I don´t know, why it should not work!


thank you very much.
And keep up the good work.
Dennis

Thank you

PS: Maybe you can make a wiki in the Domoticz forum.
Schöne Grüße
Egmont

dennisdiving

  • Newbie
  • *
  • Beiträge: 10
  • Gerät: Tablet, samsung S4
  • Version: Andoid, raspberry, Domoticz
Re: Domoticz
« Antwort #13 am: 14.05.2015, 23:05:37 »
I find some strange things, could be a little bug.

I set up 2 zones: 200 mtr and 5000 mtr.
when i leave (to IKEA) :( both zones were not responding.

i reset my phone (i sit down on a sofa inside the IKEA) : and could not setup EgiGeoZone any more, the app did not respond.
Up until i get home and enter the app: leave the app;  and both zones were entered.
I did not do any changing inside the app:

tomorrow i will try again if both zones will work: i will let you know.
maybe the server timout needs to be more than 30 sec i will try this too.

2015-05-14 13:11:24,183 - [ERROR::de.egi.geofence.geozone.MainActivity::de.egi.geofence.geozone.MainActivity] - Geofences nach Reboot registriert
2015-05-14 13:15:03,071 - [ERROR::de.egi.geofence.geozone.MainActivity::de.egi.geofence.geozone.MainActivity] - Geofences nach Reboot registriert
2015-05-14 14:05:41,850 - [ERROR::de.egi.geofence.geozone.MainActivity::de.egi.geofence.geozone.MainActivity] - Geofences nach Reboot registriert
2015-05-14 17:36:59,692 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - Do not call events after reboot or at update
2015-05-14 17:36:59,724 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - Reboot: true
2015-05-14 17:36:59,725 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver] - Update: false
2015-05-14 18:12:35,805 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - zone dennis: Error in get of the server request
java.io.FileNotFoundException: http://some_ip/json.htm?type=command&param=switchlight&idx=739&switchcmd=On
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:197)
at de.egi.geofence.geozone.utils.Api.doGet(Api.java:102)
at de.egi.geofence.geozone.geofence.GeofenceReceiver$1.doInBackground(GeofenceReceiver.java:684)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
2015-05-14 18:14:02,376 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - zone dennis: Error in get of the server request
java.io.FileNotFoundException: http://some_ip/json.htm?type=command&param=switchlight&idx=739&switchcmd=On
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:197)
at de.egi.geofence.geozone.utils.Api.doGet(Api.java:102)
at de.egi.geofence.geozone.geofence.GeofenceReceiver$1.doInBackground(GeofenceReceiver.java:684)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

2015-05-14 21:55:49,342 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - zone 1: Error in get of the server request
java.io.FileNotFoundException: http://ip_something:port/json.htm?type=command&param=switchlight&idx=739&switchcmd=On
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:197)
at de.egi.geofence.geozone.utils.Api.doGet(Api.java:102)
at de.egi.geofence.geozone.geofence.GeofenceReceiver$1.doInBackground(GeofenceReceiver.java:684)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
2015-05-14 22:05:23,391 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - Response code after get: 0
2015-05-14 22:07:54,289 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - Response code after get: 0
2015-05-14 22:46:01,359 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - Response code after get: 0
2015-05-14 22:46:18,312 - [ERROR::de.egi.geofence.geozone.geofence.GeofenceReceiver::de.egi.geofence.geozone.geofence.GeofenceReceiver$1] - Response code after get: 0

« Letzte Änderung: 14.05.2015, 23:07:37 von dennisdiving »

Admin

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 768
    • EgiGeoZone
  • Gerät: Xiaomi Redmi Note 5, Samsung Galaxy Note 2, S4, S5, S2, S7
  • Version: MIUI 10.0 Global, Android 4.4, 5, 6, 7, 8, 8.1, 12, 13
Re: Domoticz
« Antwort #14 am: 15.05.2015, 08:27:43 »
i reset my phone (i sit down on a sofa inside the IKEA) : and could not setup EgiGeoZone any more, the app did not respond.

This can be a bug in this prerelease version 1.6.1
When I am at home, I will fix the JSON-Call in the version from the Google Play Store and let you know to download it. Maybe I introduces the bug with the location tracking future. This future is the difference between the app in the store and the 1.6.1 you use. And the modifications are heavy.
I am thinking to not release the live tracking yet.

Zitat
I set up 2 zones: 200 mtr and 5000 mtr.
when i leave (to IKEA) :( both zones were not responding.
Check following things:

- is the server switch in the upper right corner of the server options on?
- is your GPS on the device on?
- do you have a task killer installed, that maybe kills the app?

Zitat
Up until i get home and enter the app: leave the app;  and both zones were entered.
Didn´t understand all.
How did you realised, that you entered the zones?


Schöne Grüße
Egmont