[RELEASE] Sonoff (Connect)


#82

All the lights turned off at 11:00 pm which was what I have setup in the Simple Lighting. And all the lights came on this morning at 4:50 am, which is correct. They all seem to be keeping the 100% setting. However, in the logs, there is still this error showing up for all of these lights:

errorjava.lang.ArrayIndexOutOfBoundsException: null (parse)


#83

@ericm This is from hubitat support: "I took a look at your logs and noticed that your "SmartLife RGBW Controller" is spinning out control, throwing the error you've pointed in the other ticket (Caught Exception while running parse method of device SmartLife RGBW Controller
java.lang.ArrayIndexOutOfBoundsException: null) every few milliseconds. At this rate, your hub will soon start to slow down."

Anyway to fix this?


#84

As this thread applies to Sonoff and not smartlife, which has not been officially ported to HE, maybe you want to move this over to the thread about smartlife instead.

Or you can try to fix it yourself with this info.


#85

Thanks, I thought this was also dealing with the Smartlife RGBW stuff. I thought that the device and controller apps were already fixed up for hubitat. I will look at the links that you have given but I am not a programmer of Groovy.


#86

I haven't had a chance to look at what is causing the parse error, but messages should only be parsed when you control the LEDs or to whatever the reporting interval is set to (I think the default is 60 seconds).

Would anything be trying to frequently change the color or turn it on / off?


#87

Some of the controller reports are being seen incorrectly by the hub. I've filtered out those reports in the driver.

I still don't understand why you are getting so many of these reports. I only get 1 per minute based on the report interval config in the firmware. Did you build the firmware yourself or did you download it from github?


#88

I took this from your github. Do I need to update the driver then?


#89

I updated to your latest and it seems to have gotten rid of the error so far. Thanks! I will watch it for a while and see if it continues without the errors.


#90

Hi all,

I'm thinking of buying several of the Sonoff Basic Smart Switches in the GearBest sale - £3.96 each with free P&P!

Can anyone confirm to me that they can be controlled locally via LAN? (I presume with static/reserved IP's?)

Cheers,
Mark


#91

Yup...using the custom firmware listed here or Tasmota.


#92

One of my Sonoff TH16 just went offline today. It was showing the LED on that it was connected to WiFi but it wasn't responding to HE. I did a reset on it by pressing the button down for 60 seconds which allowed me to reenter the "configme" password so to reconnect to it as an access point so that I could reconfigure the WiFi connection. I have been unable to reconnect with WiFi. It allows me to select the WiFi I want to connect to and I can add the password and it saves the credentials then attempts to connect ESP to network.

It kind of gets locked up at the point where it is trying to connect but fails. Is there any hope of bringing this back to reconnecting or do I need to re-flash or something?


#93

Weird, I haven't seen that before. Might want to reboot your router first. Then maybe a re-flash.


#94

Hi @ericm, I couldn't find this little bit of info listed anywhere in this thread so I just thought I would share something I spent a couple hours tracking down today. This might be REALLY obvious to people with more knowledge/experience but I had no idea this was true.

After setting up my Sonoff's (all basics) with your firmware I successfully paired with the connect app and could control devices fine. At some point after doing so, I renamed the devices to something more meaningful to me after assigning them static IPs in the firmware (to reduce my DHCP reserved list). Well, unbeknownst to me, that really screwed things up. I didn't know it until the recent update started logging unrecognized messages but I was getting a TON of them. They looked like this:

2018-12-30 12:57:27.110 pm [warn](http://192.168.1.12/installedapp/configure/1)Received data from 192.168.1.109, no matching device found for 192.168.1.109, C0A8016D:C019, DC4F22141A14 or C0A8016D.

They would occur at the reporting interval set up in the firmware for reporting interval. So, I tried several different things to fix this but nothing seemed to work. So, I gave up and just re-discovered devices in Sonoff connect and that solved everything. No more error messages. Also, my reporting for local changes on the device outside of Hubitat is working again (which I didn't even know was broken)!!! So, little tip for the uninitiated like me...finish your setup of the device itself BEFORE using the connect app to add your devices. Will save you some headache in the long run. :smiley:


#95

@Ryan780 Thanks for the info. The SmartApp is supposed to take care of ip address changes so that is weird that it wasn't doing that for you. I use DHCP and don't have reservations setup for my devices, but maybe they haven't been assigned a different IP. I'll have to look into it.


#96

I think it was the naming that actually screwed it up. The IP addresses didn't change for mine either. They just went from DHCP to static. It could also be a function of my wacky Netgear router. Wouldn't be the first time.


#97

Just wanted to share that I was also having problems with the "no matching device found for ..." message for 3 of my 7 Sonoffs. I deleted all my devices and tried to rediscover them (found 5 of 7, and installed 2 manually). I got the same warning messages with the manual ones, so I deleted them and continued to find them with discovery. After about 20 minutes, the app found the 2 and I was able to use them without any warning messages. One of the 5 initially discovered Sonoffs had issues with a null MAC address which generated errors, so I deleted it and rediscovered it multiple times before a MAC address was showing on the device characteristics. As of today, I have all 7 Sonoffs (5 basic, 1 TH, and 1 POW all running on Eric's firmwares) working ok. One thing I did do for all devices was to reboot them (via their web interface) just prior to app discovery. Hope this helps others out there with similar issues.


#98

@ericm any chance you have an update to the Sonoff TH? I've flashed your firmare and I get nothing. If I flash the Releases · arendst/Sonoff-Tasmota · GitHub sonoff.bin I get wifi access and can controll through the web interface.


#99

@ericm Update for everyone if you're having trouble directly flashing the eric's firmware. I was able to OTA flash his firmware over the Sonoff-Tasmota sonoff.bin and it now works. Eric, Thank you for all your work on this project!


#100

Hey @damon.dinsmore, I think the problem is that Sonoff (and other manufacturers) have changed how the SPI communicates in the esp8266 from QIO to DOUT. My firmwares have been compiled using QIO, but flashing applications such as NodeMCU flasher can change it on the fly during the flashing process. The NodeMCU flasher can be found here:


#101

@ericm Thank you for that information. I will be ordering more of these soon and will give it a try.