judo API

John Ambeliotis edited this page Jun 13, 2017 · 12 revisions

With the API you can build your own IoT platform like Jubito [http://www.jubito.org]. You can experiment with all the sources provided in order to understand how things works. Download http://www.jubito.org/download.html and examine index.html and jubito.core.js which provides a UI that implements functionality. You can go deeper of course by examine the jaNET Framework source code.

1. Instruction Sets & Events

1.1 Add New Instruction Set

judo inset add [ID] <lock>[Action]</lock>
judo inset new [ID] <lock>[Action]</lock>
judo inset set [ID] <lock>[Action]</lock>
judo inset setup [ID] <lock>[Action]</lock>
judo inset add [ID] <lock>[Action]</lock> `[Category]` `[Header]` `[Short  Description]` `[Long Description]` `[Thumbnail Url]` `[Reference]`
judo inset new [ID] <lock>[Action]</lock> `[Category]` `[Header]` `[Short  Description]` `[Long Description]` `[Thumbnail Url]` `[Reference]`
judo inset set [ID] <lock>[Action]</lock> `[Category]` `[Header]` `[Short  Description]` `[Long Description]` `[Thumbnail Url]` `[Reference]`
judo inset setup  [ID] <lock>[Action]</lock> `[Category]` `[Header]` `[Short Description]` `[Long Description]` `[Thumbnail Url]` `[Reference]`

1.2 Remove Instruction Set

judo inset remove [ID]
judo inset delete [ID]
judo inset del [ID]
judo inset kill [ID]

1.3 List Items

judo inset list
judo inset ls

1.4 Add New Event Handler

judo event add [ID] <lock>[Action]</lock>
judo event new [ID] <lock>[Action]</lock>
judo event set [ID] <lock>[Action]</lock>
judo event setup [ID] <lock>[Action]</lock>

1.5 Remove Event Handler

judo event remove [ID]
judo event delete [ID]
judo event del [ID]
judo event kill [ID]

1.6 Delay Between Actions

judo sleep [timeout in ms]
judo timer [timeout in ms]

1.7 List Items

judo event list
judo event ls

2. Mail

2.1 Smtp Settings

judo smtp add [Host] [Username] [Password] [Port] [Ssl]
judo smtp setup [Host] [Username] [Password] [Port] [Ssl]
judo smtp set [Host] [Username] [Password] [Port] [Ssl]
judo smtp settings

2.2 Pop3 Settings

judo pop3 add [Host] [Username] [Password] [Port] [Ssl]
judo pop3 setup [Host] [Username] [Password] [Port] [Ssl]
judo pop3 set [Host] [Username] [Password] [Port] [Ssl]
judo pop3 settings

2.3 Gmail Settings

judo gmail add [Username] [Password]
judo gmail setup [Username] [Password]
judo gmail set [Username] [Password]
judo gmail settings

2.4 Mail Header Settings

judo mailheaders set `[From]` `[To]` `[Subject]`
judo mailheaders setup `[From]` `[To]` `[Subject]`
judo mailheaders settings

2.5 Send

judo mail send [From Address] [To Address] `[Subject]` `[Message]`

3. SMS

3.1 Settings

judo sms add [Api Id] [Username] [Password]
judo sms setup [Api Id] [Username] [Password]
judo sms set [Api Id] [Username] [Password]
judo sms settings

3.2 Send

judo sms send [Phone Number] `[Message]`

4. Scheduler

4.1 New Schedule

judo schedule add [Name] [{single day: e.g.Monday} {d/m/yyyy} {daily} {workdays} {weekend}] [hh:mm] [{Instruction Set} || {Verbal Notification}]
judo schedule new [Name] [{single day: e.g.Monday} {d/m/yyyy} {daily} {workdays} {weekend}] [hh:mm] [{Instruction Set} || {Verbal Notification}]
judo schedule set [Name] [{single day: e.g.Monday} {d/m/yyyy} {daily} {workdays} {weekend}] [hh:mm] [{Instruction Set} || {Verbal Notification}]
judo schedule setup [Name] [{single day: e.g.Monday} {d/m/yyyy} {daily} {workdays} {weekend}] [hh:mm] [{Instruction Set} || {Verbal Notification}]
judo schedule add [Name] [{repeat} {timer} {interval}] [Interval in ms] [{Instruction Set} || {Verbal Notification}]
judo schedule new [Name] [{repeat} {timer} {interval}] [Interval in ms] [{Instruction Set} || {Verbal Notification}]
judo schedule set [Name] [{repeat} {timer} {interval}] [Interval in ms] [{Instruction Set} || {Verbal Notification}]
judo schedule setup [Name] [{repeat} {timer} {interval}] [Interval in ms] [{Instruction Set} || {Verbal Notification}]

4.2 Remove Schedule

judo schedule remove [Name]
judo schedule delete [Name]
judo schedule del [Name]

4.3 Disable Schedule

judo schedule disable [Name]
judo schedule deactivate [Name]
judo schedule stop [Name]
judo schedule off [Name]

4.4 Enable Schedule

judo schedule enable [Name]
judo schedule activate [Name]
judo schedule start [Name]
judo schedule on [Name]

4.5 Remove All Schedules

judo schedule remove-all
judo schedule delete-all
judo schedule del-all
judo schedule cleanup
judo schedule clear
judo schedule empty

4.6 Disable All Schedules

judo schedule disable-all
judo schedule deactivate-all
judo schedule stop-all
judo schedule off-all

4.7 Enable All Schedules

judo schedule enable-all
judo schedule activate-all
judo schedule start-all
judo schedule on-all

4.8 Active List [ Names ]

judo schedule active
judo schedule actives
judo schedule active-list
judo schedule active-ls
judo schedule list-actives
judo schedule ls-actives

4.9 Inactive List [ Names ]

judo schedule inactive
judo schedule inactives
judo schedule inactive-list
judo schedule inactive-ls
judo schedule list-inactives
judo schedule ls-inactives

4.10 List All [ Names ]

judo schedule names
judo schedule name-list
judo schedule name-ls
judo schedule list-names
judo schedule ls-names

4.11 Active List [ with Details ]

judo schedule active-details
judo schedule actives-details
judo schedule active-list-details
judo schedule active-ls-details
judo schedule list-actives-details
judo schedule ls-actives-details

4.12 Inactive List [ with Details ]

judo schedule inactive-details
judo schedule inactives-details
judo schedule inactive-list-details
judo schedule inactive-ls-details
judo schedule list-inactives-details
judo schedule ls-inactives-details

4.13 List All [ with Details ]

judo schedule details [Name (optional)]
judo schedule list [Name (optional)]
judo schedule ls [Name (optional)]
judo schedule status [Name (optional)]
judo schedule state [Name (optional)]

5. Socket Communication

5.1 Start Service

judo socket start
judo socket enable
judo socket on
judo socket open
judo socket listen

5.2 Stop Service

judo socket stop
judo socket disable
judo socket off
judo socket close

5.3 Setup

judo socket set [Host] [Port]
judo socket setup [Host] [Port]

5.4 Trusted

judo socket trust <lock>[Guests (semicolon delimeted, e.g. localhost;; etc)]</lock>
judo trusted settings

5.5 Settings

judo socket settings

5.6 Status

judo socket status
judo socket state

6. Web Server

6.1 Start

judo server start
judo server enable
judo server on
judo server listen

6.2 Stop

judo server stop
judo server disable
judo server off

6.3 Change Login

judo server login [Username] [Password]
judo server cred [Username] [Password]
judo server credentials [Username] [Password]

6.4 Setup

judo server set [Host] [Port] [Authentication]
judo server setup [Host] [Port] [Authentication]

6.5 Settings

judo server settings

6.6 Status

judo server status
judo server state

7. Serial Port

7.1 Open

judo serial open [Port (optional)]

7.2 Close

judo serial close

7.3 Send Command

judo serial send [Command] [Timeout in ms (optional)]

7.4 Setup

judo serial set [Port] [Baud]
judo serial setup [Port] [Baud]

7.5 Settings

judo serial settings

7.6 Status

judo serial status
judo serial state

7.7 Listen/Monitor

judo serial listen [Timeout in ms (optional)]
judo serial monitor [Timeout in ms (optional)]

8. Web Services

8.1 Json Setup

judo json add [ID] <lock>[Endpoint]</lock> [Node]
judo json new [ID] <lock>[Endpoint]</lock> [Node]
judo json set [ID] <lock>[Endpoint]</lock> [Node]
judo json setup [ID] <lock>[Endpoint]</lock> [Node]

8.2 Json Response

judo json get <lock>[Endpoint]</lock> [Node]
judo json response <lock>[Endpoint]</lock> [Node]
judo json consume <lock>[Endpoint]</lock> [Node]
judo json extract <lock>[Endpoint]</lock> [Node]

8.3 Xml Setup [ Simple ]

judo xml add [ID] <lock>[Endpoint]</lock> [Node] [Attribute (optional)]
judo xml new [ID] <lock>[Endpoint]</lock> [Node] [Attribute (optional)]
judo xml set [ID] <lock>[Endpoint]</lock> [Node] [Attribute (optional)]
judo xml setup [ID] <lock>[Endpoint]</lock> [Node] [Attribute (optional)]

8.4 Xml Setup [ Namespace Prefix & Uri ]

judo xml add [ID] <lock>[Endpoint]</lock> [Ns+Uri] [Node] [Attribute (optional)]
judo xml new [ID] <lock>[Endpoint]</lock> [Ns+Uri] [Node] [Attribute (optional)]
judo xml set [ID] <lock>[Endpoint]</lock> [Ns+Uri] [Node] [Attribute (optional)]
judo xml setup [ID] <lock>[Endpoint]</lock> [Ns+Uri] [Node] [Attribute (optional)]

8.5 Xml Response [ Simple ]

judo xml get <lock>[Endpoint]</lock> [Node] [Attribute (optional)]
judo xml response <lock>[Endpoint]</lock> [Node] [Attribute (optional)]
judo xml consume <lock>[Endpoint]</lock> [Node] [Attribute (optional)]
judo xml extract <lock>[Endpoint]</lock> [Node] [Attribute (optional)]

8.6 Xml Response [ Namespace Prefix & Uri ]

judo xml get <lock>[Endpoint]</lock> [Ns+Uri] [Node] [Attribute (optional)]
judo xml response <lock>[Endpoint]</lock> [Ns+Uri] [Node] [Attribute (optional)]
judo xml consume <lock>[Endpoint]</lock> [Ns+Uri] [Node] [Attribute (optional)]
judo xml extract <lock>[Endpoint]</lock> [Ns+Uri] [Node] [Attribute (optional)]

9. Http

9.1 Get

judo http get [Request-URI]

10. Dynamic Dns (No-Ip)

10.1 Setup

judo noip add [Hostname] [Username] [Password]
judo noip new [Hostname] [Username] [Password]
judo noip set [Hostname] [Username] [Password]
judo noip setup [Hostname] [Username] [Password]

10.2 Settings

judo noip settings

10.3 Update

judo noip update [Hostname] [Username] [Password]

10.4 Update (load settings from file)

judo noip update

11. Weather

11.1 Setup

judo weather set <lock>[Endpoint]</lock>
judo weather setup <lock>[Endpoint]</lock>

11.2 Settings

judo weather settings

12. Ping

12.1 Default Timeout [ 1000ms ]

judo ping [Host]

12.2 Specific Timeout

judo ping [Host] [Timeout]

13. Help

13.1 Preview All

judo help
judo ?

13.2 Preview Specific Category

judo help [help keyword]
judo ? [help keyword]
  • Brackets are mandatory when place a sentence as one argument.
  • parser protected action Lock tags used to bypass parsing an action.
  • Help Keywords: inset, event, mail, sms, schedule, socket, server, serial, cloud, http, ddns, weather, ping, help.