SmartThings Community

Help with new DH for Aust 3 Gang light switch - catchall included


(Tiges2017) #61

Hi Netsheriff, I have installed both your DH v3.0 and Smart App 1.1. Have also created the virtual switch and can control the 3 individual buttons, so thats all good…however, switch still is not reporting back its state to the ST ? Any ideas?


(Max Tay) #62

Got a xmas light effect using an earlier version of the DH. Replaced the DH and works fine now.


#63

Dunno.

Make sure you have properly published the DTH and that it is associated with your device type.

Check the logs and see if you have any errors.


(Max Tay) #64

Having flashing lights effect to one of the 3 switches yesterday. This is a week after updating the DH to the latest version from here. Any clue?


#65

Sounds like the DTH for the actual light is playing up not the switch. Do you have smart light bulbs as well?
Sounds like OSRAM Lightify bulbs that can pretend to be Christmas tree lights. Try one of the other DTHs to fix that.


(Max Tay) #66

They are not smart light bulbs. BTW resolved by changing the from virtual switch to simulated switch DH for the individual relay.


#67

Yeah, see my previous post, you need to use simulated switches. You can even make an extra simulated switch to turn all 3 gangs on or off at once.


(Max Tay) #68

Do you know of any other supplier for similar type of zigbee smart wall switch?


#69

For Australia there are bugger all smart switches zigbee, z-wave or wifi available that have been approved for use here.

Negotiations are currently underway for Sonoff T1 switches to be approved for use in Au.
Hopefully that will not be too far away. Sonoff wifi switches can be flashed with a number of different firmwares including one for use with Smarthings. There are new rectangle US/Au switches that can be flashed with the 4Ch firmware and used with smartthings. https://www.itead.cc/sonoff-t1-us.html

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


(Max Tay) #70

The problem with its wall switch is the size of the box which is slightly bigger than the old fixed wall switch metal frame. In short it can’t be fitted into the old type metal frame.


(A A) #71

Here is an attempt at formulating a recipe to follow for installation of this switch. Please feel free to critique/edit.

Steps:

  1. Log in to SmartThings Developer Tools https://graph.api.smartthings.com/
  2. Click Locations. Then in the table select the (hub name). Then click on the “Hubs . (hub name)”
  3. Ensure Zigbee: “OTA enabled for all non-light devices” and “Unsecure rejoin: true”. If this is not the case click “View Utilities” and edit ZigBee Utilities appropriately.
  4. Click My Locations. Then Click events. Then click all.
  5. Power Up the 3 Gang Switch. Press the small button till red light appears. Please note that the hub must be physically close to the switch.
  6. Open Smartthings Classic App on your phone and Add a thing. The red light on 3 gang switch turns off suggesting that the switch has been added on the SmartThings hub.
  7. Check the Events in step 5. look for recent zb_join events. Click on the date / time to the left of the zigbee_join event and view details. Eg: zbjoin{“dni”:“9CF0”,“d”:“00124B000AE76565”,“capabilities”:“8E”,“endpoints”:[{“simple”:“10 0104 0002 00 04 0000 0005 0004 0006 010000”,“application”:"",“manufacturer”:“Feibit Inc co.”,“model”:“FB56+ZSW1GKJ1.7”
  8. Create a device in SmartThings by clicking on My Devices and then +New Device button (right upper) to create a new device.
  9. Fill as below: Eg:[Name: , Label: , Zigbee Id: 00124B000AE76565 from the above event, Device Network Id: 9CF0 For type select ZigBee Switch for now. Version: Self-Published. Please select your location and hub. The click on the create button.
  10. Create a device handler by clicking on My Device Handlers and on the next page the +Create New Device Handler button. On the next page click on tab From code. Paste in the most current code for the device handler from reference 2. Then click the Save button. Then click the Publish button. Select For me.
  11. Now Create the Smart App by clicking on My SmartApps and on the next page the +New SmartApp button. On the next page click on tab From code. Paste in the most current code for the device handler from reference 2. Then click the Save button. Then click the Publish button. Select For me.
  12. Now edit the device type in My Devices. Click on the name of the you created in step 8. Click on Edit at the bottom and select the type as “HUI ZigBee Wall Switch 3 Gang V.x.x”. The click Update.
  13. Now Create 3 virtual switches as per reference 3 (Video); similar to process in step 8. Please ensure that the settings are as follows: Name and label , Type Simulated Switch, Version Published, Hub: .
  14. Now on the SmartThings App go to Marketplace > SmartApps > +My Apps and load “Hui Wall Switch Binder…”
  15. Now select switch created in step 8 and the first switch and the others as 2nd to fourth switches. Save and you are done.
    Enjoy lighting :slight_smile:

(A A) #72

References:
How to add Nue ZigBee Switches to SmartThings Hub: pdf from http://3asmarthome.com/downloads
Help with new DH for Aust 3 Gang light switch - catchall included
https://www.youtube.com/watch?v=ro2CisLBLjI&feature=youtu.be


(George) #73

anyone notice that with these devices, nothing appears in the IDE live logs…

I have none of my 3a light switches appearing in the IDE logs. I can still control them all, but nothing appears. Very weird. Not sure why…


(George) #74

What DH are you guys using for the single gang 3a light switch? I was using the standard zigbee one, but it wasnt producing anything in the IDE logs. I changed to a home-cooked one (with some errors), and now changed back to the default (labelled: ZigBee Switch) and it’s producing log events again. I’ll see how long it lasts.


#75

I’ve had some weird interactions with these sockets.
Anyone able to comment on the following behaviour?

I have 3 Virtual Switches VS1 VS2 and VS3 mapped via the smart app and the device ‘Bathroom Socket’ mapped to the device handler.
I have an MQTT broker set up inbetween letting homeassistant know of the status and also being able to remotely manage.
When I press the physical switch it just decides to flip the same one on and off and I’m pretty sure it’s due to the switch binder as when I remove the link between the socket and the virtual switches it’s all fine.
So I have the feeling that the device handler and the smart app can’t tell the state and they’re fighting each other?
Anyone able to help?
I’ve tried both handlers/apps from netsheriff and georgecostanza to no avail.


Also if you have any improvement suggestions to my hassio config I’ll add that below for comment
config.yaml

mqtt:
broker: localhost
port: 1883
username: username
password: password
client_id: hassio
keepalive: 60
discovery: true

light:

  • platform: mqtt
    name: “Bathroom Light”
    state_topic: “smartthings/VS1/switch”
    command_topic: “smartthings/VS1/switch”
    payload_on: “on”
    payload_off: “off”
    optimistic: false
    retain: true

smart things bridge addon

{
“broker_host”: “localhost”,
“broker_port”: 1883,
“preface”: “smartthings”,
“state_suffix”: “”,
“command_suffix”: “”,
“login”: “username”,
“password”: “password”,
“bridge_port”: 8080
}


MQTT Broker Addon

{
“plain”: true,
“ssl”: false,
“anonymous”: false,
“logins”: [
{
“username”: “username”,
“password”: “password”
}
],
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}


#76

This happens almost daily now :frowning:

Virtual Switch Events

3 Gang Socket Events

Any idea on how to prevent or fix this?
To me it looks like the switch binder is playing up?


(Callum) #77

Hi There

i was hoping that someone would have the code for the 2 gang switch (Sorry have no clue about code)

Thanks


#78

#79

So it does look like my issue with the lights going crazy christmas light style occurs when you press the switches on/off too fast and when they are linked to a virtual switch. The states don’t seem to line up on smartthings compared to the physical switch and they fight each other =\

I have a feeling that restructuring the device handler may help but I’m quite new to smart things so not sure how to integrate it - or if it will even work.
I’m thinking the following;

Create a queue var ie. queuedcommand = 0

Create a validation function ie. CheckState(switch,newstate) { if (queuedcommand = 1) { runIn(1,CheckState(switch,newstate)) } if queuedcommand = 0 then queuedcommand = 1 | delay(250) | if (refreshedstate != newstate) createEvent(name: “switch”, value: “on”) | queuedcommand = 0 }

When the device handler registers an on/off event ie switch 1 sending on, force a refresh() and then shoot off CheckState(0x10,1)

It would add a refresh of state, small delay to confirm and queue for future checks - thoughts?


#80

Just to update,

Made some logic changes to the Switch Binder Smart App which now stops the ping-ping christmas lights effect.
Issue was indeed the physical switch and virtual switch battling each other.

End Result:

Nue Zigbee 1, 2 and 3 gang Light Switches connected to Smart Things
Home Assistant MQTT Broker (https://www.home-assistant.io/addons/mosquitto/)
Home Assistant Smarter Things MQTT Bridge (https://github.com/stjohnjohnson/smartthings-mqtt-bridge)

Connectivity and control via Smart Things and Homeassistant working well, updating of states working well, automations working well.