[APP][Pro] JSON Handler and Manipulator

Say you are using the Read JSON card with 3 arguments.
Can you use only 2 of the arguments?
Can you use both argument-text1 and argument-number1, or only one of them?

Any way you wanna go.
Almost all arguments are optional, so you could, if you wish, always use the 3x10 argument card, also if you just start with one text.

The json is also optional: if non is supplied, a json object is created.

Also, properties that are non existing on existing Json’s, are created when filled. So, no need to pre-define the Json structure.


I hoping this app are what I need but I don’t know if it’s possible and I have a hard time to get started.

I’m using the Asus WRT app connected to my router and from that I get a trigger when some device connects to the router. From the trigger card there are four tags, name, nickname, IP and MAC.

What I like to do is to have a database that updates dynamic with connected devices. Is it possible with this app? Any tip to get me started?


I think you’ll need a little MySQL server and this app [APP][PRO] MySQL-Client

Would it be possible to have the tag names set dynamically?
When using the tags in a flow the name “Text1” is better than “result” but still making it cumbersum to remember which tag holds what value.


Well i see two possible options:

  • Create Global Tags on the fly.
    A flowcard would not have Set Text1 = [input], but more something like Set [name]=[input], where you could fill in the name and a Global Tag would be created.
  • A Virtual/Fake Device with customisable property names ( like AVD), which you could set through flowcards like the current JSON cards.

But both solutions have one very big weakness: Using the same tag at the same time is gonna create issues, because the scope of the Results are outside of the Flow.
This can/will cause “random” feeling errors.

This makes any solutions that i currently can see, not very usefull.

Ok, that doesn’t sound as any good solutions.

When i am done with AVD and The Flow Exchange(r) - Exchange Your Flows with Others! - Apps - Homey Community Forum i might take another look at the possibilities. But thats all i can promise.

1 Like

So the Homey code requires the tags from an action card must have static result tag(s)?!
This is why you have different sizes of JSON handler cards.
I hope this will be changed in upcomming Homey releases.

Indeed, and also the arguments are not dynamic, but fortunately, they can be optional nowadays.

I just created Loop cards, which will itterate through an Json Array or Collection:


In test now!

Maybe you could explain this a bit more? :wink:

Yeah, but i find it a bit hard to explain in a non-developer way.
I just updated a few flowcard-descriptions which are in test right now.

Essentially, i created a loop card, or for each

for (var (item,key,index) in Collection) {

It works pretty easy, you need two cards:

  • A When/Trigger Card, which will be triggered for each item in the collection, with these tokens:
    • Item as Text
    • Item as Number
    • Item as Yes/No
    • Key
    • Index
    • Text 1 (argument)
  • And a Then/Action Card, which you supply with an (json) collection (array or obj) and an optional argument.
    The When card will be execute for each item in the collection, with the supplied tokens.



The bottom card will execute the above (Trigger/When) card three times.

Here is another example:


Developer-way works fine for me at least. Am a SW developer myself, but only C, C++, Python and just starting with Java. :slight_smile:

I think I understand it, will do a test flow and try it out.

1 Like

Hi Arie!
In the Read-JSON card, isn’t all path’s optional?
In my flow I only check the path “Yes/No 1” but get an error for “Text 1” path.
In the first Read-card I get error “Invalid type for token ‘text1’ expected ‘string’ but got ‘undefined’”.


Hey @Anders_Gregow ,

Please also add the value of your ArduinoDisplayStates?

Yes, that should be yeah.

Okay, something is seriously wrong with one of the latest updates from Homey or the Web App.
Non-enterered arguments do not get cleared anymore, just become an empty string.
I have been getting errors because if this in multiple apps without updating any of them.

Awell, i did solve it on my end in the JSON Handler. Update to 1.2.4 (Test) and it should work.

It is in the comment card: {“ArmingWithDoorWindowOpen”:false,“MaindoorUnlocked”:false,“FreezerFridgeDoorOpen”:false,“PorchDoorOpen”:false,“ImportantMsg”:false,“NewMail”:false,“Test”:false}

Did you do a workaround for a Homey bug or has Athom changed some API?