Home Automation - Smartkit

On my gate SV Hass is saying sensor state unknown.

I set the topic name in tasmota console

But it doesn't seem to want to retain it.
a126aa4fc3faf810f76eea3a29d9d332.jpg

Sure you wired it correctly? I don’t see anything in that log indicating that the sensor is working and changing.

As I recall it’s not the two pins next to each other but instead a gap in between.

Also if you are using auto discovery it won’t work if I recall corrected. It has to be manual and if you had Auto Discovery on you’ll need to go flip the MQTT topics around manually again.
 
Thanks to all the folks who responded to my question on magnetic switches for garage door and gate . Gonna try to get it done in the next week.
IMG_20200525_161105.jpg
IMG_20200525_161139.jpg
IMG_20200525_161054.jpg

So cable goes from the contacts to my sv which is in that small little plastic box, then from the sv out and glue gunned along the rail to where the arm is positioned when closed
 
Sure you wired it correctly? I don’t see anything in that log indicating that the sensor is working and changing.

As I recall it’s not the two pins next to each other but instead a gap in between.

Also if you are using auto discovery it won’t work if I recall corrected. It has to be manual and if you had Auto Discovery on you’ll need to go flip the MQTT topics around manually again.

To help you out a little this is my log when opening the gate, stopping it and closing it again.

17:15:17 MQT: tele/frontgate/SENSOR = {"Time":"2020-05-25T17:15:17","Switch2":"closed"}
17:15:50 MQT: stat/frontgate/RESULT = {"POWER1":"closed"}
17:15:50 MQT: stat/frontgate/POWER1 = closed (retained)
17:15:50 MQT: cmnd/gatestate/POWER2 = open (retained)
17:15:51 MQT: stat/frontgate/RESULT = {"POWER1":"open"}
17:15:51 MQT: stat/frontgate/POWER1 = open (retained)
17:15:56 MQT: stat/frontgate/RESULT = {"POWER1":"closed"}
17:15:56 MQT: stat/frontgate/POWER1 = closed (retained)
17:15:57 MQT: stat/frontgate/RESULT = {"POWER1":"open"}
17:15:57 MQT: stat/frontgate/POWER1 = open (retained)
17:15:58 MQT: stat/frontgate/RESULT = {"POWER1":"closed"}
17:15:58 MQT: stat/frontgate/POWER1 = closed (retained)
17:15:59 MQT: stat/frontgate/RESULT = {"POWER1":"open"}
17:15:59 MQT: stat/frontgate/POWER1 = open (retained)
17:16:09 MQT: cmnd/gatestate/POWER2 = closed (retained)

and my code for it.

Code:
 - platform: mqtt
    name: "Front Gate"
    state_topic: "cmnd/gatestate/POWER2"
    command_topic: "cmnd/frontgate/POWER"
    availability_topic: "tele/frontgate/LWT"
    payload_open: "ON"
    payload_close: "ON"
    payload_stop: "ON"
    state_open: "open"
    state_closed: "closed"
    payload_available: "Online"
    payload_not_available: "Offline"
    optimistic: false
    retain: false

Good chance you also aren't using the cmnd topic for the state in HA.
 
So I had an odd screw up today. My Asus router stopped working randomly. Walked over it to check what happening and it was just off. The power supply was on but the router was just completely dead. Anyway turns out the power switch (which I have maybe used 4 times in the last three years) gave up. Sounds like a common problem with this particular router. Managed to shove a toothpick into the switch and now it's staying on. This is not a long term solution ...

So I'm thinking the long term solution is an upgrade to ubiquiti. I'll run the controller on my home server and then I'm thinking I'll pick up a couple of AP lites and a USG. To the guys running Ubiquiti setups, my house isn't that big 300sqm or so, will the AP lites be ok? And am I correct that I'll toss existing router and the USG will handle my "dial up"?
 
Sure you wired it correctly? I don’t see anything in that log indicating that the sensor is working and changing.

As I recall it’s not the two pins next to each other but instead a gap in between.

Also if you are using auto discovery it won’t work if I recall corrected. It has to be manual and if you had Auto Discovery on you’ll need to go flip the MQTT topics around manually again.
To help you out a little this is my log when opening the gate, stopping it and closing it again.

17:15:17 MQT: tele/frontgate/SENSOR = {"Time":"2020-05-25T17:15:17","Switch2":"closed"}
17:15:50 MQT: stat/frontgate/RESULT = {"POWER1":"closed"}
17:15:50 MQT: stat/frontgate/POWER1 = closed (retained)
17:15:50 MQT: cmnd/gatestate/POWER2 = open (retained)
17:15:51 MQT: stat/frontgate/RESULT = {"POWER1":"open"}
17:15:51 MQT: stat/frontgate/POWER1 = open (retained)
17:15:56 MQT: stat/frontgate/RESULT = {"POWER1":"closed"}
17:15:56 MQT: stat/frontgate/POWER1 = closed (retained)
17:15:57 MQT: stat/frontgate/RESULT = {"POWER1":"open"}
17:15:57 MQT: stat/frontgate/POWER1 = open (retained)
17:15:58 MQT: stat/frontgate/RESULT = {"POWER1":"closed"}
17:15:58 MQT: stat/frontgate/POWER1 = closed (retained)
17:15:59 MQT: stat/frontgate/RESULT = {"POWER1":"open"}
17:15:59 MQT: stat/frontgate/POWER1 = open (retained)
17:16:09 MQT: cmnd/gatestate/POWER2 = closed (retained)

and my code for it.

Code:
 - platform: mqtt
name: "Front Gate"
state_topic: "cmnd/gatestate/POWER2"
command_topic: "cmnd/frontgate/POWER"
availability_topic: "tele/frontgate/LWT"
payload_open: "ON"
payload_close: "ON"
payload_stop: "ON"
state_open: "open"
state_closed: "closed"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: false
retain: false

Good chance you also aren't using the cmnd topic for the state in HA.
Magically started working.

Think Hass needed a restart
 
So I had an odd screw up today. My Asus router stopped working randomly. Walked over it to check what happening and it was just off. The power supply was on but the router was just completely dead. Anyway turns out the power switch (which I have maybe used 4 times in the last three years) gave up. Sounds like a common problem with this particular router. Managed to shove a toothpick into the switch and now it's staying on. This is not a long term solution ...

So I'm thinking the long term solution is an upgrade to ubiquiti. I'll run the controller on my home server and then I'm thinking I'll pick up a couple of AP lites and a USG. To the guys running Ubiquiti setups, my house isn't that big 300sqm or so, will the AP lites be ok? And am I correct that I'll toss existing router and the USG will handle my "dial up"?
Tbh skip the USG get a UDM, then add 1 or 2 AC lites and you will be fine. You will need Poe to power the AC lites. Also bear in mind that the new AC lites WiFi 6 is going to be launched soon

There's a Hass add-on for the Unifi controller as well so I use that.
 
Yeah if you were willing to buy a USG then might as well get a Dream Machine.

But it’s stupid money either way and you can do just as well buying a couple of Lites only and just running the controller with your current router and turning WiFi off.
 
Tbh skip the USG get a UDM, then add 1 or 2 AC lites and you will be fine. You will need Poe to power the AC lites. Also bear in mind that the new AC lites WiFi 6 is going to be launched soon

There's a Hass add-on for the Unifi controller as well so I use that.

I've got an 8 port POE switch (tp-link) so that's covered. Why do you recommend the UDM? It's some heavy cost
 
I've got an 8 port POE switch (tp-link) so that's covered. Why do you recommend the UDM? It's some heavy cost
It's a router plus ap in one and I think controller.

Also much newer hardware so handles things routing and IDs ips much better
 
Hello folks,

Would appreciate if anyone who is using Sonoff SV to control garage door and gate, could share pics of how/where you installed the magnetic switch to tell is gate/door is open or closed?

And to be 100% sure, those magnetic switches you find for on windows and doors for alarm systems will do the job? If not , link to the right stuff on online store?

Not intending to be lazy, but finding the posts including search is a mission with results not being useful. Really, wonder why the MyBB app on phone, doesn't have feature to save posts as favourite, so you can refer back to them when you need it . This thread has too many good posts which meet this criteria.

Thx in advance.
I just bought this about 9 months ago. Sorry can't take a picture at the moment.

 
I've got an 8 port POE switch (tp-link) so that's covered. Why do you recommend the UDM? It's some heavy cost

It should still be cheaper than the USG and an AP together or about the same anyway.

But maybe SA pricing is stupid.
 
Probably the shittiest of soldering in the history, but I bought my first decent soldering iron and soldered a terminal block onto an SV.

It's something ¯\_(ツ)_/¯

View attachment 846887
I've opened up enough Basics to know that iTead won't mind hiring you for soldering like that :laugh:
 
I've opened up enough Basics to know that iTead won't mind hiring you for soldering like that :laugh:
Looks a crap load better than mine :D What soldering iron did you buy?
looks good enough to me
Thanks... I do need to get a small tweezer or long nose pliers, and a sharp side cutter to trim the ends off.

I ended going a bit overboard, but got the Magnum 2004: https://www.communica.co.za/products/magst2004

1590577970351.png

Figured it's probably something that will last me a very long time
 
Probably the shittiest of soldering in the history, but I bought my first decent soldering iron and soldered a terminal block onto an SV.

It's something ¯\_(ツ)_/¯
Not shitty but shiny and not a little ball, so pretty good !

I ended going a bit overboard, but got the Magnum 2004: https://www.communica.co.za/products/magst2004
Figured it's probably something that will last me a very long time

yip, that Magnum are good, I've used it years ago, got an "bigger" model myself and no issues.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X