Hey all, any suggestions on how to measure sound in decibels?
Posts made by TommySharp
-
Sound Level Sensor?
-
RE: My Sensorized Weighing scale - Need help in code modification
Would be great to see some photo of hardware you have to get this working?
-
RE: Happy Bubbles Bluetooth Presence Detector
If you added a few "environment" sensors to your board these would be perfect to have in every room of the house
And an enclosure of some sort would also help it blend into the decor too.
-
RE: Indoor BLE Location ( or presence detection)
@nemik looks really well done! Have you considered including some environmental sensors and also publishing those via MQTT? Having one of these in every room of my house would be cool!
-
Looking for a suitable "pinhole" type push to reset button
Hi guys, I'm creating a small project within a wooden box and I'd like to be able to "reset" the arduino by having one of those pinhole type reset switches... So ideally drill a tiny hole in my enclose and then mount a button behind it which I can then use a paperclip to reset.
The best I've found so far is this... But maybe someone has seen or used something better?
-
RE: Help parsing a string to grab a value?
Thanks for your help guys! I got it resolved....
-
Help parsing a string to grab a value?
Is anyone able to help me parse a string using arduino code that is getting returned by a IP based temperature sensor?
I have a URL that I can call and this is what is returned...
{"temp":19.3,"id":"373650"}
I need to just grab the 19.3 so I can store it.....
I appreciate I may not be asking in the best forum based on this not being specifically related to MySensors but any help would be appreciated.....
-
RE: Internet of Poultry - Fully automated chicken shed
Is it important to know that all the chickens are in the coup before you close the door or are we just assuming they are all inside at a certain time?
-
Count people entering/leaving a shop?
My wife wants me to buy her a cheap IR based "Ding Dong Welcome" type door chime that makes a noise whenever someone enters her shop as she works a lot in the back office.
I'd prefer to pimp it out and make it sound a buzzer in the back office rather than startling the customer.... And why not count foot traffic while we're at it...
Has anyone seen a project like this before?
-
RE: Retrofit sensors into 240v LED Night Light : Help a novice?
I appreciate the concern for my well being that everyone is showing so a big thanks for that
I would still like to find something that could be used to create a nice little housing for some sensors that can just be plugged straight into a plug socket. My first thought was a simply little night light but hopefully this topic could highlight some other alternatives. I have done a lot of searching the web and a night light appeared to be the best looking and cheapest approach
By not being battery powered it does mean I can use sensors like PIR for motion and even install a LED to re-instate the nightlight feature but have it controlled from the Home Automation system. Always on would also allow it to be used as a repeater which is another bonus.
-
RE: Retrofit sensors into 240v LED Night Light : Help a novice?
Thanks @AWI , I appreciate the advice and I'm fully aware of the risks.... I'll poke around and see what other alternatives there are.... It is probably safer to go with a 5v "wall wart" and try and package something up nicely with that.
It's possible that others may have some advice on this topic too so I'll leave this post open.
-
Retrofit sensors into 240v LED Night Light : Help a novice?
At the moment my sensors are plugged into USB phone chargers and are just a mess of ugly wires.... My mission is to now package it up nicely into an environment sensor that can just be plugged into any wall socket and not look too out of place.
My "bright" idea is to start of with a cheap generic 240v LED night light which can be bought for about $5 and then try and retrofit an arduino and a couple of sensors into it without changing the appearance.
These are some photos of the LED Night Light with the cover removed.
I must confess that my knowledge of electronics and diodes, resistors etc is VERY limited and almost none! I don't want to fry any components or cause a fire so any help would be appreciated...
My plan is to remove the LEDs and "tap" into the power supplied to them.
Each one gets supplied with 3v based on my testing, ideally I'd like to get a clean 5v to power the arduino/sensors.... So I'm assuming I can daisy chain them giving me 6v which I could then get back down to 5v using some little device?Is this the right approach or is there a better way based on what you can see in the photos?
-
RE: Need help with pulse counter for power meter
That's a shame...
I've been building something from scratch this weekend to help me learn all about arduinos, WiFi, MQTT etc.... Its taking forever but as of now I have a WiFi based sensor that will send a MQTT message to OpenHAB every time there is a pulse on my power meter.
This is a great result for me
Next step is to decide if I want to try calculate the watts and KwH in OpenHAB or on the sensor end.....
-
RE: Need help with pulse counter for power meter
Thanks for the long reply!
Over 100KwH in one day.... Pretty impressive!I'll have a good slow read of your reply and hopefully I can make some headway.
-
RE: Need help with pulse counter for power meter
@mbj said:
I found one way to bypass this problem. Maybe not the most elegant but it works. I used V_VAR2 to send the request for the startup value, picked this up with an item in Openhab and made a rule which did send back a startup pulsecount using V_VAR1 as the sensor sketch expects. Thus the change to the code is very small.
I don't suppose you have a sketch you can share that works with OpenHAB and maybe some detail on the items and any rules you setup in OpenHAB?
-
Pulse Power Meter with OpenHAB?
Does anyone have the pulse power meter working with OpenHAB?
As far as I can tell it's not really possible because the sketch is firt looking for a response from the gateway about the KwH used to date or something like that..... -
RE: Help work out correct MQTT message to activate relay
Awesome! I'd much rather use a client gateway so might just hold off until the next release of MySensors and then use the MQTT Client Gateway.
-
Can we run two gateways at once?
I have an old mysensors MQTT Gateway I setup many moons ago and now I'm thinking of setting up a new one using all the latest mysensors code.
Is it possible to run two gateways at the same time so I can get the new one up and running and slowly move all my sensors to it?
If not, does anyone have any recommendations on the best way to proceed?
-
RE: Help work out correct MQTT message to activate relay
So when my relay sensor announces itself to the gateway below.... Does it announce the child ID anywhere so I can be sure I'm using the right one?
send: 24-24-0-0 s=255,c=3,t=11,pt=0,l=5,st=ok:Relay
send: 24-24-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
send: 24-24-0-0 s=1,c=0,t=3,pt=0,l=5,st=ok:1.4.1 -
RE: Help work out correct MQTT message to activate relay
@ahmedadelhosni
Yes my gateway is the MQTT gateway and it has been running for well over a year. It happily posts temp/humidity which my OpenHAB server subscribes to and reads in the sensor readings.I just need to work out now how to activate a relay
-
RE: Help work out correct MQTT message to activate relay
Ahhh by GW sketch I guess you mean gateway sketch? I set that up well over a year ago and I actually wouldn't even have a clue where the original sketch is... My temp/humidity sensors have been working perfectly for over a year now. So just diving back into the arduino stuff to see if I can get the relay going.
I'm even using a different PC to compile and upload the sketches so I might not even have the original GW sketch....
-
RE: Help work out correct MQTT message to activate relay
As far as I know I am just using the default MySensors relay sketch with 1 relay.
// Example sketch showing how to control physical relays. // This example will remember relay state even after power failure. #include <MySensor.h> #include <SPI.h> #define RELAY_1 6 // Arduino Digital I/O pin number for first relay (second on pin+1 etc) #define NUMBER_OF_RELAYS 1 // Total number of attached relays #define RELAY_ON 1 // GPIO value to write to turn on attached relay #define RELAY_OFF 0 // GPIO value to write to turn off attached relay MySensor gw; void setup() { // Initialize library and add callback for incoming messages gw.begin(incomingMessage, AUTO, true); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Relay 1.0"); // Fetch relay status for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) { // Register all sensors to gw (they will be created as child devices) gw.present(sensor, S_LIGHT); // Then set relay pins in output mode pinMode(pin, OUTPUT); // Set relay to last known state (using eeprom storage) digitalWrite(pin, gw.loadState(sensor)?RELAY_ON:RELAY_OFF); } } void loop() { // Alway process incoming messages whenever possible gw.process(); } void incomingMessage(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type==V_LIGHT) { // Change relay state digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF); // Store state in eeprom gw.saveState(message.sensor, message.getBool()); // Write some debug info Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.println(message.getBool()); } }
-
Help work out correct MQTT message to activate relay
I'm trying to active a relay but not sure exactly what the full message should be.
This is what I'm trying...
MyMQTT/24/1/1/0/2
In the serial monitor I can see "read" messages coming in but the relay is not doing anything.
This is what I see in the serial monitor when I boot up the relay, maybe someone can help me make sense of it?
send: 24-24-0-0 s=255,c=3,t=11,pt=0,l=5,st=ok:Relay
send: 24-24-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
send: 24-24-0-0 s=1,c=0,t=3,pt=0,l=5,st=ok:1.4.1 -
1.4 Gateway and 1.5 Sensors?
I'm reasonably sure I built my MQTT Gateway early last year so it must be running 1.4....
Will it be possible to use sensors with sketches that are part of the 1.5 version?
-
RE: Iboard - Cheap Single board Ethernet Arduino with Radio
I know this is a basic question but what do I need to buy to program this using USB from my PC? So far I've just tinkered with Nanos which have a usb port on it.... An ebay link would be great!
-
RE: Pulse Powermeter
Would it not be the MySensors gateway that should respond with the last pulse count?
-
RE: Battery level report in MQTT?
Hi Johan, I have been trying to get the MQTTClient gateway running a few months back but gave up..... Can you share the final sketch you used?
-
Power Meter Pulse Sensor : Help with example script?
Hi All, I'm using the example pulse power meter script...
http://www.mysensors.org/build/pulse_power
It's all running well but all I get when looking at the serial monitor is this...
sensor started, id 25
send: 25-25-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
send: 25-25-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
read: 0-0-25 s=255,c=3,t=6,pt=0,l=1:M
send: 25-25-0-0 s=255,c=3,t=11,pt=0,l=12,st=ok:Energy Meter
send: 25-25-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
send: 25-25-0-0 s=10,c=0,t=13,pt=0,l=5,st=ok:1.4.1
send: 25-25-0-0 s=10,c=2,t=24,pt=0,l=0,st=ok:
send: 25-25-0-0 s=10,c=2,t=24,pt=0,l=0,st=ok:
send: 25-25-0-0 s=10,c=2,t=24,pt=0,l=0,st=ok:
send: 25-25-0-0 s=10,c=2,t=24,pt=0,l=0,st=ok:
send: 25-25-0-0 s=10,c=2,t=24,pt=0,l=0,st=ok:I'm sending everything through the MQTT Gateway and all the sensor sends is a topic of "MyMQTT/25/10/V_VAR1" with no actual data.
From what I can tell the sensor tries to ask what was the last value it sent to the gateway which I think is what this topic is.... Should I be setting something extra up in the gateway?
Any help would be appreciated....
-
RE: MQTT Client gateway
Could someone please post the latest working version of the MQTT Client gateway sketch?
-
RE: MQTT: Can somebody explain Gateway to a beginner?
A while back I tried this approach to setup a MQTT Client Gateway but I never got it fully working.
At the moment I'm using the MQTT Gateway and it works well for receiving readings from sensors. Although I'm having some problems sending commands to things like relays etc
I'm probably going to try the "client gateway" again and make it talk to my Mosquitto MQTT broker.
-
RE: MQTT: Can somebody explain Gateway to a beginner?
Marcus, did you get this working ever?
-
RE: Combine Relay Actuator (with button) and BinarySwitch examples?
Ideally I'd start with the relay with button script and then I want to add 2 window/door sensors for my garage doors.
-
RE: Combine Relay Actuator (with button) and BinarySwitch examples?
Yeah I'm just using the examples provided by this website...
-
Combine Relay Actuator (with button) and BinarySwitch examples?
Combine Relay Actuator (with button) and BinarySwitch examples?
Have to say firstly that I'm still a novice so hopefully someone can help me out....
I've managed to use the examples to create a Relay Actuator with button and a separate Binary Switch sensor using two separate arduino nanos.
I'm now trying to combine the two sketches into one and don't quite know what I'm doing....
Any help would be appreciated....
-
RE: MQTT controller - ping but Connection timeout on MQTT clients
When I try your files I get this error when compiling...
Any ideas? I'm using the Arduino 1.6.3 application.
In file included from C:\Users\Tommy\Documents\Arduino\libraries\MyMQTTClient/MyMQTTClient.h:16:0,
from MyMQTTClient.ino:46:
C:\Users\Tommy\Documents\Arduino\libraries\MyMQTTClient/PubSubClient.h:72:46: error: section attribute not allowed for '<anonymous>'
boolean publish_P(char *, uint8_t PROGMEM *, unsigned int, boolean); -
RE: MQTT Client gateway
@FotoFieber
Thanks for the reply....I'm running mosquitto on windows so not sure how to "run" the command you suggest? I can see the mosquitto DOS looking dialogue box onscreen and it shows OpenHAB pinging mosquitto every few minutes, not seeing any pings or subscriptions coming from the MySensors MQTTClient Gateway though?
This is the only gateway I am trying to setup and I have one wireless temperature/humidity sensor running and it's located about 1 meter from the gateway. I expected that even without any sensor nodes setup that at least the Gateway should connect to mosquitto in some way? I did mess about with trying the other MQTT gateway where it is also the broker and I did get a few temperature readings all the way into OpenHAB that way but OpenHAB randomly lost the connection to the broker and then I'd have to reboot everything. Just mentioning that because that tells me that my one sensor node is working properly I guess.
Tip 1 : I'll have to do some googling about an "isp" to see what that's all about....
-
RE: MQTT Client gateway
Hi guys! Took me a while but I've finally got this compiling and uploading to the Arduino Uno.
I can see the Uno on my ethernet network and it's visible as the IP address I set in the sketch.
But my mosquitto MQTT broker never receives anything from the Uno, I was expecting even just a New Client Connection notification or something... But nothing.... I have OpenHAB talking to Mosquitto and the Mosquitto screen shows it receiving ping requests from OpenHAB so I know the broker side of things is working well.
Anyone got any ideas? I'm confident that the IP address and port for my broker have been properly configured in the sketch.
I just configured 4 things in the scketch..
- Broker IP Address
- Broker Port
- Arduino IP address
- Arduino MAC Address