@thespot I think the problem is pin D3. Avoid using this pin. Try pin 5 instead of 3 and let me know if that fixes the problem.
@Vyker set the version to Self-Published. It should be Self-Published for all the NodeMCU-connected devices. After you make that change, save & publish (for Me), then reboot the NodeMCU. After it first boots up and makes the initial successful HTTP calls, you should expect to see the IP, port and mac address in the data section here.
15:41:24: debug POST /3a3f37f2-24******/off HTTP/1.1
Accept: */*
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 192.168.1.107:8100
IP on there now. Excellent. Thanks
However, still no siren. Is it possible to have just one wire connecting into D1? should there be a GND too? Currently I have TRG- into D1 with all the other wires left in the panel.
Here is the schematic again
Here is the board
You’re right, I don’t think the wiring is correct. I’m not really sure based on this diagram. Could you snap a pic of the wires/connections going into the siren?
Yes, of course
The yellow wire was connected to D1.
The Red, Black, Yellow and Blue all come from the same wire, from the siren.
The white wire is the internal siren, and it appears to be sharing with H/O-
There is 12V between red and black.
Does this help?
Thanks again.
@heythisisnate You are the man fixed the issue and now the project ready to be installed, Thanks
hey @Vyker I’ve been staring at your photo and diagram for a while trying to make sense of it in my head. I really don’t have much electrical experience, so it’s not too clear to me. I think it seems like your external siren is receiving 12V constantly via the red/black wire pair (have you tested this with a multimeter) and the yellow/blue pair is simply a relay that completes a circuit on alarm.
I’d suggest you do some experimentation to see if this is correct. Can you try this:
Touch the yellow and blue wires together. Does the siren activate?
Maybe someone else watching this thread with more electrical experience than me can make more sense of it.
@Vyker, your yellow core requires 0v applied to it in order to trigger your siren. If you short your yellow core to H/O- then your siren should sound.
@heythisisnate, would this equipment in your first post work in the UK?
Yes, I don’t see why not. I believe @Vyker is in the UK and he seems to have successfully set it up.
Oh really? i’ll give it a go in the morning - don’t want the siren going off so late in the evening.
If that works, how will that translate into the NodeMCU?
Yes, I’m in the UK, and I got the basic PIR and Contact sensors working. Works perfectly in fact.
Issues I have left being going into “production” is the siren, which I’ll try your suggestion, and secondly the presence disarm “issue” with Home Monitor - been reading that it’s not quite smart enough to know that you’ve come home before sending off notifications of intrusion alerts.
@Vyker [quote=“Vyker, post:92, topic:84285”]
If that works, how will that translate into the NodeMCU?
[/quote]
Forgive me for not completely reading the whole thread, but-
1- you’ll need a trigger from the NodeMCU that can trigger a relay.
2-on the relay, connect a wire link from Com to H/O- on your alarm panel
3- on the relay, connect a wire link from NO to TRG- on your alam panel.
All your doing is adding an in line relay to trigger your siren as well as your alarm panel.
Is there a dry relay on the NodeMCU board? Or a trigger? Which type of trigger?
Thanks Jak, I agree with your wiring instructions. The NodeMCU digital pins output a 3.3V trigger. I’ve been recommending the “icstation 3V relay module” available from a few online shops:
Amazon U.S. (5-pack) $13.99
Amazon U.S. (1 each) $3.99
Aliexpress (5-pack) $10.46
Amazon U.K. has a 5V relay (5-pack for £5.98) that looks like it’ll work if you power it with 5V (which you can draw from the LoLin NodeMCU base).
I’m using opto-isolated 3.3v - 5v relays for my set up. You use the base board to supply the 5v and the 3.3v from the NodeMCU IO pin to trigger it. I got mine at AliExpress. My relay boards have 4 input pins to handle the two separate lines (1 set to power the coil, the other set to power the trigger signal). That link to the Amazon UK 5V relays shows boards with only 3 pins. It seems odd to me that those could handle a separate lines of different voltages. I’m no expert, but they may not work.
Here’s a link to the ones I got. $0.96 each, and they definitely work with a 3.3v trigger if you power the coil with 5v from the base board. (Took about 5 weeks to arrive.)
Agreed @heythisisnate, these relays will work with triggering the siren.
I’ll be using 12v relays to trigger the NodeMCU inputs from my panel as I’m going to use my alarm system as normal but use output triggers to fire relays which will act as a pir/contact. Like this: https://www.amazon.co.uk/gp/aw/d/B00LW15F42/ref=mp_s_a_1_15?ie=UTF8&qid=1493632558&sr=8-15&pi=AC_SX236_SY340_QL65&keywords=12vdc+relay
@jakclark @heythisisnate It worked!!!
Touching the yellow TRG wire to the black H/O- wire rang the bell. Leaving it touching and the bell keeps ringing.
Black is 12v, I ordered a 3.3v relay from AliExpress as I couldn’t find any in the UK, as I didn’t spot that the LoLin dev board can do 5v, so that’s perfect. I’ll buy that 5pcs 5v relay from Amazon UK. Then I can use one for the indoor siren [white wire on H/O-] and one for the outdoor siren [black H/O-]
Getting there
@Vyker
get in there
One concern with the 5V relay that @TylerDurden mentioned above is that they only have a single GND pin. Is it ok to share a common GND with the 5V power and 3.3V trigger? I’m not sure.
Posted this somewhere else earlier today then realised that this is the most recent release page…
I can see there are a few people from the UK on here - perhaps you can give me some pointers as I am very new to all this… I think my issues might be related to using the EU server rather than the US one, but am not sure…
I have the hardware described in the project. I have successfully set up devices in the Smartthings IDE (the EU version at https://graph-eu01-euwest1.api.smartthings.com), set up the device handler and smart app, and completed the authorisation steps. My setup differs slightly as the API host is “https://graph-eu01-euwest1.api.smartthings.com:443” and the API endpoint is “/api/smartapps/installations/f5f8b79d-6976-4c50-b7ab-############”
I have also successfully flashed the firmware provided and copied across the code. It runs, connects to my WIFI network, and listens on the GPIO pins correctly. However, I get a constant message:
“Error 500 posting {“sensor_id”:“6fdd6821-6ddc-4028-8864-############”,“state”:1}, retrying”
The device ID is definitely that got from the URL in the IDE:
“https://graph-eu01-euwest1.api.smartthings.com/device/show/6fdd6821-6ddc-4028-8864-############”
This happens whether I use an open/close or motion sensor type.
When I look in the Smart things log, the connection is seen, with the error message:
“f5f8b79d-6976-4c50-b7ab-############: error java.lang.NullPointerException: Cannot execute null+null @ line 55”
Interestingly, if I set up an alarm handler, that seems to connect OK. The smartthings error message changes to:
“f5f8b79d-6976-4c50-b7ab-############: error java.lang.NullPointerException: Cannot get property ‘id’ on null object @ line 77”
It seems that I am Connecting to my smart things device handler, but it can’t find the device for my sensors to change the state.
The LoLin base board has 3.3v GND pins and separate 5v GND pins. So I’m skeptical that they can share the same GND pin on the relay board. Personally, since the Amazon UK listing doesn’t mention support of 3.3v, and the fact that it has only 3 pins, and given my personal experience with the 4 pin relay boards @ AliExpress that support two voltages, I wouldn’t expect the UK listed 5v relay boards to work unless you have someone with electrician or EE experience explaining that the GND pin can handle 2 separate voltages on that relay board. (I could be wrong.)