App-Inventor

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
LucVolders
Posts: 11
Joined: Sunday 23 April 2017 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

App-Inventor

Post by LucVolders »

Hi there,

I am trying to make an Android app that can control certain functions in Domoticz.
However I am experiencing problems when I try to access Domoticz with a program
made in App-Inventor .

Anyone here having experience with app-inventor.

Oh, and by the way I do have the Domoticz app installed and that works flawlessly.
It is just that I am trying to devellop my own app.

Luc
MYLE
Posts: 20
Joined: Monday 10 April 2017 8:29
Target OS: Linux
Domoticz version:
Contact:

Re: App-Inventor

Post by MYLE »

how are you communicating to DOM
LucVolders
Posts: 11
Joined: Sunday 23 April 2017 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: App-Inventor

Post by LucVolders »

I am using the API calls described here:
https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's

I made a button and when clicked it should send the command to Domoticz.

Here is the block program:

[img]
domoticz.jpg
domoticz.jpg (25.98 KiB) Viewed 1694 times
[/img]

When I enter this command in a web-browser it works.
So the command is ok but the communiaction from within app-inventor is not.

Any ideas ???

Luc
theolsen
Posts: 46
Joined: Wednesday 31 July 2013 11:15
Target OS: -
Domoticz version:
Contact:

Re: App-Inventor

Post by theolsen »

Your port to Domoticz looks wrong - should it not be 8080?
LucVolders
Posts: 11
Joined: Sunday 23 April 2017 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: App-Inventor

Post by LucVolders »

theolsen, you are absolutely right that 8080 is the standard port

However in Domoticz in:

Code: Select all

/etc/init.d/domoticz.sh
you can alter the number of the port.

As I suspected that there could be an issue with App-Inventor and port 8080 I changed the port
number in Domoticz. Did not work. So I altered it back.

Luc
theolsen
Posts: 46
Joined: Wednesday 31 July 2013 11:15
Target OS: -
Domoticz version:
Contact:

Re: App-Inventor

Post by theolsen »

Ah fair play. Sorry I cannot be of more help.
User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

Re: App-Inventor

Post by bbqkees »

Maybe the problem is that the app-inventor works in the cloud and thus needs to use a publix/external Domoticz address and not the home lan network address?
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
LucVolders
Posts: 11
Joined: Sunday 23 April 2017 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: App-Inventor

Post by LucVolders »

Found it.

The code should be as in the blocks example shown here:

[img]
domoticz2.jpg
domoticz2.jpg (39.06 KiB) Viewed 1596 times
[/img]

The IP adress should not be the local IP adress but the adress used to access Domoticz over the internet.
Then as the blocks show you need to invoke your username and password however they need to be base 64 coded.

The above blocks code works flawlessly.
Now I can devellop my own app. And so can you.
App inventor is really fantastic to build in no time apps for Android.

Watch my weblog in the future for my project:

http://lucstechblog.blogspot.nl/

Luc Volders
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest