Re: [mh] Adding ability to send arbitrary commands to Tasmota
Jeff Siddall via misterhouse-users <[email protected]>
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
Nice work Giles! Having an easy way to interact with a Tasmota item in
whatever way the user wants is a significant enhancement.
Jeff
On 2021-02-02 6:17 a.m., Giles Godart-Brown wrote:
>
> 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
>
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users