Closed fenen001 closed 1 year ago
It is possible, as it is a simple python program. In fact, it can even run under windows.
Hi Alexander, thank you for your quick response.
I am not an IT professional 😊
Are you able to send me instructions how to install in Docker, that would be really appreciated.
I have some new generation 2 Shelly’s and would really like them to work in Domoticz
Thanks.
Regards, Huib
Van: Alexander Nagy @.> Datum: dinsdag, 9 mei 2023 om 15:24 Aan: enesbcs/shellyteacher4domo @.> CC: Huib Fenenga @.>, Author @.> Onderwerp: Re: [enesbcs/shellyteacher4domo] Shelly Teacher in Docker (Issue #12)
It is possible, as it is a simple python program. In fact, it can even run under windows.
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1540119371, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6I6TKK6K3F7TGN5JZDDXFJAPHANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
Are you able to send me instructions how to install in Docker, that would be really appreciated.
Sorry i have never used Docker. Based on this article, you have to open a bash console to the container: https://www.geeksforgeeks.org/how-to-install-linux-packages-inside-a-docker-container/
And then the installation steps are the same as any other Linux system.
I'm going to work on it and hopefully it will work.
Thanks again for the support
Van: Alexander Nagy @.> Datum: dinsdag, 9 mei 2023 om 16:25 Aan: enesbcs/shellyteacher4domo @.> CC: Huib Fenenga @.>, Author @.> Onderwerp: Re: [enesbcs/shellyteacher4domo] Shelly Teacher in Docker (Issue #12)
Are you able to send me instructions how to install in Docker, that would be really appreciated.
Sorry i have never used Docker. Based on this article, you have to open a bash console to the container: https://www.geeksforgeeks.org/how-to-install-linux-packages-inside-a-docker-container/
And then the installation steps are the same as any other Linux system.
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1540231601, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6I3YCK5Z5IVHWFDKRCTXFJHTPANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
I'm going to work on it and hopefully it will work.
Maybe i can share a windows version with pyinstaller, just needs a Windows to compile it. :) Shelly Teacher has to run one time only, it is not a service, not a plugin, so it is not really necessary to be installed on a server.
Ohw that would be great and looking forward to your windows version with py installer
Verstuurd vanaf mijn iPhone
Op 9 mei 2023 om 17:31 heeft Alexander Nagy @.***> het volgende geschreven:

I'm going to work on it and hopefully it will work.
Maybe i can share a windows version with pyinstaller, just needs a Windows to compile it. :) Shelly Teacher has to run one time only, it is not a service, not a plugin, so it is not really necessary to be installed on a server.
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1540398456, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6I664RXD25HPX5F3N4TXFJPLFANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
Windows x64 and Linux x64 binary added to releases https://github.com/enesbcs/shellyteacher4domo/releases/download/v0.01/shellyteacher4domo_bin.zip
Its working a little differently as it has a simple GUI.. you have to change IP address and settings, than click "Save settings" button, exit program, restart program and if MQTT connection succesful, than finally click on "Start detection" button.
Thank you Alexander for all your support!!!!
I will give it a try in the next coming days!!!
Verstuurd vanaf mijn iPhone
Op 9 mei 2023 om 19:16 heeft Alexander Nagy @.***> het volgende geschreven:

Windows x64 and Linux x64 binary added to releases https://github.com/enesbcs/shellyteacher4domo/releases/download/v0.01/shellyteacher4domo_bin.zip
Its working a little differently as it has a simple GUI.. you have to change IP address and settings, than click "Save settings" button, exit program, restart program and if MQTT connection succesful, than finally click on "Start detection" button.
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1540564866, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6I6LXLELO5ZVUUOOU6DXFJ3WDANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
Hi Alexander, I hope I can bother you again,
I have tried to install ShellyTeacher yesterday. All went alright until I gave the start command: python3 shellyteacher4domo.py
(venv) MacBook-Pro-2:shellyteacher4domo huibfenenga$ python3 shellyteacher4domo.py
Connecting to MQTT server...
Connection failed to MQTT server at 192.168.10.2 'MQTTClient' object has no attribute '_on_pre_connect'
Connecting to MQTT server...
Connection failed! 'MQTTClient' object has no attribute '_on_pre_connect'
Connecting to MQTT server...
Connection failed! 'MQTTClientOnlineCheck' object has no attribute '_on_pre_connect'
Starting eval loop, waiting Shelly devices to appear on MQTT announce... press CTRL-C to cancel
Do you have any idea what went wrong?
I'm sure my MQTT broker was up and running. Checked that for a ping and telnet command. But I don't understand what is going wrong.
In the file settings.py I entered the correct IP address and port and set debugging to True. Incidentally, no additional information was provided after debugging to set it to True. Comparing with False.
Hopefully you are able to help?
Thank you very much!
Regards, Huib
Van: Alexander Nagy @.> Beantwoorden - Aan: enesbcs/shellyteacher4domo @.> Datum: dinsdag 9 mei 2023 om 19:16 Aan: enesbcs/shellyteacher4domo @.> CC: Huib Fenenga @.>, Author @.***> Onderwerp: Re: [enesbcs/shellyteacher4domo] Shelly Teacher in Docker (Issue #12)
Windows x64 and Linux x64 binary added to releases https://github.com/enesbcs/shellyteacher4domo/releases/download/v0.01/shellyteacher4domo_bin.zip
Its working a little differently as it has a simple GUI.. you have to change IP address and settings, than click "Save settings" button, exit program, restart program and if MQTT connection succesful, than finally click on "Start detection" button.
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1540564866, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6I6LXLELO5ZVUUOOU6DXFJ3WDANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
Connecting to MQTT server... Connection failed to MQTT server at 192.168.10.2 'MQTTClient' object has no attribute '_on_pre_connect'
Could you check please which paho-mqtt version you have installed?
Hi Alexander thank you for coming back to me. The pabo mqqt version is 1.6.1
Regards Huib
Verstuurd vanaf mijn iPhone
Op 18 mei 2023 om 16:57 heeft Alexander Nagy @.***> het volgende geschreven:

Connecting to MQTT server... Connection failed to MQTT server at 192.168.10.2 'MQTTClient' object has no attribute '_on_pre_connect'
Could you check please which paho-mqtt version you have installed?
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1553189503, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6I2WGXALPRXNV6U47STXGY2ELANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
Hi Alexander thank you for coming back to me. The pabo mqqt version is 1.6.1 Regards Huib Verstuurd vanaf mijn iPhone Op 18 mei 2023 om 16:57
Its strange as i am using the same paho-mqtt 1.6.1 on my Ubuntu PC, without issues. '_on_pre_connect' is an optional function in paho mqtt client, which is not necessary, but added a dummy for it in commit https://github.com/enesbcs/shellyteacher4domo/commit/3ef9f7f10fcabfd70804471b2fcab2ba8c1823a9
Hi Alexander, thanks but get the following fault:
(venv) 192:shellyteacher4domo huibfenenga$ python3 shellyteacher4domo.py Connecting to MQTT server... Connection failed to MQTT server at 192.168.10.2 _on_pre_connect() takes 2 positional arguments but 3 were given Connecting to MQTT server... Connection failed! _on_pre_connect() takes 2 positional arguments but 3 were given Connecting to MQTT server... Connection failed! _on_pre_connect() takes 2 positional arguments but 3 were given Starting eval loop, waiting Shelly devices to appear on MQTT announce... press CTRL-C to cancel
Do you know what happens?
Regards, Huib
Van: Alexander Nagy @.> Beantwoorden - Aan: enesbcs/shellyteacher4domo @.> Datum: donderdag 18 mei 2023 om 18:33 Aan: enesbcs/shellyteacher4domo @.> CC: Huib Fenenga @.>, Author @.***> Onderwerp: Re: [enesbcs/shellyteacher4domo] Shelly Teacher in Docker (Issue #12)
Hi Alexander thank you for coming back to me. The pabo mqqt version is 1.6.1 Regards Huib Verstuurd vanaf mijn iPhone Op 18 mei 2023 om 16:57
Its strange as i am using the same paho-mqtt 1.6.1 on my Ubuntu PC, without issues. '_on_pre_connect' is an optional function in paho mqtt client, which is not necessary, but added a dummy for it in commit 3ef9f7fhttps://github.com/enesbcs/shellyteacher4domo/commit/3ef9f7f10fcabfd70804471b2fcab2ba8c1823a9
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1553317591, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6IYEQGERSUCO2RAPUTLXGZFORANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
Hi Alexander, thanks but get the following fault: (venv) 192:shellyteacher4domo huibfenenga$ python3 shellyteacher4domo.py Connecting to MQTT server... Connection failed to MQTT server at 192.168.10.2 _on_pre_connect() takes 2 positional arguments but 3 were given Connecting to MQTT server... Connection failed! _on_pre_connect() takes 2 positional arguments but 3 were given Connecting to MQTT server... Connection failed! _on_pre_connect() takes 2 positional arguments but 3 were given Starting eval loop, waiting Shelly devices to appear on MQTT announce... press CTRL-C to cancel Do you know what happens? Regards,
Yes, you are using a very strange paho-mqtt lib...
Please try to change these lines in shellyteacher4domo.py: def _on_pre_connect(self, func):
to these: def _on_pre_connect(self, func, dummy):
Hi Alexander, Shelly Teacher is working fine but have two remarks:
I am able to select a level (percentage) via the switch below in Domoticz for my Shelly 2PM shutter but nothing happens. It seems that the Shelly does not accept the level institutions of Domoticz. The 0% and 100% for open and close are working fine.
@.***
And my shelly Motion2 is not recognized in Shelly Teacher.
Are you able to change the templates for the Shelly 2PM level institutions and the Shelly Motion2?
Thanks.
Regards, Huib
Van: Alexander Nagy @.> Beantwoorden - Aan: enesbcs/shellyteacher4domo @.> Datum: vrijdag 19 mei 2023 om 06:46 Aan: enesbcs/shellyteacher4domo @.> CC: Huib Fenenga @.>, Author @.***> Onderwerp: Re: [enesbcs/shellyteacher4domo] Shelly Teacher in Docker (Issue #12)
Hi Alexander, thanks but get the following fault: (venv) 192:shellyteacher4domo huibfenenga$ python3 shellyteacher4domo.py Connecting to MQTT server... Connection failed to MQTT server at 192.168.10.2 _on_pre_connect() takes 2 positional arguments but 3 were given Connecting to MQTT server... Connection failed! _on_pre_connect() takes 2 positional arguments but 3 were given Connecting to MQTT server... Connection failed! _on_pre_connect() takes 2 positional arguments but 3 were given Starting eval loop, waiting Shelly devices to appear on MQTT announce... press CTRL-C to cancel Do you know what happens? Regards,
Yes, you are using a very strange paho-mqtt lib...
Please try to change these lines in shellyteacher4domo.py: def _on_pre_connect(self, func):
to these: def _on_pre_connect(self, func, dummy):
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1553988466, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6IZKIKC5SOASDPXAQN3XG33K7ANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
THis is what the Domoticz log tells me:
Cover device does not have set_position_topic (shellyplus2pm-441793ceb570-roller-0/NEW
Van: Huib Fenenga @.> Datum: vrijdag 19 mei 2023 om 10:47 Aan: enesbcs/shellyteacher4domo @.> Onderwerp: Re: [enesbcs/shellyteacher4domo] Shelly Teacher in Docker (Issue #12)
Hi Alexander, Shelly Teacher is working fine but have two remarks:
I am able to select a level (percentage) via the switch below in Domoticz for my Shelly 2PM shutter but nothing happens. It seems that the Shelly does not accept the level institutions of Domoticz. The 0% and 100% for open and close are working fine.
@.***
And my shelly Motion2 is not recognized in Shelly Teacher.
Are you able to change the templates for the Shelly 2PM level institutions and the Shelly Motion2?
Thanks.
Regards, Huib
Van: Alexander Nagy @.> Beantwoorden - Aan: enesbcs/shellyteacher4domo @.> Datum: vrijdag 19 mei 2023 om 06:46 Aan: enesbcs/shellyteacher4domo @.> CC: Huib Fenenga @.>, Author @.***> Onderwerp: Re: [enesbcs/shellyteacher4domo] Shelly Teacher in Docker (Issue #12)
Hi Alexander, thanks but get the following fault: (venv) 192:shellyteacher4domo huibfenenga$ python3 shellyteacher4domo.py Connecting to MQTT server... Connection failed to MQTT server at 192.168.10.2 _on_pre_connect() takes 2 positional arguments but 3 were given Connecting to MQTT server... Connection failed! _on_pre_connect() takes 2 positional arguments but 3 were given Connecting to MQTT server... Connection failed! _on_pre_connect() takes 2 positional arguments but 3 were given Starting eval loop, waiting Shelly devices to appear on MQTT announce... press CTRL-C to cancel Do you know what happens? Regards,
Yes, you are using a very strange paho-mqtt lib...
Please try to change these lines in shellyteacher4domo.py: def _on_pre_connect(self, func):
to these: def _on_pre_connect(self, func, dummy):
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1553988466, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6IZKIKC5SOASDPXAQN3XG33K7ANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
Please open separated issues for new problems.
I havent got a Shelly 2PM just guessed about its config, and i managed to hit the basic commands. If only the set_position_topic is missing than maybe the solution can be find on a Home Assistant forum. https://github.com/enesbcs/shellyteacher4domo/issues/13
Shelly Motion2 is not on the supported device list. Its basicly I havent got a Shelly Motion2 for testing and the docs on the manufacturer site has no real-life examples to understand how it works. As i see it might send a multi-level json which is not liked by Domoticz, needs more info and testing. https://github.com/enesbcs/shellyteacher4domo/issues/14
Hi Alexander I understand. Thank you for all your support so far!!!!
Regards, Huib
Verstuurd vanaf mijn iPhone
Op 19 mei 2023 om 18:15 heeft Alexander Nagy @.***> het volgende geschreven:

Please open separated issues for new problems.
I havent got a Shelly 2PM just guessed about its config, and i managed to hit the basic commands. If only the set_position_topic is missing than maybe the solution can be find on a Home Assistant forum.
Shelly Motion2 is not on the supported device list. Its basicly I havent got a Shelly Motion2 for testing and the docs on the manufacturer site has no real-life examples to understand how it works. As i see it might send a multi-level json which is not liked by Domoticz, needs more info and testing.
— Reply to this email directly, view it on GitHubhttps://github.com/enesbcs/shellyteacher4domo/issues/12#issuecomment-1554807361, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7WY6I24OJV2GJQUWYLH5IDXG6MBDANCNFSM6AAAAAAX3GTBPY. You are receiving this because you authored the thread.Message ID: @.***>
Hi Alexander, is it possible to install Shelly Teacher in Docker?
I run Domoticz and Mosquitto in Docker.
Thanks for your reaction.
Regards