jneilliii / OctoPrint-TasmotaMQTT

18 stars 16 forks source link

Not getting power state on relay 1 of multichannel sonoff #60

Closed beardedfool closed 3 years ago

beardedfool commented 3 years ago

Weird one for you and I'll do some more debugging tomorrow but on the same device

Changing nothing else but setting it to one and the icon spins red, it will still send on commands but isn't recieveing the result, despite that definitely happening in the console: 18:20:02.251 MQT: stat/tvarea/RESULT = {"POWER1":"OFF"} 18:20:02.255 MQT: stat/tvarea/POWER1 = OFF

debug log showing sending [2021-07-06 18:19:53,366] DEBUG: turning on tvarea relay 1

Any thoughts please?

Would it be a major pain to be able to set it to read json for the state e.g. tele/tvarea/STATE

As then it would know what state it was in always and you can set that with teleperiod in tasmota to be more regular.

jneilliii commented 3 years ago

that's unexpected. I wonder if it's not subscribed to the topic properly after adding the relay 1. Did you try restarting OctoPrint yet? I know those subscriptions are handled on startup, and thought they would startup on save, but something could have happened during the process. No other log lines after that [2021-07-06 18:19:53,366] DEBUG: turning on tvarea relay 1? If you share the whole log here it might help in debugging further.

beardedfool commented 3 years ago

Glad it's not obvious on a weird way.

For debugging, any log levels to set anywhere or just that on/off tickbox? Apologies just out but I'll read more into that.

I've another multichannel device I can test it on tomorrow to rule some things out but they should largely have the same options set. I'll try the other relays as well.

I wasn't restarting octoprint but that's potentially more interesting as it didn't require the restart to work and I could switch it back and forth from 1 (not recieving status) to 4 (working ok) several times suggesting that the subscribing isn't the issue here (?].

Wondering is there's something in the code specifically around relay 1 (?) but, as I'm guessing I'm the first with this problem, it's potentially a tasmota option somewhere.

Cheers for coming back so quickly.

On Tue, 6 Jul 2021, 18:42 jneilliii, @.***> wrote:

that's unexpected. I wonder if it's not subscribed to the topic properly after adding the relay 1. Did you try restarting OctoPrint yet? I know those subscriptions are handled on startup, and thought they would startup on save, but something could have happened during the process. No other log lines after that [2021-07-06 18:19:53,366] DEBUG: turning on tvarea relay 1? If you share the whole log here it might help in debugging further.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jneilliii/OctoPrint-TasmotaMQTT/issues/60#issuecomment-874956806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6Q4FDF47NPCH2JFMPJ2Z3TWM577ANCNFSM475ABUGA .

jneilliii commented 3 years ago

Yeah, just that checkbox is all that's necessary. With that option enabled it should provide enough debugging in the file to see what's going on I hope.

beardedfool commented 3 years ago

Hey, reckon you can close this one with 'user is an idiot' ;)

I can see what you mean about the restart, I do get the stat/name/POWER1 subscription on octoprint startup and then it works ok. Didn't think I'd restarted it but possibly after another plugin install

It basically holds onto that subscription so that it will fail if you change the relay without restarting octoprint but will work again if you change it back without restarting.

Perhaps not ideal can't see it's worth much effort on your part for how often changing relays will come up. If anything, maybe just a note on the settings page to that effect (?)

Thanks for being so responsive and for making this!

On Tue, 6 Jul 2021 at 19:29, jneilliii @.***> wrote:

Yeah, just that checkbox is all that's necessary. With that option enabled it should provide enough debugging in the file to see what's going on I hope.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jneilliii/OctoPrint-TasmotaMQTT/issues/60#issuecomment-874988022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6Q4FFPCZURQVY3EOUNINTTWNDR7ANCNFSM475ABUGA .