So has anyone ever tried creating a simple app that sends a json command to control domoticz on a buttonpress? I've been looking all over the internet for something that just does the same as 'curl' does in shell/bash, but it doesn't seem to exist.
I'm pretty new to Android developing, so I don't need anything fancy by a long stretch, I simply need a proof of concept. Something that just has a button which I can click, which sends out a json command, like setting the brightness of a lamp.
If anyone can help me, or point me in the right direction, that would be truly awesome. I've asked the same question on some other forums, but the general response is "You're stupid, just look it up", but I haven't got a clue what to look for.
Anyone ever tried sending a simple json command from an app?
Moderator: leecollings
Re: Anyone ever tried sending a simple json command from an
Take a look at domoticz-android source code. I believe it uses JSON. https://github.com/domoticz/domoticz-android
-
- Posts: 64
- Joined: Saturday 26 December 2015 0:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Anyone ever tried sending a simple json command from an
Thank you. I will go through that, but I can barely make out what everything does, so it'll be hard for me to find out what everything actually does.
So if anyone has more tips / examples on a simple way to send the JSON command, that would be great.
So if anyone has more tips / examples on a simple way to send the JSON command, that would be great.
-
- Posts: 110
- Joined: Friday 20 September 2013 18:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Finland
- Contact:
Re: Anyone ever tried sending a simple json command from an
Don't know thing about Android programming, but how about this?
http://www.mkyong.com/android/android-button-example/
Or this?
http://hmkcode.com/android-send-json-data-to-server/
So google is your friend...
http://www.mkyong.com/android/android-button-example/
Or this?
http://hmkcode.com/android-send-json-data-to-server/
So google is your friend...
-
- Posts: 64
- Joined: Saturday 26 December 2015 0:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Anyone ever tried sending a simple json command from an
Well, like I said, I don't really know what I'm looking for. I've actually seen that first post so often, but never realised it could be of any use (I've literally seen hundreds of pages in my search, so I've overlooked some stuff probably.
I'll have a look into it tomorrow, thanks.
I'll have a look into it tomorrow, thanks.
- nayr
- Posts: 354
- Joined: Tuesday 11 November 2014 18:42
- Target OS: Linux
- Domoticz version: github
- Location: Denver, CO - USA
- Contact:
Re: Anyone ever tried sending a simple json command from an
check out at the android remote in my sig.. would be a piece of cake to modify it for a mobile android.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
-
- Posts: 64
- Joined: Saturday 26 December 2015 0:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Anyone ever tried sending a simple json command from an
Holy S, it actually worked! Thanks a ton, that was exactly the example I needed!nayr wrote:check out at the android remote in my sig.. would be a piece of cake to modify it for a mobile android.
Who is online
Users browsing this forum: No registered users and 1 guest