[mh] Adding ability to send arbitrary commands to Tasmota
Giles Godart-Brown <[email protected]>
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
All
I've just created a pull request to extend Tasmota_HTTP::Item by adding
a run_cmnd subroutine to send arbitrary commands to a MIsterHouse
Tasmota item.
* It returns the JSON response from the Tasmota and sets
$self->{run_cmnd_response} and $self->{last_http_status}
* It URL encodes the command so user doesn't need to
* If no command sent it decodes the json and returns the state of the
device e.g.
o $device->run_cmnd() returns on or off
o $device->run_cmnd('status 10') returns a json string of the
sensor status
o $device->run_cmnd('restart 1') reboots the Tasmota
I hope people find this helpful
Giles
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users