[OBSOLETE] Sonoff, Sonoff TH, S20, Dual, 4CH, POW, & Touch Device Handler & SmartApp ($5 & $10 Smart Switches)

Botnet? Very comical, but think what you want. I have my reasons for maintaining the source, but why do I need to explain myself to you? This started out as a project for myself. I was impressed with the outcome so I decided to share it with others so they could benefit from it. I have given a lot to this community and I find it frustrating that some won’t be satisfied unless I give everything.

5 Likes

Thanks Mike
That was my problem ,i forgot that i have modified the dh for my th10 ,so i put back the original dh :grin:

I think the point others are trying to make is that given that so much of the ST ecosystem is open-source, and that so much of the community-developed stuff for ESP based devices is open-source, it sticks out like a sore thumb that you’re not releasing the source.

This is the first ESP8266 project I’ve seen (for Sonoff devices or otherwise) that didn’t have open source firmware. Some people will (right or wrong) assume bad faith from your choice. A little paranoia isn’t out of line given the state of IoT security. It’s certainly your prerogative to keep the source to yourself

I mean, it wouldn’t be rocket science to update your device handler to the command URL structure of the Sonoff-Tasmota firmware (which conveniently adds the ability to control the Sonoff devices with the MQTT protocol) if someone wanted to use your SmartApp/device handlers to provide the “glue” with SmartThings. /on becomes /cm?cmnd=Power%20Off, etc. The device discovery piece might be non-trivial, but that’s about the only special sauce I’m seeing at a glance.

I’m well aware of the atmosphere of the SmartThings community as far as code goes. I have dozens of device handlers and SmartApps that are available and have been here for a very long time. I suppose others in my shoes who may have commercial aspirations just keep their projects to themselves so that they don’t gain exposure in the community. Maybe that is where I went wrong. Not that I ever intend on making money on the Sonoff devices, I provide the community with a free and easy solution to integrate a cheap product into their smart home and do so gladly (minus those that are ungrateful or question my motives without any evidence). There is just a lot of overlap between these projects and others that myself and others may bring to the public in a commercial manner.

2 Likes

Any chance of future support for this new Sonoff device?

https://www.itead.cc/sonoff-rf-bridge-433.html

I have just bought one to play around with (as they are extremely cheap compared to similar devices)

Integration will throw SmartThings open to all sorts of ‘dumb’ wireless devices!

Also looks quite hackable - separate programming headers for the wireless and rf modules

Appreciate all of the work that you have done on the Sonoff devices! They are fantastic little products, and thanks to these device handlers, I am able to run them all over my home!

Apparently, I was thinking in the right direction - for people who would like an option with open source firmware running on their Sonoff devices, someone posted a device handler 5 days ago over on the sonoff-tasmota github pages. If only I’d thought of it sooner. :slight_smile:

Info and link to the creator’s github repo is at https://github.com/arendst/Sonoff-Tasmota/issues/656

I’m going to give it a whirl tonight.

2 Likes

just flashed a sonoff th but im not getting any led lights or SSID broadcast. ive tried powering via ftdi and mains. I tested the fuse and thats good. any ideas?

Yeah, I would like to. It is quite different from their other products so I will have to take a look at it. I will hopefully be getting one soon. Do you have any specific plans for it? I’m interested to see what people do with this product.

@Drew650 Hmmm, the button on the device doesn’t turn on/off the relay? I’m taking it this is the same FTDI you have used to flash other devices right?

Ungrateful? Because I don’t want to flash something that is potentially dangerous? Given the current state of IoT security a little paranoia is not just healthy. It is necessary.

Comical that you would create a botnet or comical that it is possible? It is very possible. It is easy if you are writing the firmware and giving it to individuals to flash. You know it would be extremely easy.

I don’t know who you are. You are an avatar on the internet. You are Eric M. You aren’t a corporation. There is no brand to protect. There are no assets to lose. There is no real risk to you from including malicious code in the firmware. I apologize if you take offense to that. It was never my purpose. The only logical decision that can be made by anybody using the firmware is to replace it with a firmware that is open source or a firmware that is attached to an entity with liability. You have no liability. I agree with you. That is where you went wrong.

And you HAVE given a lot to the community. That’s why I don’t understand your stance on this especially since you have said you won’t monetize it.

Why do you have to explain yourself to me? You don’t. But if you don’t there is no good reason for anybody to use your firmware. It’s not safe just because you say it is. I’ll get out of the thread and I’m sure you won’t miss me but I’m leaving my common sense here for everybody to see. I’m sorry you felt like you had to defend yourself. I’m sorry you didn’t release the source.

1 Like

Nope the button doesnt do anything either. Voltage is being shown past the fuse also. I did use the same ftdi that I have used to flash others successfully. I have another regular Sonoff I’ll try flashing to see though haven’t thought of having a bad ftdi. Thanks

I bought a pair recently that have the same problem.
Definitely something wrong with the device as I have
re flashed a half a dozen others without any problems.

I have 2 TH10’s flashed and using DS18b20 temp sensors. One measures my pool temp.(and turns the pump on/off) and the other the temp. in my solar collector. I have just changed my solar from rubber tubes to evacuated glass type collector. As I am still using the same pump it is causing problems with too much pressure so I have built an induction motor speed controller. The ultimate solution would now be to provide a variable voltage on TH10 GPIO4 (0-3.3v) so that the pump speed could be automatically varied corresponding to the heat of the solar system. I think I could do this myself but I have no idea how long it might take me. My 2nd idea would be to add a 4CH and modify it to produce 4 (or more) voltages for the speed control. Any input appreciated.

I didn’t intend the ungrateful comment towards you, interesting that you assumed so though. I think it is comical just because it would be a lot of work to get a few dozen (or however many) Sonoffs in the world with a botnet on them. What is the point and what would my motive be? It would be a huge waste of my limited time.

I know you are probably hurt because you aren’t getting your way, but come on. Coming into this thread just to toss slanderous accusations (without base) around is pretty childish. I have been contemplating distributing the source over the last couple of days, but now I am in a tough situation. Posting it now would seem like a cave and a reward for your disrespectful behavior. Like I have mentioned before I have had less and less time to work on these SmartThings projects and was thinking that it would be nice to have others take it off my hands. Especially since Sonoff has a few new products out that I’m not sure I can get around to.

2 Likes

Let me know how it goes. You’ve posted before that you have had success with other devices so it would be weird if the FTDI was suddenly bad.

just flashed an arilux controller successfully so ftdi is good. Still no luck with sonoff th10

Who did you intend it towards then? You were talking to me. I was going to move on until your last statement but you just don’t seem to know how to get yourself out of a difficult situation gracefully. You shouldn’t ever fire a shot to the back of somebody who has already turned around. I was never accusatory. I was never slanderous. I was polite. I was reasonable. I was logical.

Is there an IoT security issue? Yes.
Did I say that you put malicious code in your firmware? No.
Did I say to not trust your firmware (or any firmware) from unknown sources? Yes.
Did I call you names or use adjectives to describe your behavior that were impolite? No.

Did you call me names or use adjectives to describe my behavior that were impolite? Yes.

I think the person who has shown the greatest lack of respect by far is you. If you want to back up your claims of having no time to support the firmware the logical decision is to release the source. If you have no interest in monetizing the firmware the logical decision is to release the source. If you will not add enhancements to the firmware the logical decision is to release the source. If you have limited time to support the project the logical decision is to release the source. There is no logic in not releasing the source.

I avoided straight calling you out at first because you seemed to be a giving contributor to the ST community and I had high hopes because you previously mentioned you would release the firmware source when you had time (which posts you have seemingly redacted because, like I said, I can’t find those statements anymore). What it comes down to is you are being childish and unreasonable. For a community that is open and for a development platform that is open (and even the hardware platform) you are being absolutely and outrageously unreasonable. Get over yourself. You haven’t done anything incredible here and I was looking to save a handful of hours some night and not have to rewrite something that has already been created. Everything is trivial except the discovery portion and that doesn’t seem that non-trivial.

And not doing the right thing because somebody asked for it first? Completely logical. Completely.

Fire at me again if you want. Just remember if this thread gets moderated it doesn’t matter how it ends for me. I don’t have any skin in this community. But you lose quite a bit.

Have I now used adjectives to describe your behavior that were impolite? Yes.

1 Like

I don’t know if this is the best place to post, I might start a seperate thread for this.
The security concern pointed out above is concerning to me. I decided to test out the Tasmota. It supports 18 different Itead devices with only one version of the firmware needed. The Tasmota Github has tons of information on different methods of programming and all of the functionality of the firmware.
If anyone else wants to try it out, pushing the OTA update from the Sonoff firmware here worked for me which was super convenient. If that fails, then you would need to reprogram with your serial adapter.

The device handler here works great: https://github.com/BrettSheleski/SmartThingsPublic/blob/master/devicetypes/BrettSheleski/sonoff-tasmota.src/sonoff-tasmota.groovy
But it just does the basics of on/off/refresh. However it looks like adding the additional functionality for the other devices (temperature/voltage/etcetera) shouldn’t be too difficult, so I’m going to look into doing that.

3 Likes

SC is too short a search term, did this get anywhere, would like to add the same… I guess a number of parameters are not in ST though

I regret some of the things I said. I felt attacked by your posts. coerced even. I know some things get “lost in translation” in textual conversations, so maybe I shouldn’t have been, but I was. How it came across was you accusing me of having something malicious in my software and the only way to prove otherwise was to give you what you wanted. Again, maybe something lost in translation, but that is how I felt. Oh, and I really don’t remember the post you are referring to, but I assure you I didn’t go back and edit or remove it.

I was speaking of just a general ungratefulness, not you in particular. The other part of that statement about evidence was aimed at you though, but I probably could have omitted that. This project really may be something trivial to you, but it hasn’t been to me. Like I mentioned, it started out as something small. Just a single device that I thought worked really well. I wanted to share it with the SmartThings community. It grew from there and I added support for many devices and features at the request of others. Many, many hours have gone into it. There are great people here and a few that are now personal friends and I’ve tried to help as many people as I could (time permitting).

Speaking of time, I really have fallen behind in adding the devices and features people have been asking for. You brought up some good points that I am really considering. This may be something that I just can’t maintain by myself anymore. The two commercial projects that I am working on are in early prototyping and may not even be economically feasible. One of them is a totally different protocol so the programming overlap is minimal.

Anyway, I’m sorry if things got out of control. I took your words as a personal attack and could have handled it better. Your advice about being safe regarding iot devices is great advice. There are a lot of pre-compiled software, firmware, and other binaries out there that are safe, but a lot that are not. It is a good idea to be conscientious about things. I don’t have anything like that in my code, but you’re right, at this point you would just be trusting me and my position in this community. That might not be enough for you and there are lots of alternatives out there.

Hopefully this thread can return to something positive and constructive as it has been for a long, long time.

7 Likes

I started using Brett’s handler a couple days ago. I wasn’t getting status updates at first, but that appeared to magically fix itself within the 1st day.

I’ve got an untested handler for a Dual that I cloned from his code if someone wants to be a guinea pig - my Dual and Pow are on the slow boat from China right now. Grab the code from here: https://github.com/bdjohnson79/SmartThingsPublic/tree/master/devicetypes/bdjohnson79/sonoff-tasmota-switch.src - the non-dual handler in there is just a copy/paste of Brett’s code I’m using as my starting point.

It looks pretty straightforward to add in the rest of the devices - just need to add functions to send the right URL commands to your switches.

1 Like