Skip to content

IntelliHome::RPC::Service::DB

mudler edited this page Aug 22, 2014 · 2 revisions

NAME

IntelliHome::RPC::Service::DB - IntelliHome "db" service for RPC server

DESCRIPTION

This object represent the "db" service for the RPC server, it is available under rpcserver_ip:port/db

METHODS

IntelliHome::RPC::Service::DB inherits all methods from IntelliHome::RPC::Service::Base and implement the following new:

  • rpc_add_node({ name => "NODENAME", port=>"NODEPORT"}, {id=>$room->id })

    Add the node to the db (the id is for roomid)

  • rpc_add_room({name => "test", location => "bedroom first floor" })

    Add the room to the db

  • rpc_add_gpio({'pin_id' => '22','type' => '1','driver' => 'IntelliHome::Driver::GPIO::Mono'},{ id => $node->id })

    Add the gpio to the db (the id is for nodeid)

  • rpc_add_tag({ tag => "test" }, { id => $gpio->id })

    Add the tag to the db (the id is for gpioid)

  • rpc_add_pin({ pin => 44, type => 4, value => 0 }, { id => $gpio->id })

    Add the pin to the db (the id is for gpioid)

  • rpc_delete("Node", 42)

    delete the Node resultset with the given id from the db

ATTRIBUTES

IntelliHome::RPC::Service::DB inherits all attributes from IntelliHome::RPC::Service::Base

SEE ALSO

IntelliHome, IntelliHome::Workers::Master::RPC , MojoX::JSON::RPC::Service

Clone this wiki locally