[RELEASE] Sonoff (Connect)


#102

Could someone please add Sonoff to this list.


#103

I've added them under LAN devices.


#104

Would your app work for over the air flashing of the Sonoff Touch? I can't post links but search github mirko SonOTA


#105

It should if you replace the image_arduino.bin file with one of my bin files. Having said that, it looks like newer Sonoff devices don't support this method though:

"ATTENTION: It appears SonOTA does not work with devices running current firmware"


#106

Do these drivers work for these 1, 2 or 3 gang switches?


#107

I'm actually not sure. The original Sonoff Touch works, but I haven't tested these new devices. I thought I remember hearing someone installing the 4ch firmware on the 3 gang device and it working, but can't say for sure.


#108

Tried to use for a new sonoff basic. Evidently the new ones are based on the ESP8285 Chip instead of the 8266. Tried to flash your firmware and tried to recompile....both didn't work. What version of the esp library do i need to build the software in the arduino ide? Or could you recompile for ESP8285? Spent 4 hours today trying to get this to work.


#109

You can flash the 8285 if you use the instructions in the post above:


#110

I am using the SmartLife RGBW Controller for my deck lights which has been working great until yesterday. I can access them via their IP's and the SmartLife RGBW app sees them but I can't turn them on. Nothing happens when I try to turn them on. And my Rules aren't working for them either. Now I did to an HE update yesterday to 2.0.7.112. There does seem to be an error in the logs:

2019-03-20 09:07:38.190 pm warnstartup failed:

General error during canonicalization: Expression [DeclarationExpression] is not allowed: (c = s.charAt(i)) at line number: 781

java.lang.SecurityException: Expression [DeclarationExpression] is not allowed: (c = s.charAt(i)) at line number: 781
at sun.reflect.GeneratedConstructorAccessor3623.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at com.hubitat.hub.executor.SecureASTCustomizerHub$SecuringCodeVisitor.assertExpressionAuthorized(SecureASTCustomizerHub.groovy:641)
at sun.reflect.GeneratedMethodAccessor18568.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at com.hubitat.hub.executor.SecureASTCustomizerHub$SecuringCodeVisitor.visitDeclarationExpression(SecureASTCustomizerHub.groovy:976)
at org.codehaus.groovy.ast.expr.DeclarationExpression.visit(DeclarationExpression.java:89)
at org.codehaus.groovy.ast.expr.DeclarationExpression$visit.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.ast.expr.MethodCallExpression$visit.call(Unknown Source)
at com.hubitat.hub.executor.SecureASTCustomizerHub$SecuringCodeVisitor.visitExpressionStatement(SecureASTCustomizerHub.groovy:728)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:42)
at org.codehaus.groovy.ast.stmt.ExpressionStatement$visit.call(Unknown Source)
at com.hubitat.hub.executor.SecureASTCustomizerHub$SecuringCodeVisitor.visitBlockStatement(SecureASTCustomizerHub.groovy:688)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
at org.codehaus.groovy.ast.stmt.BlockStatement$visit.call(Unknown Source)
at com.hubitat.hub.executor.SecureASTCustomizerHub$SecuringCodeVisitor.visitForLoop(SecureASTCustomizerHub.groovy:696)
at org.codehaus.groovy.ast.stmt.ForStatement.visit(ForStatement.java:49)
at org.codehaus.groovy.ast.stmt.ForStatement$visit.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.ast.stmt.ExpressionStatement$visit.call(Unknown Source)
at com.hubitat.hub.executor.SecureASTCustomizerHub$SecuringCodeVisitor.visitBlockStatement(SecureASTCustomizerHub.groovy:688)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
at org.codehaus.groovy.ast.stmt.BlockStatement$visit.call(Unknown Source)
at com.hubitat.hub.executor.SecureASTCustomizerHub.call(SecureASTCustomizerHub.groovy:518)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1065)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyClassLoader$parseClass.call(Unknown Source)
at com.hubitat.hub.executor.ExecutorHelper.parseDevClass(ExecutorHelper.groovy:274)
at sun.reflect.GeneratedMethodAccessor647.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
at com.hubitat.hub.executor.ExecutorHelper.loadDriverClass(ExecutorHelper.groovy:322)
at com.hubitat.hub.executor.ExecutorHelper.getCachedDeviceClass(ExecutorHelper.groovy:302)
at sun.reflect.GeneratedMethodAccessor495.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at com.hubitat.hub.executor.ExecutorHelper.getDeviceExecutorScript(ExecutorHelper.groovy:235)
at com.hubitat.hub.executor.ExecutorHelper$getDeviceExecutorScript$7.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at com.hubitat.hub.route.DeviceRoute.getDeviceUpdater(DeviceRoute.groovy:683)
at sun.reflect.GeneratedMethodAccessor2047.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at com.hubitat.hub.route.DeviceRoute.getDeviceSettings(DeviceRoute.groovy:692)
at sun.reflect.GeneratedMethodAccessor2046.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at com.hubitat.hub.route.DeviceRoute.buildModelForDeviceEdit(DeviceRoute.groovy:428)
at sun.reflect.GeneratedMethodAccessor2044.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at com.hubitat.hub.route.DeviceRoute$_configureDevicePages_closure7.doCall(DeviceRoute.groovy:220)
at sun.reflect.GeneratedMethodAccessor2043.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at groovy.lang.Closure.call(Closure.java:414)
at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:54)
at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
at com.sun.proxy.$Proxy25.handle(Unknown Source)
at spark.RouteImpl$1.handle(RouteImpl.java:72)
at spark.http.matching.Routes.execute(Routes.java:61)
at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:130)
at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:61)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:564)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
at java.lang.Thread.run(Thread.java:748)

Any idea what the problem could be?


#111

I found that you had done an update in the github. Thanks! It is working again!


#112

Can you point me in the right direction to get Sonoff Basic working? I have been searching with no sucess


#113

Did you check the very first post at the top?


#114

I've got your app and firmware installed, its awesome! Next is iFan2. Could you do the community a solid and setup your github to work with App Watchdog? One thing i noticed right away that Hubitat was lacking is a way to identify when an app is updated. [RELEASE] App Watchdog


#115

There hasn't been any new versions of this app in a long time and I don't believe there is any new development work going on. This is just to connect the Sonoff devices.


#116

I tried using the Sonoff POW firmware instead of the basic as it has the power monitoring features which don't appear to be in the Sonoff Basic firmware. Although the initial flashing seemed to go okay; as soon as I enter my ssid and passphrase and allow the config to save and do a restart, it seems to be bricked. I can see the device connected to the network and I can ping it, however if I try and connect to it, it refuses to connect. I've tried this with two plugs and it now appears both are bricked. The only way I can get back to the basic config screen is by forcing it off my network by restarting my router which then refers to it as "sonoff:macaddress" ssid which I can then connect to, but it's limited to device info and re-entering ssid and passphrase config.

Any suggestions on how I can fix this issue without having to break them open?


#117

Hi Shaun...welcome to Hubitat. Are you trying to flash Sonoff POWs or Sonoff Basics? Are they able to connect to HE?


#118

Hey @shaun, if you are trying to flash the Sonoff Basic with the firmware for the POW, then it will definitely cause problems. If you can't get to the firmware update web page, then you will probably have to flash over the rx / tx terminals.


#119

Thanks Ryan, I'm keen to get started with Hubitat. The switches I am using are actually https://www.kogan.com/au/buy/kogan-smarterhome-smart-plug-energy-meter/ it works with the sonoff basic firmware but doesn't work with the power monitoring in Hubitat.


#120

Hey @ericm it's actually based on the esp8266 but it looks like the POW firmware was incompatible and I will have to open it up to flash it. :frowning:


#121

Well, it's not a sonoff so I don't know that the sonoff firmware would work with it.