Open oriwheb opened 4 years ago
The IP address needs to the IP address of the plug, not your computer. The smart plug will join your wireless network and will be assigned an IP address by your router. To poll the smart plug, you will need to determine what IP address your network assigned to the Smart Plug - tools like arp-scan
can help identify devices on your network. WiFi Routers often have a list of devices connected as well. Look for devices with a name like "ESP_xxxxxx".
I know. That is what I entered. I gave the device a static IP. Sorry for making it seem like I entered my computer's IP.
Ha! Sorry about making the assumption. So to keep investigating, I would probably try:
telnet DeviceIP 6668
The plug will start sending encrypted data in your telnet session like this: jason@minecraft3:~$ telnet 10.0.1.55 6668
Trying 10.0.1.55...
Connected to 10.0.1.55.
Escape character is '^]'.
U?3.183931e422d087d9fUvzFUQaCsTA77LvyI6cBhqmo3da37cvaaO0ZO5DHEz4EjKsLKyl6om7n35tccBsH7yLO3KP2kzqNByHJ5ymTLvBXLewy0eAeb+gOJsbK6ZvCjgfb915N+8QLHALZMkWM???U
If the plug is not listening on that port or it is blocked, it would return something like this:
jason@minecraft3:~$ telnet 10.0.1.55 6668
Trying 10.0.1.55...
telnet: Unable to connect to remote host: Connection refused
If it isn't responding on port 6668, check your local system or network to make sure it isn't blocking that port.
So I double (by this time it's quadruple...) checked my device ID. No idea what you mean by "function".
I tried using Putty to connect to the device and got this
Network error: Software caused connection abort
I checked my firewall and my router settings - nothing seems to be blocked anywhere (I turned my firewall off completely to be double sure while testing).
Could it simply be an issue of a different port being used for the sockets made for Israel?
@oriwheb Not all Tuya based devices report the energy stats, it's up to the manufacturer of the device to enable this. Looking at the link for the product, I can't see anywhere that hose switches do give energy data output.
Do your devices report power stats in the Tuya / Smart Life app? If not, then you -presumably- won't be able to grab them via this library either.
Both docker and native options didn't yield any information for me for this product: https://www.aliexpress.com/item/32975898978.html?spm=a2g0s.9042311.0.0.27424c4dtPBf8A
My output is as follows:
I tried with my Global IP Address as well just to make sure I did not misunderstand and that's what the script expects: