-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request to support TH16/Pow Tasmota model #6
Comments
Thanks for posting this data :) Does the sensor data get posted periodically, or do you have to query the device for it? |
The sensor roughly posts an update every 5 minutes or so using the tele topic.
See below for a continuation of the console log
18:24:54 MQT: homeassistant/switch/TH16/config = (retained)
18:24:55 MQT: stat/TH16/RESULT = {"POWER":"OFF"}
18:24:55 MQT: stat/TH16/POWER = OFF
18:25:03 MQT: tele/TH16/STATE = {"Time":"2018-03-02T18:25:02","Uptime":"0T00:00:19","Vcc":3.151,"POWER":"OFF","Wifi":{"AP":1,"SSId":"TGV","RSSI":66,"APMac":"60:A4:4C:DC:F8:78"}}
18:25:03 MQT: tele/TH16/SENSOR = {"Time":"2018-03-02T18:25:03","AM2301":{"Temperature":22.6,"Humidity":32.4},"TempUnit":"C"}
18:30:10 MQT: tele/TH16/STATE = {"Time":"2018-03-02T18:30:10","Uptime":"0T00:05:19","Vcc":3.160,"POWER":"OFF","Wifi":{"AP":1,"SSId":"TGV","RSSI":60,"APMac":"60:A4:4C:DC:F8:78"}}
18:30:10 MQT: tele/TH16/SENSOR = {"Time":"2018-03-02T18:30:10","AM2301":{"Temperature":22.6,"Humidity":32.4},"TempUnit":"C"}
On 2 Mar 2018, at 18:31, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
Thanks for posting this data :)
Does the sensor data get posted periodically, or do you have to query the device for it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVHfNPCmQazB0mneVDR9H3oxO8u6_ks5taYHogaJpZM4SaO05>.
|
I have both of these devices sitting unused so can test if needed (Have DS18B20 sensor for the TH16) |
In terms of support for these devices, I was thinking about:
Anything else? |
I would already be thrilled with this support.
If its not too much trouble, I would also like to see support for the SHT3X and PMS5003 sensors to be also included.
Note: The PMS supports 3 different PM sizes, homey only supports just one (PM2.5 if I remember correctly)
On 2 Mar 2018, at 20:34, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
In terms of support for these devices, I was thinking about:
* The ability to show the temp/humidity values on the device's mobile card
* Same for power usage (I'll have to check which capabilities Homey supports)
* The ability to use those values as tags/tokens in flows
Anything else?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVLSpKDP-uSR_TyVQQK_wXBpkmMRYks5taZ6qgaJpZM4SaO05>.
|
@Asinke can you send an MQTT command to your TH16 device and see what it sends in response? The topic to send to is Preferably for all the sensors that you have. |
Hi Robert,
This the response I get:
19:04:18 MQT: stat/TH16/RESULT = {"GPIO1":"0 (None)","GPIO3":"0 (None)","GPIO4":"0 (None)","GPIO14":"2 (AM2301)”}
On 5 Mar 2018, at 13:10, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
cmnd/TH16/gpio
|
Thanks :) If you can do the same for any other sensors you have? The more info I have, the easier it will be to implement. |
I'm especially interested in the SHT3X sensor, because that's one that isn't mentioned in the list for the |
Hi Robert,
I don’t have a sensor configured with the SHT3X or PMS5002 sensors at the moment.
I see what you mean about the SHT3X sensor, you can’t select it from the module’s GPIO menu.
The DHT11, DHT12 and SHT3X sensors however are all pin compatible with different tolerances for accuracy.
Before the weekend, I don’t have the time available to assemble, configure and test a Tasmota/Sonoff module with these sensors.
Configuring a DH11 sensor (without actually being connected) yields following output. Of course the readings are invalid, but I guess its the response you’re looking for?
19:07:20 MQT: tele/TH16/SENSOR = {"Time":"2018-03-06T19:07:20","DHT11":{"Temperature":0.0,"Humidity":1.0},"TempUnit":"C"}
On 6 Mar 2018, at 16:21, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
If you can do the same for any other sensors you have? The more info I have, the easier it will be to implement.
I'm especially interested in the SHT3X sensor, because that's one that isn't mentioned in the list for the gpios command (cmnd/sonoff-rf-bridge/gpios).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVPWWwf06wKyGlUXGx9pDC29c7kykks5tbqlqgaJpZM4SaO05>.
|
No worries :) I'm mostly interested in the result of A bit of background: the capabilities a device can support on Homey can't be changed after the device has been created. So during the pairing phase, I have to query the device (using the aforementioned MQTT topic) to check which sensors it has attached, and I maintain a list of sensor names ("DHT11", "AM2301", ...) and the capabilities they provide. For now, I'll assume that the sensor name will be "SHT3X" and that it will provide both temperature and humidity values. |
If time permits, i will heat up my soldering iron in the weekend and connect a SHT3X sensor which i can use afterwards for testing your updated app as well!
Looking at the Tasmota documentation i think its safe for now to assume the sensor name will indeed be SHT3X
On 6 Mar 2018, at 19:38, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
No worries :)
I'm mostly interested in the result of cmnd/TH16/gpio with an SHT3X attached, because that's the endpoint I'm using to detect which sensors are attached to a device during pairing and where I add the correct Homey capabilities to the device (measure_temperature, measure_humidity, etc).
A bit of background: the capabilities a device can support on Homey can't be changed after the device has been created. So during the pairing phase, I have to query the device (using the aforementioned MQTT topic) to check which sensors it has attached, and I maintain a list of sensor names ("DHT11", "AM2301", ...) and the capabilities they provide.
For now, I'll assume that the sensor name will be "SHT3X" and that it will provide both temperature and humidity values.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVCn370M6O6DI4jubGuSJ-UONki-Sks5tbte5gaJpZM4SaO05>.
|
I ordered a POW and a TH10, I'd rather test the devices myself before I release a new version of the app that doesn't work properly. Out of interest: are you running v3.0.0 (the current beta) of the app? I'm interested in hearing if it works, because it was a pretty big release in terms of changed (I rewrote the part that deals with the MQTT server). |
Hi Robert,
Did you order them from China, in that case it may take a while depending on the chosen vendor!
I’m running the latest stable release. will look into V3.0 beta soon.
BTW. I’m willing to beta test your updated App before you release it.
Arthur
On 18 Mar 2018, at 15:01, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
I ordered a POW and a TH10, I'd rather test the devices myself before I release a new version of the app that doesn't work properly.
Out of interest: are you running v3.0.0 (the current beta) of the app? I'm interested in hearing if it works, because it was a pretty big release in terms of changed (I rewrote the part that deals with the MQTT server).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVAExw4J4NWYdVvOp2rr1oPzp_EoLks5tfmjKgaJpZM4SaO05>.
|
I did, and I know :) Typically it takes a week or two.
I'll see if I can wrap up the sensor code so you can test, although it would require some experience with Github and side-loading Homey apps (but I'll explain). |
As a real work usage case, I'm wanting to monitor a water pump that comes on for 30 seconds 4 times a day. If it's on for more than 60 seconds I want to turn off the relay - do you think that would be possible via Homey? |
It would obviously require a solution where the controlling mechanism for the pump notifies Homey when the pump is turned on and off, but if that's possible, one option would be to start a countdown timer (using the Countdown app) for 60 seconds, and add two triggers: for when the pump is turned off (in which case the countdown timer is cancelled), and for when the countdown timer has triggered (in which case the relay should be turned off). |
The TH10 and TH16 devices are supported as of v4.0.0, which I just submitted for approval as a beta release. May take a few days for Athom to publish it. For now, only sensors that support temperature and/or humidity are supported. |
Hi Robert,
Great, looking forward to testing this new version.
Arthur
On 3 Apr 2018, at 14:52, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
The TH10 and TH16 devices are supported as of v4.0.0, which I just submitted for approval as a beta release. May take a few days for Athom to publish it.
For now, only sensors that support temperature and/or humidity are supported.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVGXL9aNLxye-_RyNUdicp-97YGHgks5tk3B_gaJpZM4SaO05>.
|
Version 4.0.1 (beta) was just published to the Homey app store. |
@Asinke have you had a chance to test with different sensors attached? |
@robert Oeps I missed out on your last message during my holidays. Now winter is coming I started my first project again. This time a sonoff basic with Tasmota and 6 DS18B20 temperature sensors. I noticed these are not yet supported by the app. Would it be possible to add this sensor to the driver? I can supply whatever information you need. Below you'll find an extract from the MQTT broker log: 20181103-14:27:58 Packet published {"Time":"2018-11-03T14:27:46","Uptime":"20T05:14:47","Vcc":3.160,"POWER":"OFF","Wifi":{"AP":1,"SSId":"TGV","RSSI":58,"APMac":"B0:4E:26:24:B2:C7"}} |
@Asinke thanks for the data, useful to see how data for multiple sensors is being transmitted. I'm working on a "generic" device driver for devices like this, where the driver will try and sniff out the capabilities of a device on its own, instead of assuming a fixed set of capabilities like the other drivers do. Will hopefully push a beta with that driver within the next two weeks or so. |
Hi Robert,
Sounds awesome, with limited time available i’m always willing to test.
BTW. I wired this project to my underfloor heating system. Provides really good insights into how to best tune this system.
On 3 Nov 2018, at 14:50, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
@Asinke<https://github.com/Asinke> thanks for the data, useful to see how data for multiple sensors is being transmitted.
I'm working on a "generic" device driver for devices like this, where the driver will try and sniff out the capabilities of a device on its own, instead of assuming a fixed set of capabilities like the other drivers do.
Will hopefully push a beta with that driver within the next two weeks or so.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVMrMOsxBsX391CDjpsRk7PMv67Bwks5urZ8ygaJpZM4SaO05>.
|
Hello |
@Tabe1 the driver for the original firmware doesn't support any sensors, it only supports the on/off capability of the device. For sensor support, the Tasmota firmware is required. |
@Asinke could you do me a favor and send an MQTT command to that Basic with 6 sensors? Topic: It should respond with a message that contains the sensor configuration. |
Got this from the console, looks truncated though
5:21:10 CMD: cmnd/sonoff2/status 10
15:21:10 MQT: stat/sonoff2/STATUS10 = {"StatusSNS":{"Time":"2018-11-09T15:21:10","DS18B20-1":{"Id":"02029177302D","Temperature":24.7},"DS18B20-2":{"Id":"021391771071","Temperature":23.6},"DS18B20-3":{"Id":"0219917770C4","Temperature":23.0},"DS18B20-4":{"Id":"021991779F8A","Temperature":23.8},"DS18B20-5":{"Id":"031760055EFF","Temperature":25.4},"DS18B20-6":{"Id":"0417A0ADACFF","Temperature":23.8},"Temp ...
Looking at the MQTT broker log, i get this:
20181109-15:21:10 Packet published {"StatusSNS":{"Time":"2018-11-09T15:21:10","DS18B20-1":{"Id":"02029177302D","Temperature":24.7},"DS18B20-2":{"Id":"021391771071","Temperature":23.6},"DS18B20-3":{"Id":"0219917770C4","Temperature":23.0},"DS18B20-4":{"Id":"021991779F8A","Temperature":23.8},"DS18B20-5":{"Id":"031760055EFF","Temperature":25.4},"DS18B20-6":{"Id":"0417A0ADACFF","Temperature":23.8},"TempUnit":"C"}}
On 9 Nov 2018, at 15:03, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
cmnd/XXX/status
|
Thanks, very useful! |
@Asinke and another request, this time for |
17:40:44 CMD: cmnd/sonoff2/gpio
17:40:44 MQT: stat/sonoff2/RESULT = {"GPIO1":"0 (None)","GPIO3":"0 (None)","GPIO4":"0 (None)","GPIO14":"4 (DS18x20)"}
On 11 Nov 2018, at 14:56, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
cmnd/XXX/gpio
|
So you have 6 DS18B20's connected to GPIO14? Didn't even know that was possible 😅 |
Wonderful world of 1Wire :-). I have 2 more on order.
You need to build your own bin from tasiota source with Below setting enabled
#define USE_DS18x20 // Optional for more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
On 11 Nov 2018, at 20:39, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
So you have 6 DS18B20's connected to GPIO14? Didn't even know that was possible 😅
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVG0WS5mvfZz6lzt6GaHExAYK1wstks5uuH0FgaJpZM4SaO05>.
|
Oh now I understand what the |
Little update: this might be more difficult than I anticipated. The problem is that I want to be able to create a "generic" Tasmota driver that will automatically determine which capabilities a Sonoff device has. I have a version of such a driver that works, provided that there is no overlap in capabilities between sensors, meaning that if a device has two temperature sensors attached to it, the Homey device will have only one Now that I realise that it's perfectly possible to have capability overlap (6 temperature sensors on one device 😅), I have to consider going down an entirely different path: create a So I additionally need to store some sort of lookup table in the pairing information that gets consulted whenever a sensor updates its value. In other words, it may take more time than I hoped. |
Thanks for the update. I do understand the complexity and the extra effort required. Hopefully you’ll find this project challenging enough to continue development on.
On 12 Nov 2018, at 14:15, Robert Klep <notifications@github.com<mailto:notifications@github.com>> wrote:
Little update: this might be more difficult than I anticipated.
The problem is that I want to be able to create a "generic" Tasmota driver that will automatically determine which capabilities a Sonoff device has.
I have a version of such a driver that works, provided that there is no overlap in capabilities between sensors, meaning that if a device has two temperature sensors attached to it, the Homey device will have only one measure_temperature capability, and updates from any of the sensors will update the capability value.
Now that I realise that it's perfectly possible to have capability overlap (6 temperature sensors on one device 😅), I have to consider going down an entirely different path: create a measure_temperature capability for every sensor. That's something that Homey supports, but the additional difficulty is that I need to keep track which sensor is responsible for which capability.
So I additionally need to store some sort of lookup table in the pairing information that gets consulted whenever a sensor updates its value.
In other words, it may take more time than I hoped.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AeicVDuE629GSWb3bx8SVTF5PNRaJ9Jnks5uuXRUgaJpZM4SaO05>.
|
Hi Robert, Ould it be possible to support Sonoff TH16 and Pow modules with Tassmota firmware in addition to already excellent support?
Documentation the the MQTT/JSON responses can be found here: https://github.com/arendst/Sonoff-Tasmota/wiki/JSON-Status-Responses#am2301. (The TH16 model uses the AM2301 temp/humidity sensor)
Of course i'm willing to beta test the additional code, I did some local install in the past but i'm no programmer fo sure :-)
Here is part of the TH16 console log showing the MQTT responses:
00:00:09 DNS: Initialized
00:00:09 HTP: Web server active on TH16.local with IP address 192.168.0.99
18:24:54 MQT: Attempting connection...
18:24:54 MQT: Connected
18:24:54 MQT: tele/TH16/LWT = Online (retained)
18:24:54 MQT: cmnd/TH16/POWER =
18:24:54 MQT: tele/TH16/INFO1 = {"Module":"Sonoff TH","Version":"5.12.0","FallbackTopic":"TH16-1","GroupTopic":"sonoffs"}
18:24:54 MQT: tele/TH16/INFO2 = {"WebServerMode":"Admin","Hostname":"TH16","IPAddress":"192.168.0.99"}
18:24:54 MQT: tele/TH16/INFO3 = {"RestartReason":"Software/System restart"}
18:24:54 MQT: homeassistant/switch/TH16/config = (retained)
18:24:55 MQT: stat/TH16/RESULT = {"POWER":"OFF"}
18:24:55 MQT: stat/TH16/POWER = OFF
18:25:03 MQT: tele/TH16/STATE = {"Time":"2018-03-02T18:25:02","Uptime":"0T00:00:19","Vcc":3.151,"POWER":"OFF","Wifi":{"AP":1,"SSId":"TGV","RSSI":66,"APMac":"60:A4:4C:DC:F8:78"}}
18:25:03 MQT: tele/TH16/SENSOR = {"Time":"2018-03-02T18:25:03","AM2301":{"Temperature":22.6,"Humidity":32.4},"TempUnit":"C"}
The text was updated successfully, but these errors were encountered: