volker76 / tuya_mqtt.net Goto Github PK
View Code? Open in Web Editor NEWMQTT Client for local Tuya devices
Home Page: https://github.com/volker76/tuya_mqtt.net/wiki
License: Apache License 2.0
MQTT Client for local Tuya devices
Home Page: https://github.com/volker76/tuya_mqtt.net/wiki
License: Apache License 2.0
Hi,
afaik, the use of network_mode: host together with ports: / port bindings has been depreciated. Or actually, the port bindings has been ignored if host was used.
Afaik tuya_mqtt.net uses port 80 to publish itself, or? Would it be possible to change this when using host to 8889?
Sorry if this already works, I cannot test as my image is not running. But at least the docker-compose docu should be updated;)
Cheers!
I like to have this function for my temperature sensors are providing like 230 for 23°C
I am not able to connect to my local Tuya devices. I am able to control them via the Tuya IoT website and via Google assistant and also with the Smart Life app.
I get the following error message in the logfile when I test the connection
7/12/2024 12:45:57 PM INFO MQTT establish reconnection 7/12/2024 12:45:57 PM INFO MQTT client connected to 192.168.0.112:1912 7/12/2024 7:09:37 PM INFO Test connection to Tuya API successful. 7/12/2024 8:03:05 PM WARN Error testing 84.170.234.50 System.Exception One or more errors occurred. (Connection timeout) at tuya_mqtt.net.Services.TuyaCommunicatorService.TestConnectLocal0A(TuyaDeviceInformation device) in /src/Services/TuyaCommunicatorService.cs:line 249 at tuya_mqtt.net.Services.TuyaCommunicatorService.TestConnect(TuyaDeviceInformation device) in /src/Services/TuyaCommunicatorService.cs:line 175 at tuya_mqtt.net.Pages.TuyaDevices.TestTuyaDevice() in /src/Pages/TuyaDevices.razor:line 408
It shouldn't make a difference but for completeness I am using the WesternAmerica Datacenter since some of my devices are in Florida
BestEx (IP-Symcon)
see this discussion github.com/codetheweb/tuyapi
there are devices which cannot be read with the DP_QUERY
requires code like
var jsonIn = dev.FillJson("{\"dps\":{\"1\":null,\"2\":null,\"100\":null,\"102\":null,\"103\":null}}", true,true,true,true);
byte[] request = dev.EncodeRequest(TuyaCommand.CONTROL_NEW, jsonIn);
once a device has been added to be monitored in the network it cannot be removed anymore.
The data of the device only can be changed, bit not removed
MQTT Broker allow retained messages, shall we implement this ?
Hi, I want to recommend the following GUI and functional improvements:
1.) under Tuya Devices -> Scanned network devices:
2.) under Tuya devices -> Connected Devices & Data
3.) under Log
break down #15 to individual issues
under Log
add time stamps
Hi,
I install it on docker, in gui i see that he find device that on my local network but can't add it, always said that timeout when click on test. in DP finds he can communication with the device cause he found all the DP's in device.
Before i install on HA the LocalTuya intergration and there i can add it and control it on local network.
I stop tha HA before install tuya_mqtt and also close all port that open from HA. and still no device can be add.
thanks for your help...
Hi,
I prefer if my device is published under the device ID e.g. tuya/bf61234567mpo/Dp20 as the topics are "hardcoded" into my home automation server. In my home automation server I then name the device e.g. "kitchen light". If I move the device to the bathroom, I just have to change the name to "bathroom light" and there is no need to change the topics and commands.
Currently, tuya_mqtt.net only allows to sent the MQTT publishing topic. But if i change this topic to the device ID, it is very hard to identify the device in the GUI as only the device ID is shown. E.g. it would be good to be able to set "device name" = name that is shown in tuya_mqtt.net GUI = name coming from Tuya API. And be able to set the MQTT topic under which the devices publishes = currently existing "Given name for MQTT".
Technically this could be realized with either adding a new field "device name" or adding a switch which sets the published topic to the device ID.
Cheers for considering!
seen in v0.9.5
[2023-10-01T17:46:30.378Z] Error: System.AggregateException: One or more errors occurred. (JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.)
---> Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at tuya_mqtt.net.Services.BrowserService.GetElementClientRectAsync(ElementReference element) in C:\Users\Volker.SPIELHAUS\source\repos\tuya_mqtt.net\tuya_mqtt.net\Services\BrowserService.cs:line 149
at tuya_mqtt.net.Pages.Logger.OnAfterRenderAsync(Boolean firstRender) in C:\Users\Volker.SPIELHAUS\source\repos\tuya_mqtt.net\tuya_mqtt.net\Pages\Logger.razor:line 30
--- End of inner exception stack trace ---
log @ blazor.server.js:1
pr @ blazor.server.js:1
(anonym) @ blazor.server.js:1
_invokeClientMethod @ blazor.server.js:1
_processIncomingData @ blazor.server.js:1
Ft.connection.onreceive @ blazor.server.js:1
i.onmessage @ blazor.server.js:1
be able to use a
HEALTHCHECK --interval=5s --timeout=10s --retries=3 CMD curl --fail http://localhost:80/healthcheck || exit 1
or
healthcheck:
test: curl --fail http://localhost:80/healthcheck || exit 1
interval: 10s
timeout: 5s
retries: 3
receive the following log message
info: tuya_mqtt.net.Services.TuyaCommunicatorService[0]
TuyaScanner: new device IP:192.168.3.152 ProdKey:keyehvch4nnwqscm
Unhandled exception. System.IO.InvalidDataException: Invalid header/prefix
at com.clusterrr.TuyaNet.TuyaParser.DecodeResponse(Byte[] data, Byte[] key, TuyaProtocolVersion protocolVersion)
at com.clusterrr.TuyaNet.TuyaScanner.UdpListener33Thread(Object o)
Hi,
I am running docker on a RPI4 and are getting the following error message when starting the container:
exec /usr/bin/dotnet: exec format error
Can anybody point me in the right direction, where the problem might be? :) Cheers!!!
executing docker run --rm -v /tuya_data:/app/DataDir -p 9999:80 -p 6667:6667/UDP -p 6666:6666/UDP --name my_tuya_mqtt_client volkerhaensel/tuya_mqtt.net
in a arm64 instance results in
exec /usr/bin/dotnet: exec format error
MQTT seems not to reconnect after the server was stopped
reopen individial issues from #15
under Tuya Devices -> Scanned network devices:
add a button to manually search for new devices (in my case new devices do not show automatically in the overview)
add the device name for easier identification of the device
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.