Looks like the Pi 1 used a linear regulator and it was limited to 50ma. Later Pi's all use a switching regulator that can apparently supply 500-800ma on the 3.3v output. We'll find out.
signal15
Posts
-
Best way to mount long-range NRF radio to Pi Zero case? -
Moving sensors to new gatewayIf I turn on signing on the GW, do I have to turn it on for all nodes, or can I use a mix of signed and non-signed nodes?
-
Best way to mount long-range NRF radio to Pi Zero case?In reading the comments on one of those, someone noted that with the high power NRF radio, the raspberry pi 1 could not send data via the radio because it didn't have enough power. Am I going to run into the same problem with a Pi Zero W?
-
💬 Building a Raspberry Pi Gateway@gohan, there are two MQTT plugins for the Vera with varying capabilities. But, the mysensors plugin for Vera doesn't appear to support MQTT at all. I could probably get one of those MQTT plugins working, but I'm not sure how stable they are. I hate installing unstable plugins and having them crash LUUP. I need to maintain a positive WAF (Wife Acceptance Factor), and broken HA doesn't help with that. :)
-
Best way to mount long-range NRF radio to Pi Zero case?I'm building a new gateway with a Pi Zero W. I don't have a case yet. I'm putting the long-range NRF24l01+ radio on it. What's the best way to mount this to the case without making it look like a bomb? Unfortunately, I don't have a 3d printer yet. The best I can come up with so far is to stick a mini breadboard to the top of it and plug the radio into that, but then I still have a bunch of wires sticking out everywhere.
-
Moving sensors to new gatewayI have a bunch of sensors joined to an ESP8266 gateway. I'm building a new gateway using a Pi Zero W. Can I just shut down the old gateway and do the pairing process over again on the new one? Or, do I have to somehow disassociate the sensors from the old gateway first?
-
💬 Building a Raspberry Pi GatewayIs it possible to build a gateway that is MQTT, but also listens on port 5003? I want to send my data up to AWS IoT, but I also need port 5003 for Vera integration.
-
Freezer Temperature Alarm finishedJust wanted to throw this out there as I was revisiting this post today. This could pretty easily be modified to have a digital display with buttons to adjust temperature, and a 5A solid state relay. This would allow you to completely replace the mechanical thermostat.
My thermostat replacement was nearly $40 after shipping, and it's rated at 5A so those 5A relays should work just fine. This would be a cheaper replacement for the mechanical thermostat and would give you better temperature control. Maybe better temp control isn't needed if you're just using for a freezer, but if you're a home brewer and trying to keep fermenters at a constant temperature, this would be very useful. You could even add PID code to it.
-
Freezer Temperature Alarm finishedI built a temp alarm for my big freezer after I lost about $1k worth of meat and other frozen foods due to a failed thermostat. If the thermostat fails again, I'll build an arduino based one with a screen to set temperatures and a relay to turn it on and off.
I modified the example sketch for the temp sensor to support a buzzer and a mute button. I did this because my ESP8266 gateway doesn't seem to be very reliable, and neither do notifications on the Vera. At least this way, someone will hear it beeping if there's a problem. The device uses a button with a pulldown resistor to ensure that the pin stays LOW when the button is not pressed. When the temperature is >= to the alarmTemp, alarmState goes to true which sounds the buzzer and sets the SLEEP_TIME down to 1 second. If you press the button, it will mute the alarm. The alarmState and mute automatically resets when the temp goes below alarmReset. Note that the temps you set in the sketch will either be F or C depending on what your controller is set up for. I'm using F, and usually keep my freezer at -20F. So I set my alarmTemp to 10F and reset at 0F. If you're using C, you'll want to change this appropriately.
I'm always amazed that you can build stuff like this for like $5.
Note that drilling holes in a modern freezer can be a risky endeavor, because the hot side of the compressor lines run beneath the sides and/or back of the freezer. They aren't exposed anymore. I used my Seek thermal camera to determine exactly where the lines were before I drilled and used a dry erase marker to mark them.
Code below,
Photos here - https://goo.gl/photos/4inkTh6GVhCEupLa8
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * DESCRIPTION * * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller * http://www.mysensors.org/build/temp */ // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #include <SPI.h> #include <MySensors.h> #include <DallasTemperature.h> #include <OneWire.h> #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected #define BUZZER 5 const int buttonPin = 7; // Pin where the mute button is connected #define MAX_ATTACHED_DS18B20 16 unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs) DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. float lastTemperature[MAX_ATTACHED_DS18B20]; int numSensors=0; int buttonState = 0; bool alarmState = false; bool muteAlarm = false; float alarmTemp = 10; // Temperature where our alarm goes off. Use F if your gateway is imperial, C if metric float alarmReset = 0; // Temperature where the alarm resets automatically bool receivedConfig = false; bool metric = true; // Initialize temperature message MyMessage msg(0,V_TEMP); void before() { // Startup up the OneWire library sensors.begin(); } void setup() { // requestTemperatures() will not block current thread sensors.setWaitForConversion(false); pinMode(BUZZER, OUTPUT); pinMode(buttonPin, INPUT); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Temperature Sensor", "1.1"); // Fetch the number of attached temperature sensors numSensors = sensors.getDeviceCount(); // Present all sensors to controller for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) { present(i, S_TEMP); } } void loop() { if (alarmState == true && muteAlarm == false) { digitalWrite(BUZZER, HIGH); delay(1000); digitalWrite(BUZZER,LOW); buttonState = digitalRead(buttonPin); // check if the pushbutton is pressed. // if it is, the buttonState is HIGH and we mute the alarm if (buttonState == HIGH) { muteAlarm = true; } } // Fetch temperatures from Dallas sensors sensors.requestTemperatures(); // query conversion time and sleep until conversion completed int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution()); // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater) sleep(conversionTime); // Read temperatures and send them to controller for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) { // Fetch and round temperature to one decimal float temperature = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.; if (alarmState == false && temperature >= alarmTemp) { alarmState = true; SLEEP_TIME = 1000; // Set our sleep from 30 seconds to 1 second to facilitate buzzer and intensive monitoring } if (alarmState == true && temperature <= alarmReset) { alarmState = false; muteAlarm = false; SLEEP_TIME = 30000; } // Only send data if temperature has changed and no error #if COMPARE_TEMP == 1 if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) { #else if (temperature != -127.00 && temperature != 85.00) { #endif // Send in the new temperature send(msg.setSensor(i).set(temperature,1)); // Save new temperatures for next compare lastTemperature[i]=temperature; } } sleep(SLEEP_TIME); } -
Sensor sleep causing problemsI'm using the Temp Sensor Example to build a freezer alarm. It has a beeper, and a button on it to silence the beeper.
The code to make it beep is:
digitalWrite(BUZZERPIN, HIGH); delay(500); digitalWrite(BUZZERPIN, LOW); delay(500);But, this temp sensor sketch has a built in delay of 30 seconds between reads. Which means that I get a couple of beeps, and then silence for 30 seconds. I also have a button that needs to be read, so if it's pressed, it sets a variable that silences the alarm. I'm pretty sure that cannot be read during sleep.
'm guessing the answer is no, but is there a way to fork a thread that handles the buzzer, and another that looks for the button press? What is the solution to this? Do I just set the sleep to 1 second for the temp read and then just note that I have to hold the button until the button read happens and the buzzer stops?
-
Freezer temp monitor with buzzer, can I set the high temp limit via Vera?I am doing a buzzer because my sensors so far have been somewhat unreliable with connectivity to the Vera. I suspect it is due to my esp8266 gateway. I am going to build a Raspberry pi gateway though to see if that is more reliable.
-
Freezer temp monitor with buzzer, can I set the high temp limit via Vera?After losing about $1k worth of meat in my freezer today, I've finally decided to get around to monitoring my freezer temps. I'm going to do a regular temp sensor, but add a piezo buzzer and a silencing button.
Originally, my idea was to:
- Monitor the temp
- If it goes above 20F, sound the alarm
- When the silence button is pushed, it mutes the buzzer
- The mute is reset once the temperature dips below 20F again, so it's armed again.
But, then I got to thinking, it would be nice to be able to set the temperature limit from Vera, and have it save to the eeprom so it would survive an arduino reboot. Is this even possible? Has anyone built something like this before?
-
Do you have to clear EEPROM when moving gateway to new controller?I have an ESP8266 gateway. It was joined to a UI5 vera, and I've just moved it to a UI7 based controller. Do I need to clear the EEPROM on the gateway? What about the sensors?
I'm trying to add a new sensor to the gateway, but it's not picking it up. If I do have to clear the EEPROM on the ESP8266, how do I go about that? I don't think the normal clear EEPROM code works on that board.
-
Most of the UI7 files are 6 months to 3 years old... Are these for 2.0.0??I know. I'm still waiting for them to approve my latest version of the Litetouch plugin, which I submitted months ago.
So which branch should I be choosing for my UI7 VeraPlus? Are all of those files really that old for 2.0?
-
Most of the UI7 files are 6 months to 3 years old... Are these for 2.0.0??I just got a new Vera running UI7. I want to make sure I get the latest controller code on it, but when I look at the timestamps, all of the files are 6 months to 2 years old. What should I be grabbing? There are 3 branches, but they all have the same timestamps (UI7, development, and master).
Why doesn't someone add these files to apps.mios.com? It makes it a heck of a lot easier for people to manage the plugin and update it, and they'll be sure to get the right ones.
-
Vera crash loop on distance sensor updateI need to keep an eye on the distance for one of the sensors, not just track whether it goes below a certain distance. Eventually I need to write logic where if it's increasing at a certain rate, then it will need to alert me.
Interestingly enough, I have MySensors set to Imperial units. However, when I go into the Distance Sensor devices on Vera to set up the alert, the label on it is in centimeters. I'm wondering if that divide by zero in the log is a result of it trying to convert to inches and some code not having 2.54 where the zero/nil is.
-
Vera crash loop on distance sensor updateThere are no scenes linked to the distance sensor. However, I did put in an alert for when the distance goes above a certain amount for one sensor, and below a certain level for the other. Come to think of it, I started having problems when I put in this alert. I set the alert up for the cheapy sensor first, and then had the problem. And, the problems with the other sensor started when I put in the alert for that one.
As for the sending rate, the distance for both of these sensors changes very slowly. And, it's supposed to only send when the distance changes. I set it to every second, because the Maxbotix sensor sends data every second, and I was concerned about data queuing in it over more than a second and causing the parsing not to work properly. Maybe that fear is unfounded since I haven't tried it with more of a delay.
-
ESP8266 WiFi gateway port for MySensorsCan you point me to documentation on how the OTA update stuff works and what the capabilities are?
-
Vera crash loop on distance sensor updateHere's my sketch:
/* * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Jay Austad * * DESCRIPTION * This sketch provides an example how to implement a distance sensor using Maxbotix sensor with RS232 output * http://www.mysensors.org/build/xxx Receives from the hardware serial, sends to software serial. Receives from software serial, sends to hardware serial. The circuit: * RX is digital pin 3 (connect to RXD of MAX232) * TX is digital pin 4 (connect to TXD of MAX232) Note: Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69 Not all pins on the Leonardo support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI). This example uses code written by Henrik EKblad, Tom Igoe, Mikal Hart, and Jay Austad */ #include <SoftwareSerial.h> #include <SPI.h> #include <MySensor.h> #include <NewPing.h> #define CHILD_ID1 1 #define CHILD_ID2 3 #define TRIGGER_PIN 7 // Arduino pin tied to trigger pin on the ultrasonic sensor. #define ECHO_PIN 6 // Arduino pin tied to echo pin on the ultrasonic sensor. #define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. unsigned long SLEEP_TIME = 1000; // Sleep time between reads (in milliseconds) MySensor gw; NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. MyMessage msg1(CHILD_ID1, V_DISTANCE); MyMessage msg2(CHILD_ID2, V_DISTANCE); boolean metric = true; SoftwareSerial mySerial(3, 4); // RX, TX float mm1; float cm1; float inches1; float dist1; float lastDist1; int lastDist2; void setup() { gw.begin(); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Distance Sensor", "1.0"); // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID1, S_DISTANCE); gw.present(CHILD_ID2, S_DISTANCE); metric = gw.getConfig().isMetric; Serial.println("Maxbotix RS232 Mysensors Sketch"); // set the data rate for the SoftwareSerial port mySerial.begin(9600); } void loop() { // run over and over //Maxbotix sensor, child ID 1 if (mySerial.available() > 0) { mm1 = mySerial.parseFloat(); if (mm1 != 0) { inches1 = mm1/25.4; cm1 = mm1/10; dist1 = metric?cm1:inches1; Serial.print(dist1); Serial.println(metric?" cm":" in"); } if (dist1 != lastDist1) { gw.send(msg1.set(dist1, 2)); lastDist1 = dist1; } } //sonar sensor, child ID 2 int uS = sonar.ping(); if (uS==0) { Serial.println("MAX: resetting sensor"); pinMode(ECHO_PIN, OUTPUT); delay(150); digitalWrite(ECHO_PIN, LOW); delay(150); pinMode(ECHO_PIN, INPUT); delay(150); } else { int dist2 = metric?sonar.ping_cm():sonar.ping_in(); Serial.print("Ping: "); Serial.print(dist2); // Convert ping time to distance in cm and print result (0 = outside set distance range) Serial.println(metric?" cm":" in"); if (dist2 != lastDist2) { gw.send(msg2.set(dist2)); lastDist2 = dist2; } } gw.sleep(SLEEP_TIME); }