ziirish / OctoPrint-TuyaSmartplug

Tuya Smartplug plugin for OctoPrint
Other
19 stars 15 forks source link

Set everything right but not working #62

Open Carlsans opened 5 months ago

Carlsans commented 5 months ago

I'm getting this bug : Status unknown for 192.168.2.179. Double check IP Address\Device ID\Local Key in Octoprint-TuyaSmartplug Settings Everything is set right I'm 100 % sure. Followed the guide and everything. Have two plugs and failed on both. Have to pi and failed on both. The plugs work fine using the app.

Carlsans commented 5 months ago

Part of the log with id and localkey deleted.

[2024-02-08 12:08:31,103] DEBUG: Turning on Ender. [2024-02-08 12:08:31,103] DEBUG: Sending command: info to Ender [2024-02-08 12:08:31,319] DEBUG: Something went wrong while running the command ord() expected a character, but string of length 0 found [2024-02-08 12:08:31,323] DEBUG: {'autoConnect': True, 'autoConnectDelay': 10, 'autoDisconnect': True, 'autoDisconnectDelay': 0, 'btnColor': '#808080', 'countdownOffDelay': 0, 'countdownOnDelay': 0, 'currentState': 'off', 'displayWarning': True, 'gcodeEnabled': False, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'icon': 'icon-bolt', 'id': 'dfxfxfdfdsfsdfsdf', 'ip': '192.168.2.178', 'label': 'Ender', 'localKey':ddsffsdfsdfsdfsdffsd, 'slot': 1, 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'useCountdownRules': False, 'v33': True, 'warnPrinting': False} [2024-02-08 12:08:31,323] DEBUG: Sending command: on to Ender [2024-02-08 12:08:32,341] DEBUG: Something went wrong while running the command ord() expected a character, but string o

Carlsans commented 5 months ago

I have been able to connect to my plug via python lib tinytuya. [python-tuya] is no longer maintained(This repository has been archived by the owner on Sep 4, 2021). I guess rewiring the code using tinytuya would be an option.

tuya

Carlsans commented 4 months ago

I've seen that a tinytuya branch was already created but the code was not compatible with 3.4 tuya version. I forked the branch and modifyed the code so that it use 3.4 instead of 3.3. It work. https://github.com/Carlsans/OctoPrint-TuyaSmartplug/tree/tinytuya You need to have the 3.3 box checked. Would be easy just to add a few radiobox to choose from the newer versions.

kattekatkat commented 4 months ago

Thank you very much for both to Ziirish for the original version and this updated one from Carlsans. :-) I have been using the plugin for a long time but it also stopped working for me. With the new version from the 15 feb. it is almost working for me again. I'm not able to get the turn off with g-code working anymore. Nothing happens. Also it seems like the status doesn't update after turning the plug on : If I press the icon on the top of the screen the printer turns on, but the icon stays gray. If i click on the icon again is turn green, indicating that the plug is on. Have you managed to get the G-code turn off working ?

Best regards Jesper

Carlsans commented 4 months ago

My last version has this issue solved. Was an indent problem. https://github.com/Carlsans/OctoPrint-TuyaSmartplug

Le ven. 16 févr. 2024 16:32, kattekatkat @.***> a écrit :

Thank you very much for both to Ziirish for the original version and this updated one from Carlsans. :-) I have been using the plugin for a long time but it also stopped working for me. With the new version from the 15 feb. it is almost working for me again. I'm not able to get the turn off with g-code working anymore. Nothing happens. Also it seems like the status doesn't update after turning the plug on : If I press the icon on the top of the screen the printer turns on, but the icon stays gray. If i click on the icon again is turn green, indicating that the plug is on. Have you managed to get the G-code turn off working ?

Best regards Jesper

— Reply to this email directly, view it on GitHub https://github.com/ziirish/OctoPrint-TuyaSmartplug/issues/62#issuecomment-1949363267, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEOBLADDO5DIWRPNUVR3VTYT7F5JAVCNFSM6AAAAABDAG2LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBZGM3DGMRWG4 . You are receiving this because you authored the thread.Message ID: @.***>

kattekatkat commented 4 months ago

Is this one different than the one from yesterday? I'm using the one from yesterday and having problem with the G-code turn off (I'm using the one with the menu added so that is possible to select Tuya version, im using 3.4). I 've also tried the older version that you linked to in post 3, but the new one works much better.

Carlsans commented 4 months ago

i deleted the master branch that was wrong and made last corrections.will evolve in time. my version gcodes end command work.

On Fri, Feb 16, 2024 at 5:15 PM kattekatkat @.***> wrote:

Is this one different than the one from yesterday? I'm using the one from yesterday and having problem with the G-code turn off (I'm using the one with the menu added so that is possible to select Tuya version, im using 3.4). I 've also tried the older version that you linked to in post 3, but the new one works much better.

— Reply to this email directly, view it on GitHub https://github.com/ziirish/OctoPrint-TuyaSmartplug/issues/62#issuecomment-1949411663, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEOBLGNASXHTYZEUT2LFWDYT7LATAVCNFSM6AAAAABDAG2LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBZGQYTCNRWGM . You are receiving this because you authored the thread.Message ID: @.***>

--

Carl Sansfaçon

kattekatkat commented 4 months ago

I tried again today and it's stille the same. Not able to turn the printer off with G-code M81. I am pretty sure that I was using the latest version yesterday evening. The behavior is the same. Still getting an error "Status unknown for 192.168.2.233. Double check IP Address\Hostname in tuyasmartplug Settings." when turning the plug on and the status (icon color) is not updated right away. (the plug does turn on) I've set "pulling of status" to 1 minut, so it updates within 1 minut, but not directly after I press the icon. The M81 doesn't do anything.

Carlsans commented 4 months ago

I have solved the m81 bug and make it work... Maybe your plugin has not updated properly. Try uninstalling and be sure your parameters are all right. The other bug will be solved in the nearest future. Carl

On Sat, Feb 17, 2024 at 4:57 AM kattekatkat @.***> wrote:

I tried again today and it's stille the same. Not able to turn the printer off with G-code M81. I am pretty sure that I was using the latest version yesterday evening. The behavior is the same. Still getting an error "Status unknown for 192.168.2.233. Double check IP Address\Hostname in tuyasmartplug Settings." when turning the plug on and the status (icon color) is not updated right away. (the plug does turn on) I've set "pulling of status" to 1 minut, so it updates within 1 minut, but not directly after I press the icon. The M81 doesn't do anything.

— Reply to this email directly, view it on GitHub https://github.com/ziirish/OctoPrint-TuyaSmartplug/issues/62#issuecomment-1949920722, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEOBLFV7JLK3IT7SN2X52LYUB5IZAVCNFSM6AAAAABDAG2LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBZHEZDANZSGI . You are receiving this because you authored the thread.Message ID: @.***>

--

Carl Sansfaçon

kattekatkat commented 4 months ago

I don't know how i can uninstall it anymore that I have done so far. Have used the uninstall and clean up data function and restarted before and after uninstalling and installing. Still no luck with M81 but as a workaround i've set up home assistant to turn off the plug for the printer after it's done printing.

Carlsans commented 4 months ago

I've tested the link I sent you on another pi. I had to delete the data from the old version so it could work. It's still really buggy but the M81 work. Your better off waiting a little longer until I clear all the bugs. [image: image.png]

On Sat, Feb 17, 2024 at 4:01 PM kattekatkat @.***> wrote:

I don't know how i can uninstall it anymore that I have done so far. Have used the uninstall and clean up data function and restarted before and after uninstalling and installing. Still no luck with M81 but as a workaround i've set up home assistant to turn off the plug for the printer after it's done printing.

— Reply to this email directly, view it on GitHub https://github.com/ziirish/OctoPrint-TuyaSmartplug/issues/62#issuecomment-1950324079, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEOBLFET5YYKH4BKC5WTULYUELCVAVCNFSM6AAAAABDAG2LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGMZDIMBXHE . You are receiving this because you authored the thread.Message ID: @.***>

--

Carl Sansfaçon

Carlsans commented 4 months ago

The latest update is a major improvement in stability. Please backup your info because update will erase it, you will need to write it back.

On Sun, Feb 18, 2024 at 9:47 PM Carl Sansfaçon @.***> wrote:

I've tested the link I sent you on another pi. I had to delete the data from the old version so it could work. It's still really buggy but the M81 work. Your better off waiting a little longer until I clear all the bugs. [image: image.png]

On Sat, Feb 17, 2024 at 4:01 PM kattekatkat @.***> wrote:

I don't know how i can uninstall it anymore that I have done so far. Have used the uninstall and clean up data function and restarted before and after uninstalling and installing. Still no luck with M81 but as a workaround i've set up home assistant to turn off the plug for the printer after it's done printing.

— Reply to this email directly, view it on GitHub https://github.com/ziirish/OctoPrint-TuyaSmartplug/issues/62#issuecomment-1950324079, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEOBLFET5YYKH4BKC5WTULYUELCVAVCNFSM6AAAAABDAG2LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGMZDIMBXHE . You are receiving this because you authored the thread.Message ID: @.***>

--

Carl Sansfaçon

--

Carl Sansfaçon

Carlsans commented 4 months ago

The latest update of my repo is working quite well. Go take a look at the video at the top of the readme file. https://github.com/Carlsans/OctoPrint-TuyaSmartplug

On Sat, Feb 17, 2024 at 4:01 PM kattekatkat @.***> wrote:

I don't know how i can uninstall it anymore that I have done so far. Have used the uninstall and clean up data function and restarted before and after uninstalling and installing. Still no luck with M81 but as a workaround i've set up home assistant to turn off the plug for the printer after it's done printing.

— Reply to this email directly, view it on GitHub https://github.com/ziirish/OctoPrint-TuyaSmartplug/issues/62#issuecomment-1950324079, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEOBLFET5YYKH4BKC5WTULYUELCVAVCNFSM6AAAAABDAG2LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGMZDIMBXHE . You are receiving this because you authored the thread.Message ID: @.***>

--

Carl Sansfaçon

kattekatkat commented 4 months ago

is it only possible to add plugs by discovering the with the API/secret method? (and by that adding all the plugs that is connected to the Tuya account?)

Carlsans commented 4 months ago

You can add them the old way too. You can delete the plugs you dont want.

On Wed, Feb 28, 2024 at 11:35 AM kattekatkat @.***> wrote:

is it only possible to add plugs by discovering the with the API/secret method? (and by that adding all the plugs that is connected to the Tuya account?)

— Reply to this email directly, view it on GitHub https://github.com/ziirish/OctoPrint-TuyaSmartplug/issues/62#issuecomment-1969380270, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEOBLGUQRLSV6A44WGTW7TYV5MDPAVCNFSM6AAAAABDAG2LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGM4DAMRXGA . You are receiving this because you authored the thread.Message ID: @.***>

--

Carl Sansfaçon

icedarts88 commented 2 months ago

Hi @Carlsans

In the video you say to type M1234 but in the pluggin it says G1234. Which is the right one?

Carlsans commented 2 months ago

M1234 is the one. I corrected the typo.

On Thu, Apr 18, 2024 at 8:00 AM icedarts88 @.***> wrote:

Hi @Carlsans https://github.com/Carlsans

In the video you say to type M1234 but in the pluggin it says G1234. Which is the right one?

— Reply to this email directly, view it on GitHub https://github.com/ziirish/OctoPrint-TuyaSmartplug/issues/62#issuecomment-2063699181, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEOBLGWV2AZJQ66FEQ5XQTY56YVPAVCNFSM6AAAAABDAG2LLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRTGY4TSMJYGE . You are receiving this because you were mentioned.Message ID: @.***>

--

Carl Sansfaçon