Skip to content

A ModBus-JSON server. receives and sends instructions in JSON through a local TCP server. Compatible with NodeRED and other without libraries

License

Notifications You must be signed in to change notification settings

mrcamilletti/modbus-json-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModBus RTU wrapper for JSON over TCP

Read structures

Using addr and quantity:

consulta = {
    id: <unit_id> | [<unit_ids>],
    read: 'coil' | 'discrete' | 'input' | 'holding'
    addr: <start_address>
    quantity: <quantity>
}

Using from and to:

consulta = {
    id: <unit_id> | [<unit_ids>],
    read: 'coil' | 'discrete' | 'input' | 'holding'
    from: <from_address>
    to: <to_address>
}

Write structure

consulta = {
    id: <unit_id> | [<unit_ids>],
    write: 'coil' | 'holding'
    value: <value> | [<values>]
    addr: <start_address>
}
Response structure
---------------
consulta = {
    id: <unit_id>,
    ... 
    result: {
        data: [<array_data>],
        buffer: <buffered_data>
    }
}

About

A ModBus-JSON server. receives and sends instructions in JSON through a local TCP server. Compatible with NodeRED and other without libraries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published