jamespauly / udi-tuya-poly

Tuya Smart Devices
MIT License
0 stars 0 forks source link

Hello James #1

Open sjpbailey opened 2 years ago

sjpbailey commented 2 years ago

My Name is Steve Bailey

I was working on Tuya and was told not to by Bob P. that it was already a hub device that could be brought up another way. Lol! Hey I worked on tinytuya for a year and see you can pull local IP address that i was stumped on.

I have code that works for treatlife switches and LED bulbs lights that works well except for the discovery of IP devices. lmao!

I am not experienced enough to get this done, and also have a broken back that makes sitting difficult, i would only screw up on a GITHUB collaboration. Here is my code for LED lights and switches that maybe we can work on together or you are glad to add it to your code. https://github.com/sjpbailey/udi-poly-baspi-thermostat-python-master if you add it then i can bring up my devices lolol! also if you can discover IP's why not ID and key for each device? I was using snapshot and haven't gotten around to do what you have done with IP discovery.

I also have another that i am stuck on and thats Rheem water heaters and the econet API they keep saying will be taken down, lol. I cannot call setpoint and unoccupied or vacation mode... https://github.com/sjpbailey/udi-rheem-poly-master-v3 i have a tankless water heater setup on the cloud and can give you access credential's online for it.

Heading to Bend Oregon this weekend for a week, for some long needed R&R!

Regards, Steve

209 914-1055 sjpbailey@comcast.net

jamespauly commented 2 years ago

Sure that would be awesome. I got delayed a bit as I was working on the couple of other apps but would love to revisit this one.

Regards, James

On Jul 15, 2022, at 6:17 AM, Steven Bailey @.**@.>> wrote:

ATTENTION: This email was sent from outside the company. Do not click links or open files unless you know it is safe. Forward malicious emails to @.**@.>.

My Name is Steve Bailey

I was working on Tuya and was told not to by Bob P. that it was already a hub device that could be brought up another way. Lol! Hey I worked on tinytuya for a year and see you can pull local IP address that i was stumped on.

I have code that works for treatlife switches and LED bulbs lights that works well except for the discovery of IP devices. lmao!

I am not experienced enough to get this done, and also have a broken back that makes sitting difficult. Here is my code for LED lights and switches that maybe we can work on together or you are glad to ad it to your code. I was using snapshot and haven't gotten around to do what you have done with IP discovery.

Heading to Bend Or this weekend for some long needed R&R!

Regards, Steve https://github.com/sjpbailey/udi-poly-baspi-thermostat-python-masterhttps://urldefense.com/v3/__https://github.com/sjpbailey/udi-poly-baspi-thermostat-python-master__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1QoafeuMxJQ$ 209 914-1055 @.**@.>

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/jamespauly/udi-tuya-poly/issues/1__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1QoZmGCSpGg$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABLOG34B54DPOXMOTJXVRTLVUE3DXANCNFSM53VDSZRQ__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1Qobu6iWPVQ$. You are receiving this because you are subscribed to this thread.Message ID: @.***>


CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.

sjpbailey commented 2 years ago

Hey James,

Fantastic, I grabbed a zip of you tuya so I can try to figure out how your polling the IP addresses and would like to talk more when you're ready.

I have the TreatLife stuff working using the snapshot.json after I populate it with Mr Cox tinytuya polling, another great human like Bob!

All I needed and wanted to figure out was how to poll that in real time like you did the IP addresses.

I Also used Pandas to sort switch and LED types with DPS so we are super close to making additional devices work with your controller.

Also get you to log in my Rheem tankless water heater and help figure that one out for setpoint and vacation mode, we can also co-author.

Talk soon. You can also text or call me at 209 914-1055 Nice hearing from you! I also have @. @.> so two emails with this one @ @. @.>. Regards, Steve

On Jul 15, 2022, at 9:21 AM, jamespauly @.***> wrote:

Sure that would be awesome. I got delayed a bit as I was working on the couple of other apps but would love to revisit this one.

Regards, James

On Jul 15, 2022, at 6:17 AM, Steven Bailey @.**@.>> wrote:

ATTENTION: This email was sent from outside the company. Do not click links or open files unless you know it is safe. Forward malicious emails to @.**@.>.

My Name is Steve Bailey

I was working on Tuya and was told not to by Bob P. that it was already a hub device that could be brought up another way. Lol! Hey I worked on tinytuya for a year and see you can pull local IP address that i was stumped on.

I have code that works for treatlife switches and LED bulbs lights that works well except for the discovery of IP devices. lmao!

I am not experienced enough to get this done, and also have a broken back that makes sitting difficult. Here is my code for LED lights and switches that maybe we can work on together or you are glad to ad it to your code. I was using snapshot and haven't gotten around to do what you have done with IP discovery.

Heading to Bend Or this weekend for some long needed R&R!

Regards, Steve https://github.com/sjpbailey/udi-poly-baspi-thermostat-python-masterhttps://urldefense.com/v3/__https://github.com/sjpbailey/udi-poly-baspi-thermostat-python-master__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1QoafeuMxJQ$ 209 914-1055 @.**@.>

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/jamespauly/udi-tuya-poly/issues/1__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1QoZmGCSpGg$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABLOG34B54DPOXMOTJXVRTLVUE3DXANCNFSM53VDSZRQ__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1Qobu6iWPVQ$. You are receiving this because you are subscribed to this thread.Message ID: @.***>


CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You. — Reply to this email directly, view it on GitHub https://github.com/jamespauly/udi-tuya-poly/issues/1#issuecomment-1185698764, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRVB3P7KDT2FFCOWSYCEPTVUGF2BANCNFSM53VDSZRQ. You are receiving this because you authored the thread.

jamespauly commented 2 years ago

If you want create a fork in GitHub and then we can merge our changes. My goal is to make the interface multiple tuya devices. Right now I have a flood light that uses the tuya api’s. Let me know if you have any questions.

Regards, James

On Jul 16, 2022, at 3:15 AM, Steven Bailey @.**@.>> wrote:

Hey James,

Fantastic, I grabbed a zip of you tuya so I can try to figure out how your polling the IP addresses and would like to talk more when you're ready.

I have the TreatLife stuff working using the snapshot.json after I populate it with Mr Cox tinytuya polling, another great human like Bob!

All I needed and wanted to figure out was how to poll that in real time like you did the IP addresses.

I Also used Pandas to sort switch and LED types with DPS so we are super close to making additional devices work with your controller.

Also get you to log in my Rheem tankless water heater and help figure that one out for setpoint and vacation mode, we can also co-author.

Talk soon. You can also text or call me at 209 914-1055 Nice hearing from you! I also have @. @.> so two emails with this one @ @. @.>. Regards, Steve

On Jul 15, 2022, at 9:21 AM, jamespauly @.***> wrote:

Sure that would be awesome. I got delayed a bit as I was working on the couple of other apps but would love to revisit this one.

Regards, James

On Jul 15, 2022, at 6:17 AM, Steven Bailey @.**@.>> wrote:

ATTENTION: This email was sent from outside the company. Do not click links or open files unless you know it is safe. Forward malicious emails to @.**@.>.

My Name is Steve Bailey

I was working on Tuya and was told not to by Bob P. that it was already a hub device that could be brought up another way. Lol! Hey I worked on tinytuya for a year and see you can pull local IP address that i was stumped on.

I have code that works for treatlife switches and LED bulbs lights that works well except for the discovery of IP devices. lmao!

I am not experienced enough to get this done, and also have a broken back that makes sitting difficult. Here is my code for LED lights and switches that maybe we can work on together or you are glad to ad it to your code. I was using snapshot and haven't gotten around to do what you have done with IP discovery.

Heading to Bend Or this weekend for some long needed R&R!

Regards, Steve https://github.com/sjpbailey/udi-poly-baspi-thermostat-python-masterhttps://urldefense.com/v3/__https://github.com/sjpbailey/udi-poly-baspi-thermostat-python-master__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1QoafeuMxJQ$https://urldefense.com/v3/__https://github.com/sjpbailey/udi-poly-baspi-thermostat-python-master*3Chttps:/*urldefense.com/v3/__https:/*github.com/sjpbailey/udi-poly-baspi-thermostat-python-master__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1QoafeuMxJQ$*3E__;JS8vJQ!!BiPlgCE7GXGj!1Om4WR9wOXXYqVZHL869Fr1CB6NGqnAW_pYKscmB1m9Ypi7KI21HqVF_BYch35Ips41AN52WyhrdxsxgFLIKxqgrfg$ 209 914-1055 @.**@.>

— Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/jamespauly/udi-tuya-poly/issues/1__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1QoZmGCSpGg$%3E, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABLOG34B54DPOXMOTJXVRTLVUE3DXANCNFSM53VDSZRQ__;!!BiPlgCE7GXGj!2XUKVZDkDkAClYGu16o_LiCqb0m7-M1riFpAlTjd-VKx2bTdD8kzW3w5Raze1gwh_21AI1SEvNBa3_A1Qobu6iWPVQ$%3E. You are receiving this because you are subscribed to this thread.Message ID: @.***>


CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You. — Reply to this email directly, view it on GitHub https://github.com/jamespauly/udi-tuya-poly/issues/1#issuecomment-1185698764https://urldefense.com/v3/__https://github.com/jamespauly/udi-tuya-poly/issues/1*issuecomment-1185698764*3E__;IyU!!BiPlgCE7GXGj!1Om4WR9wOXXYqVZHL869Fr1CB6NGqnAW_pYKscmB1m9Ypi7KI21HqVF_BYch35Ips41AN52WyhrdxsxgFLJ5AN3UFw$, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRVB3P7KDT2FFCOWSYCEPTVUGF2BANCNFSM53VDSZRQhttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AMRVB3P7KDT2FFCOWSYCEPTVUGF2BANCNFSM53VDSZRQ*3E__;JQ!!BiPlgCE7GXGj!1Om4WR9wOXXYqVZHL869Fr1CB6NGqnAW_pYKscmB1m9Ypi7KI21HqVF_BYch35Ips41AN52WyhrdxsxgFLKJVdsyEA$. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/jamespauly/udi-tuya-poly/issues/1*issuecomment-1186106082__;Iw!!BiPlgCE7GXGj!1Om4WR9wOXXYqVZHL869Fr1CB6NGqnAW_pYKscmB1m9Ypi7KI21HqVF_BYch35Ips41AN52WyhrdxsxgFLLsQ9S_gw$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABLOG32WL3ZGLNRYVEXMUHLVUJOS3ANCNFSM53VDSZRQ__;!!BiPlgCE7GXGj!1Om4WR9wOXXYqVZHL869Fr1CB6NGqnAW_pYKscmB1m9Ypi7KI21HqVF_BYch35Ips41AN52WyhrdxsxgFLKPi9PRHw$. You are receiving this because you commented.Message ID: @.***>


CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.

sjpbailey commented 2 years ago

Hello James!

I was looking at your work and i cloned it into a new repository to start to add TreatLife lights and switches for you. New repository here: https://github.com/sjpbailey/udi-tuya-poly-james-play "Added a light Node the way i am switching it in the Device folder. It is currently non-functional your way so far, just started..." Did this because: Number one, to not screw up your work lol! I can do that too easily.

Number two to add product to your cool controller! I added one of my devices and it finds all the local IP addresses? Cool, i have been trying to do this by running the wizard manually for my crap then having it add devices based on 'dps'.

So my objective is to try to get the light to switch and change colors via your way, also to enhance what i started with it to get mine to finally work. Yours is way cleaner as i am a rookie at Python.

Anyway bare with me i will play with this in the following months on and off and will notify you of any progress. With the snapshot below you can gather (i Think) 'dps' control numbers, first thing i will try, of course color encoding is lengthy.

I am just blow away and need to figure out how you are grabbing local IP addresses, it drove me crazy! LMAO!

My Device Snapshot:

{
    "timestamp": 1656842169.88848,
    "devices": [
        {
            "name": "Under Cabinets",
            "ip": "192.168.1.155",
            "ver": "3.3",
            "id": "ebe097c0407da32084kvtr",
            "key": "b8e105e6395f53b7",
            "devId": {
                "dps": {
                    "20": true,
                    "21": "white",
                    "24": "00a5025f026b",
                    "25": "020e0d00001403e803e800000000",
                    "26": 0
                }
            }
        },
        {
            "name": "Switch Office Outside Lights",
            "ip": "192.168.1.145",
            "ver": "3.3",
            "id": "017743508caab5f0973e",
            "key": "e779c96c964f71b2",
            "devId": {
                "devId": "017743508caab5f0973e",
                "dps": {
                    "1": false,
                    "9": 0
                }
            }
        },
        {
            "name": "Switch Family Room Sconces",
            "ip": "192.168.1.146",
            "ver": "3.3",
            "id": "017743508caab5f385a7",
            "key": "2bc2d5aef80f3aee",
            "devId": {
                "devId": "017743508caab5f385a7",
                "dps": {
                    "1": false,
                    "9": 0
                }
            }
        },
        {
            "name": "Office Light",
            "ip": "192.168.1.147",
            "ver": "3.3",
            "id": "ebfc16d57ed374932cjqfk",
            "key": "805217605357161b",
            "devId": {
                "dps": {
                    "20": true,
                    "21": "colour",
                    "22": 505,
                    "23": 5,
                    "24": "002f03e801f9",
                    "25": "020d0d00000000000000001903e8",
                    "26": 0
                }
            }
        },
        {
            "name": "Garage",
            "ip": "192.168.1.148",
            "ver": "3.3",
            "id": "ebfd4f4263bb769d99zjkq",
            "key": "ec0b2b581a246eab",
            "devId": {
                "dps": {
                    "20": true,
                    "21": "colour",
                    "22": 1000,
                    "23": 1000,
                    "24": "002f03e801f7",
                    "25": "000d0d0000000000000000180000",
                    "26": 0
                }
            }
        }
    ]
}

My IP list from your controller startup Off the Store node i installed from you! WOW!

2022-08-18 05:08:46,224 Thread-3   udi_interface      INFO     TuyaController:discover: Starting Tuya Device Discovery
2022-08-18 05:08:46,226 Thread-3   udi_interface      INFO     TuyaController:discover: [{"name": "Office Light", "id": "ebfc16d57ed374932cjqfk", "key": "805217605357161b"}]
2022-08-18 05:08:46,278 MQTT       udi_interface.interface INFO     interface:_message: custom data response {'customparamsdoc': '<h1>Tuya Node Server Custom Parameters</h1>\n\n<ul>\n<li><b>devices (Optional)</b> - JSON formatted device list</li>\n</ul>\n'}
2022-08-18 05:08:46,323 MQTT       udi_interface.interface INFO     interface:_message: Successfully set key = customparamsdoc
2022-08-18 05:08:46,642 MQTT       udi_interface.interface INFO     interface:_message: Profile installation finished
2022-08-18 05:09:12,649 Thread-3   udi_interface      INFO     TuyaController:discover: Device Scan Device IP: 192.168.1.147
2022-08-18 05:09:12,650 Thread-3   udi_interface      INFO     TuyaController:discover: Adding Node: ebfc16d57e - Office Light
2022-08-18 05:09:12,808 Thread-3   udi_interface.interface INFO     interface:addNode: Adding node Office Light(ebfc16d57e) [None]
2022-08-18 05:09:12,811 Thread-3   udi_interface      INFO     TuyaController:discover: Device Scan Device IP: 192.168.1.148
2022-08-18 05:09:12,812 Thread-3   udi_interface      INFO     TuyaController:discover: Device Scan Device IP: 192.168.1.155
2022-08-18 05:09:12,813 Thread-3   udi_interface      INFO     TuyaController:discover: Device Scan Device IP: 192.168.1.146
2022-08-18 05:09:12,814 Thread-3   udi_interface      INFO     TuyaController:discover: Device Scan Device IP: 192.168.1.145
2022-08-18 05:09:12,814 Thread-3   udi_interface      INFO     TuyaController:discover: Finished Tuya Device Discovery
2022-08-18 05:09:13,515 Thread-6   udi_interface      INFO     TuyaNode:query: Query sensor ebfc16d57e
2022-08-18 05:09:13,519 Thread-6   udi_interface      INFO     TuyaNode:query: Node Name Office Light
jamespauly commented 2 years ago

Hey thanks for working on this. I've honestly not had a lot of time lately. I'm working on a way to do this more cleanly but it's been slow as I'm having to decipher the network packets happening between the devices and the cloud.

sjpbailey commented 2 years ago

Hello,

James all good you can grab the dps numbers needed to manipulate LED bulbs and switches from the snapshot file i sent you. Then you can make new nodes that will work with them.

I have a splitter made from pandas that will ad node based on dps numbering also. It splits lights and switches up to ad separately made it a year or so ago. Here: https://github.com/sjpbailey/udi-poly-tuya-python-master-v3

Have you talked to the owner of TinyTuya Jason Cox great human! I had permission to use from him. I will ad and manipulate my copy and give you the nodes. If i ever get to it! Currently at the beach!

Cheers! Steve

Sent from my iPhone

On Aug 19, 2022, at 6:30 AM, jamespauly @.***> wrote:  Hey thanks for working on this. I've honestly not had a lot of time lately. I'm working on a way to do this more cleanly but it's been slow as I'm having to decipher the network packets happening between the devices and the cloud.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

sjpbailey commented 2 years ago

Great Job!

Sent you a git hub reply just now, currently out of town. With the snapshot i sent it should give you the dps numbers to use for new nodes also you can look at my light and switch nodes to see what a mess i have. I will try to get to it and see if i can get you a couple new nodes on my play repository for this. I have a local poly installed from your zipped repository just need to sit down for a bit when i get back home to create a couple nodes that work. I also used pandas to split the switches and led lights for ad node, here in the controller: https://github.com/sjpbailey/udi-poly-tuya-python-master-v3

Talked to Jason Cox a few times and had verbal permission to steal his work which this poly really is.

I crack up because Bob said i should not work on this after a year of work. He said he wouldn't put it on the store at the time. He said a hub can do it and you wouldn't need a node server for it so i am a little taken aback by it popping up, after i was told NO. He also said its too hard to setup and at the time you did have to manipulate your devices online API where i think it can all now be done from the phone app.

Anyway i will gladly help you as i am disabled and retired and spent another half year on Enphase solar all to have them up their monthly API rate to $248 a month. Working for free and paying for it? I quit and this is the first back at it, not to mention faulty first round Polisy and one with a jumper in the wrong place where it wouldn't boot and i was the problem???

I my stuff is open you can do whatever you want with it i have some cool BacNet controllers that have six ins and six outputs and work with python and i have a few node servers we could probably sell as a full control system from Contemporary Controls inc.

Cheers i will hit you up in a week or so.

Regards, Steve

Sent from my iPhone

On Aug 19, 2022, at 11:16 PM, Steven Bailey @.***> wrote:



Hello,

James all good you can grab the dps numbers needed to manipulate LED bulbs and switches from the snapshot file i sent you. Then you can make new nodes that will work with them.

I have a splitter made from pandas that will ad node based on dps numbering also. It splits lights and switches up to ad separately made it a year or so ago. Here: https://github.com/sjpbailey/udi-poly-tuya-python-master-v3

Have you talked to the owner of TinyTuya Jason Cox great human! I had permission to use from him. I will ad and manipulate my copy and give you the nodes. If i ever get to it! Currently at the beach!

Cheers! Steve

Sent from my iPhone

On Aug 19, 2022, at 6:30 AM, jamespauly @.***> wrote:

 Hey thanks for working on this. I've honestly not had a lot of time lately. I'm working on a way to do this more cleanly but it's been slow as I'm having to decipher the network packets happening between the devices and the cloud.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.