BrettSheleski / SmartThingsPublic

36 stars 23 forks source link

Update tasmota.groovy #35

Closed jmserranos closed 4 years ago

jmserranos commented 4 years ago

Corrections for proper display of Friendly Name, Group topic and Up time values

BrettSheleski commented 4 years ago

So switching to single-quotes works for this? I assumed it didnt matter between single and double-quotes. I'll merge it in.

MacRoy commented 4 years ago

Hi BrettSheleski.

Thanks a lot for you're device handler for Smart Things. Could you please do so I can get 4 buttons separately instead of one button as it is now? I talk about the SmartThings App. When you open the app you have a green ON button, and if you click on that, then you see 4 buttons. I want the 4 buttons to be seen in the front of the app, as with the one with green ON button. I hope you understand what I mean.

Best regards Roy

BrettSheleski commented 4 years ago

If you are talking about getting the 4CH module, then it should working as I think you would want. Make sure you configure Tasmota to be the 4CH module before setting up the Tasmota device handler in SmartThings (also be sure to have the Tasmota-Power device handler installed in the SmartThings IDE).

After doing so you should be able to setup your Tasmota device in SmartThings and it'll spawn 4 Tasmota-Power child devices where each one will control an individual channel.

MacRoy commented 4 years ago

Hi Brett.

Thanks a lot fore you're respons. Where do I found the Tasmota-Power device handler ? I use this file from you.

Original Sonoff 4CH Pro.zip Please could you give me a link that works so I can download the files that I need?

Best regards MacRoy

BrettSheleski commented 4 years ago

I have no idea how you managed to get that link or how it got there. I have a feeling this may be a leftover from before I refactored everything to use a master/child device handlers.

All my device handlers can be found here:

https://github.com/BrettSheleski/SmartThingsPublic/tree/master/devicetypes/brettsheleski

Specifically Tasmota-Power can be found here:

https://github.com/BrettSheleski/SmartThingsPublic/blob/master/devicetypes/brettsheleski/tasmota-power.src/tasmota-power.groovy

Ideally one would simply add my GitHub repo to their SmartThings IDE and making importing/updating from my GitHub repo really simple.

I'll see if I can throw some instructions together on how to do that.

BrettSheleski commented 4 years ago

While you're at it, you may want to read https://github.com/BrettSheleski/SmartThingsPublic/tree/master/devicetypes/brettsheleski/tasmota.src

MacRoy commented 4 years ago

Hi Brett. And thanks fore the files.

I have installed the files, but it is the same as before. I only have one button to be seen in the SmartThings, and in Google Home. Could you please make it to 4 buttons instead?

Best regards MacRoy

MacRoy commented 4 years ago

Hi Brett.

Would be grateful if I could get an answer from you.

Best regards MacRoy

BrettSheleski commented 4 years ago

I think you have the old/wrong device handler installed.

Please follow the directions in the link I posted earlier to install both the "Tasmota" and "Tasmota-Power" device handlers (NOT the "Sonoff-Tasmota-4CH" handler, which I think you are attempting to get working).

MacRoy commented 4 years ago

Hi Brett.

And thanks a lot fore your respons.

I use this link from you, is that the right one? https://github.com/BrettSheleski/SmartThingsPublic/tree/master/devicetypes/brettsheleski

Best regards MacRoy

BrettSheleski commented 4 years ago

Please read this: https://github.com/BrettSheleski/SmartThingsPublic/tree/master/devicetypes/brettsheleski/tasmota.src

MacRoy commented 4 years ago

I have done exactly as it describes, but now inside from SmartThings the button is death, and it's not visible in Google Home at all. Isn't it supposed to show four devices in Samsung's control panel on the computer under devices? But there is only one. Likewise, it should be in both SmartThings and Google Home.

BrettSheleski commented 4 years ago

The device handler should spawn child devices which are able to individually control the different aspects of your device. It sounds like you're trying to use the Sonoff 4CH module. Therefore you should see 4 additional devices in SmartThings created by the "master" device which are able to control each of the 4 relays.

MacRoy commented 4 years ago

No I use Tasmota and Tasmota-Power device handlers as you reccomended.

MacRoy commented 4 years ago

Hi Brett!

Could it be that there is a difference between the Sonoff 4CH Pro and the Sonoff 4CH Pro Revision 2 that I have?

MacRoy commented 4 years ago

Hi Brett!

New information to you. I did a completely new installation, and removed all old settings and files, so now I see five (5) buttons were one (1) of them just called Sonoff 4CH Pro and have no function at all when you click on it. But now I have four (4) buttons that works, which I am very pleased with. Is there a possibility that you can either remove or hide the fifth (5) button? Because if I remove it from within SmartThings or Google Home, all the other buttons will disappear as well.

Best regards MacRoy

MacRoy commented 4 years ago

Hi Brett.

Would be grateful if I could get an answer from you regarding if you can either remove or hide the fifth (5) button? Because if I remove it from within SmartThings or Google Home, all the other buttons will disappear as well.

Best regards MacRoy

BrettSheleski commented 4 years ago

That's sort of a side effect of how the Device Handler is designed. Since Tasmota can be run on all sorts of different modules with different capabilities, the device that you create in SmartThings doesn't have any capabilities at all. Instead it looks at the configuration of the module to determine the module type (eg: Sonoff Basic, Sonoff TH, 4CH, RF Bridge, etc.) and also what is configured on the different GPIO pins and spawns the appropriate type and quantity of child devices. The child devices is what you actually interact with.

This way I do not have to create a different device handler for every module that comes to market.

Personally I don't think it's a big deal to have the extra device. Just ignore it. I tend to rename them to have the suffix "Controller". For example I have a Sonoff iFan02 module controlling my ceiling fan and defined a "Ceiling Fan Controller" device, which spawned a device I renamed to "Ceiling Fan Lights" (simple switch), and "Ceiling Fan" (toggle the fan speed to high/medium/low/off) devices.

So to answer your question, I don't intend to fix it. I just don't see a good way of doing so.

MacRoy commented 4 years ago

Hi Brett. OK! I understand. I can live with it. In any case, you should have a big thank you for your help and for your fine work, it is really appreciated!

Best regards MacRoy