jneilliii / OctoPrint-Tasmota

62 stars 16 forks source link

API support for status #181

Closed taker218 closed 2 years ago

taker218 commented 2 years ago

Hello,

I'm already using the plugin for quite some time now and just recently started to use OctoFarm to monitor all my printers in one place.

I set up OctoFarm so I can power on my printers from the webinterface, but it seems like I can't get the status of the tasmota plug so all I can do is power on the printer, but from there on the power status in OctoFarm is still off.

These are the settings I put in OctoFarm (Power Toggle doesn't work either, maybe this could also be implemented? Tasmota can be toggled with the command POWER%20TOGGLE)

If the API already supports those commands they should be added to the API wiki as well :)

grafik

jneilliii commented 2 years ago

You're right. Someone had actually contributed the status check API endpoint but the wiki docs were not updated. What you have listed in your screenshot should work. If it's not working on OctoFarm side than @NotExpectedYet may need to update his side of things.

jneilliii commented 2 years ago

I will look into adding the Toggle option for a future release.

taker218 commented 2 years ago

I tried the checkStatus manually via curl and it seems to return something, I'll open an issue on the octofarm github for that, maybe it's not parsed correctly

NotExpectedYet commented 2 years ago

@jneilliii I don't use toggle anymore it's set to be removed in the next version. For me no need personally.

The return should work fine if it returns a key with a value of true/false. I'll double check and see and amend OctoFarm if needs.

NotExpectedYet commented 2 years ago

Taker sent the response, didn't realise yours was on/off, will amend and sort no worries.

jneilliii commented 2 years ago

Thanks James. Technically since you're removing power toggle I don't see the benefit either from this side, so closing ticket.