Check. Gotta redesign.
I'll get optos on the AC-voltages and power the Rpi from the 48/12V ground source.
Thanks for confirming my doubts.
Check. Gotta redesign.
I'll get optos on the AC-voltages and power the Rpi from the 48/12V ground source.
Thanks for confirming my doubts.
If the grounds are connected: you mean I could connect them. Is it a bad idea?
When I really look at my goals, measuring is necessary only for the 48V line.
All the others I can get by with a on/off-info. Optocouplers for 240v data maybe?
The 48v and 12v probably have common ground considering the dc-dc converter? I'm not familiar with their design.
I need help with my build. I had what I thought was a great idea but now I'm having doubts & regrets.
I want to
The 240Vs each have a plug and a wall wart/phone charger plugged in.
I built a thru-hole pcb with 6 LEDs and voltage dividers for each power supply.
A Rpi Zero + MCP3008 reads the voltage dividers.
I connected the grounds (neg wires) on the chargers (4x) and hooked it to the pcb. I have leds light up. The 48v and 12v however don't light the leds (their gnd is not connected). The MCP3008 is not reading (the code could be wrong - just did a quick test).
As I was thinking about this, I got worried.
Can I connect all the grounds together (4x wall plug, 48V and 12V) ?
If not, what would be a good way to accomplish what I'm trying to do? I would like to read at least the solar battery voltage (40-57V) beacause that changes. The others can be on/off-type.
Any help or advice is appreciated!
OK. The fstab has credentials file and username password - I recommend picking one. Cred file probably more secure (but permission issues may arise again).
What I like to do is add my own log entries (into a logfile of my own - not syslog) into the script - to begin with, it logs all kinds of steps the program goes thru. That way I can figure out what makes it stuck - or go crazy otherwise. Then remove all the crazy logging once the script works.
Example from a shell script of mine of one of many lines marking up whatever steps:
echo "date -u
InetReboot script" >> /home/pi/reboots.log
"Camera taking pictures constantly" does sound like bouncing..? Reading the button? Could be hardware. Maybe slow down the script also - add "time.sleep(50)" at the end?
I'm not sure but does python need the GPIO-definitions at the beginning?
i.e.:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
and maybe add a pullup/pulldown depending on your wiring.
Just some things to check (I'm NOT a linux ninja):
-crontab: why do "sudo crontab -e"? Would using just "crontab -e" use pi-users crontab and have less conflicting permissions?
-fstab has multiple credentials currently
-the launcher I believe has unnecessary lines (the changing directories)
-did you have multiple pythons? (bbt.py, doorbell.py?)
Just my two cents. Most of my problems are like this or permissions issues that just take too damn long to figure out.
Old thread, I know. Anybody know if this was ever fixed? I can get by with just open/close but percentage would be extra snazzy.
I'm using a 12V dc motor and microswitches at limit points. The blind is just SO heavy/dragging that I had to get a beefy DC motor. The apparatus moves nicely. Just the control circuitry to do.
@FIRE-FOX The answer depends a little on what OS you're using.
In linux I have an Arduino-folder where the program files (not necessarily the sketches) are AND a hardware folder. Also on OSX I have an Arduino-folder (where I have my sketch-directories and libraries and hardware.
Locate the hardware-folder (use whatever search-option your OS has) and you can pretty easily figure out where the breadboard-directory goes.
I wish you luck with the bootloader programming. I went crazy a couple of times but once I got the routine down, it's worth the trouble.
Hi,
I need more eyes and help with code on this.
I have a solar battery (6S Li-ion, Nissan Leaf cells) and I want to monitor voltages, temps and (later) control a safety relay/contactor. The Arduino (3.3v pro mini is powered by a adjustable step down converter set to 3.65V -- just couldnt get 3.3V no matter how closely I turned the knob).
The voltages come out wrong (1M+100kOhm dividers) - even with a multiplier to even it out. The DS18B20's dont register at all (with simple example sketches they read fine!).
Measured at battery and at voltage divider:
4,01 - 0,353
8,02 - 0,715
12,03 - 1,064
16,05 - 1,419
20,05 - 1,775
24,06V - 2,15 V
My code
#define MY_DEBUG // Enable debug prints to serial monitor
#define MY_RADIO_RF24 // Enable and select radio type attached
#define MY_NODE_ID 22
#define voltagePin1 19 //A5 -- 1S
#define voltagePin2 18
#define voltagePin3 17
#define voltagePin4 16
#define voltagePin5 15
#define voltagePin6 14 //A0 -- 6S
#define RELAY1 5
#define RELAY2 6
#define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected
#define MAX_ATTACHED_DS18B20 2
#include <MySensors.h>
#include <OneWire.h>
#include <DallasTemperature.h>
int voltSenseMax = 40150; // * Voltage divider R1 1 megaohm R2 100 kilohms -- 3.65V VCC
int sampleCount = 0;
int sum = 0; // sum of samples taken
int numSamples = 5;
int voltMilli;
float voltage_array[6] = { 0, 0, 0, 0, 0, 0,};
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;
DeviceAddress tempDeviceAddress;
bool receivedConfig = false;
bool metric = true;
MyMessage msg_S_MULTIMETER(0, V_VOLTAGE);
MyMessage msg(0,V_TEMP);
void setup()
{
sensors.begin(); delay(10);
for (int j=14; j<20; j++) {
pinMode(j, INPUT);
}
pinMode(RELAY1, OUTPUT);
digitalWrite(RELAY1, HIGH);
pinMode(RELAY2, OUTPUT);
digitalWrite(RELAY2, LOW);
}
void presentation()
{
sendSketchInfo("Solar Battery Monitor", "v05092020"); // Send the sketch version information to the gateway and Controller
for (int j=14; j<20; j++) {
present(j, S_MULTIMETER);
}
present(RELAY1, S_BINARY, "Cutoff Relay1");
present(RELAY2, S_BINARY, "Cutoff Relay2");
numSensors = sensors.getDeviceCount();
Serial.print("Locating devices...");
Serial.print("Found ");
Serial.print(numSensors, DEC);
Serial.println(" devices.");
for (int i=0; i<numSensors; i++) {
present(i, S_TEMP);
}
}
void loop()
{
// TEMPERATURES
sensors.requestTemperatures();
for (int i=0; i<numSensors; i++) {
if(sensors.getAddress(tempDeviceAddress, i)){
Serial.print("Temperature for device: "); Serial.println(i,DEC);
float tempC = sensors.getTempC(tempDeviceAddress);
Serial.print("Temp C: ");
Serial.println(tempC);
send(msg.setSensor(i).set(tempC,1));
}
}
// VOLTAGES
for (int k=0; k<6; k++) {
while (sampleCount < numSamples) {
sum += analogRead(k+14);
sampleCount++;
delay(5);
}
int voltMilli = -(map((sum / numSamples),0,1023,0,voltSenseMax))*1.5988; // map the reading and get the result in millivolts
send(msg_S_MULTIMETER.setSensor(k+14).set((voltMilli / 1000.0), 2)); // Divide by 1000 to convert back to volts to two decimal places, send data to controller. // send voltage message to gateway with 1 decimal place
Serial.print(voltMilli / 1000.0);
Serial.println(" V");
// float voltage_array[k] = (voltMilli / 1000);
sampleCount = 0;
sum = 0;
delay(5000);
}
delay(15000);
}
void receive(const MyMessage &message)
{
if (message.type==V_STATUS) {
digitalWrite(message.sensor, message.getBool());
saveState(message.sensor, message.getBool());
Serial.print("Incoming change for sensor:"); Serial.print(message.sensor);
Serial.print(", New status: "); Serial.println(message.getBool());
}
}
I would also like to get the voltages as values to play with in the code (to monitor high and low voltages) but I cant make "voltage_array" work. Can someone with more arduino-code powers help here?
I found this old thread and since I have a Vallox machine it's interesting. RS485 is new to me but MySensors isn't.
Can I have a node like this described by Heinz parallel with the "mickey mouse"-display? Using the display's connector? Or is it one or the other?
I'd feel better having both (manual display&buttons and connection to MySensors=>Domoticz, in my case).
@ej3-martin My LEDs come on when the Rpi boots (is that what you mean by testing?). Also you can invert the LEDs (on but blink off) if you want. I figured the wiring makes for better power delivery rather than feeding voltage from the GPIO
@Nicolás-Potier that's way way over my understanding and fluency with Mysensors. And way off topic, I think.
You're not being able to connect to your MQTT broker (Mosquitto or Moqutte as was in mycontroller.org). I havent used mycontroller so I cant help with that.
I use Mosquitto on the same Rpi (so just install mosquitto and mosquitto-clients). You should secure it but test first without credentials to get going. Remember to create credentials in mosquitto AND reconfig your gw
@Yveaux and @boum You two beat me by 2hrs.
@user2684 whose code this is (cudos to him, have used this bit on a number of sensors!) had probably figured that out and I screwed myself when I changed the original analogRead to int.
Now the whole thing works 100%
I dont know what controller you are using but I had similar problems with domoticz when presenting s_light_level and V_Level vs v_light_level. It had to do with domoticz update.
Thats what came to mind. I didnt find a sketch problem if this wasn't part of your problem.
@electrik Thanks I'll check those.
I added a lot of serial.Print's to debug where it goes south and it appears to ruin already at the first division after the analogRead (I started receiving 530's analogRead at room temp). So probably something else completely that's rotten. I'll try another machine with another Arduino IDE. It should work now that the original question is answered.
So I'll consider this solved. Thanks again!
@electrik ..and then just adjust the volts/bit for 3.3 rather than 1.1v, correct? (i.e x3). That fixed it, thank you.
BUT presented a weird problem. The analogRead gives a proper value but the math then is not working and I cant figure it out. I did the calculations myself and get a proper result:
int _nominal_resistor2 = 10000;
int _nominal_temperature2 = 25;
int _b_coefficient2 = 3950;
int _series_resistor2 = 10000;
int adcTmm = analogRead(THMR_PIN);
Serial.println(adcTmm);
float readingSau = (1023 / adcTmm) - 1;
readingSau = _series_resistor2 / readingSau;
float temperatureS = readingSau / _nominal_resistor2; // (R/Ro)
temperatureS = log(temperatureS); // ln(R/Ro)
temperatureS /= _b_coefficient2; // 1/B * ln(R/Ro)
temperatureS += 1.0 / (_nominal_temperature2 + 273.15); // + (1/To)
temperatureS = 1.0 / temperatureS; // Invert
temperatureS -= 273.15; // convert to C
send(msgTempSau.set((int16_t)temperatureS, 2));
Serial.print("Sauna T: ");
Serial.print(temperatureS);
Serial.println(" C");
But still the serial monitor shows:
7409 MCO:SLP:WUP=1
7413 TSF:TRI:TSB
Sauna door: 1
7430 TSF:MSG:SEND,21-21-10-0,s=3,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:1
7966 TSF:MSG:SEND,21-21-10-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:29.00
Shower T: 29.00
7989 TSF:MSG:SEND,21-21-10-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:87.0
Shower H: 87.00
536
8005 TSF:MSG:SEND,21-21-10-0,s=16,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:-273.00
Sauna T: -273.15 C
Sauna off, sleeping 30min
Battery Voltage: 4.22 V Battery percent: 97.70 %
8028 TSF:MSG:SEND,21-21-10-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:97
8097 MCO:SLP:MS=1800000,SMS=0,I1=1,M1=1,I2=255,M2=255
8108 TSF:TDI:TSL
I changed variable names to account there wouldnt be overlap with DHT library & dht part of sketch.
I investigated the bootloader problem, I use 1.8.1 definitions that made those problems disappear. But still, the A2 (THMR_PIN) reads 1023 but the battery sense on A4 works.
EDIT: now I get what you mean: it also changes the reference for the whole ADC...from 3.3 to 1.1V! Any ideas for changing the resistors? I would want to use the same thermistor as I only have two wires going to the sauna. OR is there a way to change the reference for A2 read and go back after it's been read?
Same result float => int change in the sketch.
Tried to reupload bootloader but got a problem, same with another atmega328. Will investigate that next.
I have troubleshot this for over a week but can't figure it out.
My A1 & A2 wont analogRead anything except 1023, however my battery sensing works on A4. I'm using a SlimNode pcb, an AtMega328 barebone with 8mhz bootloader. The pcb is powered by 18650 with protection board (gets power from mains when lights are on and charges). The A2 has a thermistor in a voltage divider config (VCC3V3 - R10k - A2 - thermistor - GND) and reading the voltage at A2 is 1.73'ish and 3.3 at VCC.
Sketch:
#define MY_DEBUG // Enable debug prints to serial monitor
#define MY_RADIO_RF24 // Enable and select radio type attached
#define MY_TRANSPORT_WAIT_READY_MS 3000 //set how long to wait for connection to establish before moving on. in milliseconds
#define MY_NODE_ID 21
#define MY_BAUD_RATE 57600
#define DOOR 3
#define DHT_DATA_PIN 5
#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1
#define THMR_PIN A2 // A2/16 pin
#define LED 7
#define SENSOR_TEMP_OFFSET 0
#include <SPI.h>
#include <MySensors.h>
#include <DHT.h>
int BATTERY_SENSE_PIN = A4;
float lastTemp;
float lastHum;
uint8_t nNoUpdatesTemp;
uint8_t nNoUpdatesHum;
bool metric = true;
unsigned long previousMillis = 0;
long sleepTime;
int oldBatteryPcnt = 0;
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
MyMessage msgTempSau(THMR_PIN, V_TEMP);
MyMessage msgDoor(DOOR, V_TRIPPED);
DHT dht;
void presentation()
{
sendSketchInfo("SaunaTempsDoor", "v29032020");
// Register all sensors to gw (they will be created as child devices)
present(CHILD_ID_HUM, S_HUM, "Shower Hum");
present(CHILD_ID_TEMP, S_TEMP, "Shower Temp");
present(THMR_PIN, S_TEMP, "Sauna Temp");
present(DOOR, S_DOOR);
metric = getControllerConfig().isMetric;
}
void setup()
{
dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
sleep(2000);
// pinMode(THMR_PIN, INPUT);
pinMode(DOOR, INPUT_PULLUP);
pinMode(LED, OUTPUT);
// pinMode(BATTERY_SENSE_PIN, INPUT);
for (int i=0; i<6; i++){
digitalWrite(LED, HIGH);
delay(200);
digitalWrite(LED, LOW);
delay(200);
}
analogReference(INTERNAL);
}
void loop()
{
// Check the door
bool doorState = !digitalRead(DOOR);
Serial.print("Sauna door: ");
Serial.println(doorState);
send(msgDoor.set(doorState?"1":"0")); // Send tripped value to gw
// Check DHT-sensor
delay(300);
dht.readSensor(true);
float temperature = dht.getTemperature();
if (isnan(temperature)) {
Serial.println("Failed reading temperature from DHT!");
}
else {
lastTemp = temperature;
send(msgTemp.set(temperature, 2));
Serial.print("Shower T: ");
Serial.println(temperature);
}
float humidity = dht.getHumidity();
if (isnan(humidity)) {
Serial.println("Failed reading humidity from DHT");
}
else {
lastHum = humidity;
send(msgHum.set(humidity, 1));
Serial.print("Shower H: ");
Serial.println(humidity);
}
// Read the thermistor
int _nominal_resistor = 10000;
int _nominal_temperature = 25;
int _b_coefficient = 3950;
int _series_resistor = 10000;
delay(10);
float adcT1 = analogRead(THMR_PIN);
Serial.println(adcT1);
float reading1 = (1023 / adcT1) - 1;
reading1 = _series_resistor / reading1;
float temperatureS;
temperatureS = reading1 / _nominal_resistor; // (R/Ro)
temperatureS = log(temperatureS); // ln(R/Ro)
temperatureS /= _b_coefficient; // 1/B * ln(R/Ro)
temperatureS += 1.0 / (_nominal_temperature + 273.15); // + (1/To)
temperatureS = 1.0 / temperatureS; // Invert
temperatureS -= 273.15; // convert to C
send(msgTempSau.set((int16_t)temperatureS, 2));
Serial.print("Sauna T: ");
Serial.print(temperatureS);
Serial.println(" C");
if (temperatureS > 40){
sleepTime = 300000; // 5min when sauna is hot
Serial.println("Sauna warm, sleeptime 5min");
}
else {
sleepTime = 1800000; // 30min sleep when sauna is <40C
Serial.println("Sauna off, sleeping 30min");
}
// get the battery Voltage
int sensorValue = analogRead(BATTERY_SENSE_PIN);
// 1M & 200k => Vmax = 6.6 Volts => Volts per bit = 0.00645161290323
float batteryV = sensorValue * 0.00645161290323;
Serial.print("Battery Voltage: ");
Serial.print(batteryV);
Serial.print(" V ");
float batteryPcnt = ( (batteryV - 3) / 1.25) * 100;
Serial.print("Battery percent: ");
Serial.print(batteryPcnt);
Serial.println(" %");
if (oldBatteryPcnt != batteryPcnt) {
sendBatteryLevel(batteryPcnt);
oldBatteryPcnt = batteryPcnt;
}
digitalWrite(LED, HIGH);
delay(50);
digitalWrite(LED, LOW);
sleep(1, CHANGE, sleepTime); // Wake to door switch or sleeptime
}
And debug from serial (NO errors etc along the way, sketch uses 60%mem)
17205 MCO:SLP:WUP=1
17209 TSF:TRI:TSB
Sauna door: 0
17219 TSF:MSG:SEND,21-21-9-0,s=3,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=OK:0
17555 TSF:MSG:SEND,21-21-9-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:24.00
Shower T: 24.00
17573 TSF:MSG:SEND,21-21-9-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:16.0
Shower H: 16.00
1023.00
17604 TSF:MSG:SEND,21-21-9-0,s=16,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:-273.00
Sauna T: -273.15 C
Sauna off, sleeping 30min
Battery Voltage: 4.31 V Battery percent: 104.77 %
17627 TSF:MSG:SEND,21-21-9-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:104
17696 MCO:SLP:MS=1800000,SMS=0,I1=1,M1=1,I2=255,M2=255
17707 TSF:TDI:TSL
The reading from battery is correct (almost: multimeter says 4.23 at battery) how to fix this?
Why are my analogReads failing (I already switched from A1 to A2 just in case). I have checked the wiring twenty times.
Once the network works or I have the issue pinned down, I'll be happy to disable all extras. I noticed the weight of the signing and did the debugs one at a time in sequential uploads (time and two computers) to look for the problem.
So your bet is a memory problem at the core of my troubles?
If you like that, I'll happily respect your knowledge in this. And I'll see if it works with minimal moving parts.
I'm wrestling to get my network going.
If I remove the signing, it works perfectly. Once I add the signing, gw responses always end with "signing failed" and thus no connections.
I'm just going to show sketches for gw (LolinV3 NodeMcu1.0) and node (ProMini3.3V) and I will change the passwords and parameters once we figure this out. I will highlight the line that when commented in, causes signing failed. Always.
I did VERBOSE_SIGNING and _RFM69: no errors, only signature failed. Signal strength -55 - -70dBm and sig-noise -99. And no NACKs!
GW:
/*
* The ESP8266 MQTT gateway sends radio network data to your MQTT broker.
*
* LED purposes:
* - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs in your sketch
* - ERR (red) - fast blink on error during transmission error or receive crc error
* UPLOAD at 57600baud!
* Board: NodeMCU 1.0, 4M 1MSPIFFS
*/
#define MY_DEBUG
#define MY_BAUD_RATE 57600
#define MY_RADIO_RFM69
#define MY_RFM69_FREQUENCY RFM69_868MHZ // Set your frequency here
#define MY_IS_RFM69HW // Omit if your RFM is not "H"
#define MY_RFM69_NEW_DRIVER
#define MY_RFM69_NETWORKID 102
#define MY_RFM69_ENABLE_ENCRYPTION
#define MY_RFM69_IRQ_PIN 5 //GPIO 5 = D1
#define MY_RFM69_IRQ_NUM MY_RFM69_IRQ_PIN
#define MY_RFM69_CS_PIN 15 //GPIO 15 = D8
#define MY_GATEWAY_MQTT_CLIENT
#define MY_GATEWAY_ESP8266
//#define MY_SIGNING_SIMPLE_PASSWD "ollila2018" // <= PROBLEM THIS LINE
//#define MY_DEBUG_VERBOSE_SIGNING
#define MY_MQTT_PUBLISH_TOPIC_PREFIX "domoticz/in/mysenRFM69"
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "domoticz/out/mysenRFM69"
#define MY_MQTT_CLIENT_ID "mysenRFM69"
#define MY_MQTT_USER "zzzz"
#define MY_MQTT_PASSWORD "ZZZZZZZZ"
#define MY_WIFI_SSID "Xxxxxx"
#define MY_WIFI_PASSWORD "Yyyyyyyy"
#define MY_HOSTNAME "mqtt-ESP8266-gateway"
#define MY_CONTROLLER_IP_ADDRESS 192, 168, 1, 51 //MQTT ip
#define MY_PORT 1883 // MQTT port
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
#define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin D0 (GPIO 16)
#define MY_WITH_LEDS_BLINKING_INVERSE
#include <ESP8266WiFi.h>
#include <MySensors.h>
void setup()
NODE:
#define MY_DEBUG
#define MY_BAUD_RATE 57600
#define MY_RADIO_RFM69
#define MY_RFM69_FREQUENCY RFM69_868MHZ // Set your frequency here
#define MY_IS_RFM69HW // Omit if your RFM is not "H"
#define MY_RFM69_NEW_DRIVER
#define MY_RFM69_NETWORKID 102
#define MY_RFM69_ENABLE_ENCRYPTION
//#define MY_SIGNING_SIMPLE_PASSWD "ollila2018" // <== PROBLEM HERE
//#define MY_DEBUG_VERBOSE_RFM69
//#define MY_DEBUG_VERBOSE_SIGNING
#define MY_NODE_ID 51
#include <MySensors.h>
I'm starting to suspect a bug. I don't know what else could it be?
Also note, I have not changed MySensors.h or any "hard code"
I had weird problems as well. My W5100 module was at fault.
One module needed resistors and one didn't. I never figured out the problem. I also had what seemed a good ethernet but weird connection problems.
Check this thread out, just in case it helps.
https://forum.arduino.cc/index.php?topic=351477.msg3215306#msg3215306
I have a weird bug, maybe.
I built a new node, it has a motion sensor, relay and thermistor for temp.
It connects well, sends well, Domoticz sees it and all specs are recognized. The relay works, the thermistor sends data that is received. The thermistor and relay become devices I can add, but the motion sensor is missing. It is visible normally (and data received) but does not appear in Devices.
Bug for Domoticz forum?
The serial display is good, Domoticz log is clear of errors.
Just updated to MySensors 2.3.2, Domoticz 4.10717
@rozpruwacz Got lucky and found an extra W5100 without the 100ohm resistors. Also disabled the static ip (I set it from the routers ip table instead).
Now, it seems the gw is breathing..
The Mosquitto is running on RPi, it can be ssh:d easily. Mosquitto service is running and listening.
My router's setup page doesn't show gw as a client (nothing on 192.168.0.201) so I cant connect to it. I connected the ethernet cable directly to the router but the result is the same. The W5100 module lights up fine and the blinking etc seems proper but it's not connecting I think. The ip=0.0.0.0 seems strange.
Exact same behavior when cable is disconnected..
Hi,
I'm getting desperate with my gw. Two days ago a lightning blasted my house and MyS network. Gw destroyed, so I built a new one to figure out which nodes might be alive. I built an exact replica. The lightning also took out my network switch and router. Both bought new and are working well. New ethernet wires too.
Below is my sketch for my gw, log output. The hardware is ProMini5V, W5100 module (with resistor on pins at bottom: https://forum.arduino.cc/index.php?topic=351477.msg3215306#msg3215306), NRF24+PA+LNA. And lots of caps and a voltage regulator mcp1700-3200.
I have checked the parameters of my router and also checked with computer that ethernet lines actually work.
/**
* REVISION HISTORY
* Version 1.0 - Henrik Ekblad
*
* DESCRIPTION
* The W5100 MQTT gateway sends radio network (or locally attached sensors) data to your MQTT broker.
* The node also listens to MY_MQTT_TOPIC_PREFIX and sends out those messages to the radio network
*/
#define MY_DEBUG
#define MY_RADIO_RF24
#define MY_GATEWAY_MQTT_CLIENT
#define MY_MQTT_PUBLISH_TOPIC_PREFIX "domoticz/in/MyMQTT"
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "domoticz/out/MyMQTT"
#define MY_MQTT_CLIENT_ID "mysensors-1"
// Enable Soft SPI for NRF radio (note different radio wiring is required)
// The W5100 ethernet module seems to have a hard time co-operate with
// radio on the same spi bus.
#if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
#define MY_SOFTSPI
#define MY_SOFT_SPI_SCK_PIN 14
#define MY_SOFT_SPI_MISO_PIN 16
#define MY_SOFT_SPI_MOSI_PIN 15
#endif
// When W5100 is connected we have to move CE/CSN pins for NRF radio
#ifndef MY_RF24_CE_PIN
#define MY_RF24_CE_PIN 5
#endif
#ifndef MY_RF24_CS_PIN
#define MY_RF24_CS_PIN 6
#endif
//#define MY_RF24_IRQ_PIN 2
//#define MY_RX_MESSAGE_BUFFER_FEATURE
// Enable these if your MQTT broker requires usenrame/password
#define MY_MQTT_USER "xxxxxxx"
#define MY_MQTT_PASSWORD "yyyyyyyyy"
// Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
#define MY_IP_ADDRESS 192,168,0,201
//#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
// If using static ip you need to define Gateway and Subnet address as well
#define MY_IP_GATEWAY_ADDRESS 192,168,0,1 // Router IP
#define MY_IP_SUBNET_ADDRESS 255,255,255,0
// MQTT broker ip address or url. Define one or the other.
//#define MY_CONTROLLER_URL_ADDRESS "m20.cloudmqtt.com"
#define MY_CONTROLLER_IP_ADDRESS 192, 168, 0, 100
// The MQTT broker port to to open
#define MY_PORT 1883
/*
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
// Uncomment to override default HW configurations
//#define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 16 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 16 // the PCB, on board LED
*/
#include <Ethernet.h>
#include <MySensors.h>
void setup()
{
}
void presentation()
{
// Send the sketch version information to the gateway and Controller
sendSketchInfo("MQTT_GW2", "v13072019");
}
void loop()
{
}
MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1
4 TSM:INIT
5 TSF:WUR:MS=0
11 TSM:INIT:TSP OK
13 TSM:INIT:GW MODE
15 TSM:READY:ID=0,PAR=0,DIS=0
17 MCO:REG:NOT NEEDED
579 GWT:TPC:IP=0.0.0.0
1582 MCO:BGN:STP
1584 MCO:BGN:INIT OK,TSP=1
2146 GWT:TPC:IP=0.0.0.0
3148 GWT:RMQ:MQTT RECONNECT
3151 TSM:READY:NWD REQ
3188 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
3756 GWT:TPC:IP=0.0.0.0
4757 GWT:RMQ:MQTT RECONNECT
5320 GWT:TPC:IP=0.0.0.0
6323 GWT:RMQ:MQTT RECONNECT
6886 GWT:TPC:IP=0.0.0.0
7888 GWT:RMQ:MQTT RECONNECT
8451 GWT:TPC:IP=0.0.0.0
9453 GWT:RMQ:MQTT RECONNECT
10016 GWT:TPC:IP=0.0.0.0
11019 GWT:RMQ:MQTT RECONNECT
11582 GWT:TPC:IP=0.0.0.0
12583 GWT:RMQ:MQTT RECONNECT
13147 GWT:TPC:IP=0.0.0.0
14149 GWT:RMQ:MQTT RECONNECT
14712 GWT:TPC:IP=0.0.0.0
15715 GWT:RMQ:MQTT RECONNECT
16278 GWT:TPC:IP=0.0.0.0
17281 GWT:RMQ:MQTT RECONNECT
17844 GWT:TPC:IP=0.0.0.0
18846 GWT:RMQ:MQTT RECONNECT
Also I have checked my connections three times. And verified that my Mosquitto is listening and ready.
I need fresh ideas. My whole system is pretty dead in the water.
Check out the reply I got. Hope it helps you too.
https://www.domoticz.com/forum/viewtopic.php?f=6&t=28925&p=220914#p220916
Spoke too soon. It seems to die after a while. Here's my log. I don't know how fluent you are with Domoticz but this goes over my head. I also posted to Domoticz forum for help. The log seems fine until this part.
RasPi Zero W / Stretch / v4.10717 stable
2019-08-05 06:07:22.325 Error: Stack frame for all threads:
2019-08-05 06:07:22.325 Error: > [New LWP 457]
2019-08-05 06:07:22.325 Error: > [New LWP 460]
2019-08-05 06:07:22.326 Error: > [New LWP 461]
2019-08-05 06:07:22.326 Error: > [New LWP 481]
2019-08-05 06:07:22.326 Error: > [New LWP 484]
2019-08-05 06:07:22.326 Error: > [New LWP 485]
2019-08-05 06:07:22.326 Error: > [New LWP 488]
2019-08-05 06:07:22.327 Error: > [New LWP 490]
2019-08-05 06:07:22.327 Error: > [New LWP 491]
2019-08-05 06:07:22.327 Error: > [New LWP 492]
2019-08-05 06:07:22.327 Error: > [New LWP 493]
2019-08-05 06:07:22.328 Error: > [New LWP 494]
2019-08-05 06:07:22.328 Error: > [New LWP 550]
2019-08-05 06:07:22.328 Error: > [New LWP 551]
2019-08-05 06:07:22.328 Error: > [New LWP 552]
2019-08-05 06:07:22.328 Error: > [New LWP 557]
2019-08-05 06:07:22.329 Error: > [New LWP 577]
2019-08-05 06:07:22.329 Error: > [New LWP 578]
2019-08-05 06:07:22.329 Error: > [Thread debugging using libthread_db enabled]
2019-08-05 06:07:22.329 Error: > Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
2019-08-05 06:07:22.329 Error: > 0xb6e96d60 in nanosleep () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.329 Error: > 84../sysdeps/unix/syscall-template.S: Tiedostoa tai hakemistoa ei ole.
2019-08-05 06:07:22.330 Error: > Id Target Id Frame
2019-08-05 06:07:22.330 Error: > * 1 Thread 0xb6f72a60 (LWP 456) "domoticz" 0xb6e96d60 in nanosleep () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.330 Error: > 2 Thread 0xb5f62430 (LWP 457) "Watchdog" 0xb6e9751c in __waitpid (pid=647, stat_loc=0xb5f61598, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
2019-08-05 06:07:22.330 Error: > 3 Thread 0xb5761430 (LWP 460) "SQLHelper" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.331 Error: > 4 Thread 0xb4f60430 (LWP 461) "PluginMgr" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.331 Error: > 5 Thread 0xb43b8430 (LWP 481) "InfluxPush" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.331 Error: > 6 Thread 0xb3bb7430 (LWP 484) "Webem_ssncleane" 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.331 Error: > 7 Thread 0xb33b6430 (LWP 485) "WebServer_8080" 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.331 Error: > 8 Thread 0xb29ff430 (LWP 488) "Webem_ssncleane" 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.332 Error: > 9 Thread 0xb21fe430 (LWP 490) "WebServer_443" 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.332 Error: > 10 Thread 0xb19fd430 (LWP 491) "Scheduler" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.340 Error: > 11 Thread 0xb0fff430 (LWP 492) "TCPServer" 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.341 Error: > 12 Thread 0xb07fe430 (LWP 493) "MainWorker" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.341 Error: > 13 Thread 0xafffd430 (LWP 494) "MainWorkerRxMsg" 0xb6e92d3c in __pthread_cond_timedwait (cond=0xb9ce20 <m_mainworker+3720>, mutex=0xb9ce08 <m_mainworker+3696>, abstime=0xafffcdc8) at pthread_cond_timedwait.c:200
2019-08-05 06:07:22.341 Error: > 14 Thread 0xaf7fc430 (LWP 550) "MySensors" 0xb6cde740 in __pselect (nfds=35, readfds=0xaf7fbca8, writefds=0xaf7fbd28, exceptfds=0x0, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:69
2019-08-05 06:07:22.341 Error: > 15 Thread 0xaeffb430 (LWP 551) "Domoticz_HBWork" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.342 Error: > 16 Thread 0xae7fa430 (LWP 552) "MySensorsBase" 0xb6e92d3c in __pthread_cond_timedwait (cond=0x2b62c90, mutex=0x2b62c78, abstime=0xae7f9de8) at pthread_cond_timedwait.c:200
2019-08-05 06:07:22.342 Error: > 17 Thread 0xadff9430 (LWP 557) "PluginMgr_IO" 0xb6e929a4 in __pthread_cond_wait (cond=0x2aeb488, mutex=0x2aeb464) at pthread_cond_wait.c:188
2019-08-05 06:07:22.342 Error: > 18 Thread 0xad7f8430 (LWP 577) "EventSystem" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.342 Error: > 19 Thread 0xacff7430 (LWP 578) "EventSystemQueu" 0xb6e92d3c in __pthread_cond_timedwait (cond=0xb9c0b8 <m_mainworker+288>, mutex=0xb9c0a0 <m_mainworker+264>, abstime=0xacff6d0c) at pthread_cond_timedwait.c:200
2019-08-05 06:07:22.343 Error: >
2019-08-05 06:07:22.343 Error: > Thread 19 (Thread 0xacff7430 (LWP 578)):
2019-08-05 06:07:22.343 Error: > #0 0xb6e92d3c in __pthread_cond_timedwait (cond=0xb9c0b8 <m_mainworker+288>, mutex=0xb9c0a0 <m_mainworker+264>, abstime=0xacff6d0c) at pthread_cond_timedwait.c:200
2019-08-05 06:07:22.343 Error: > #1 0x00267e1c in CEventSystem::EventQueueThread() ()
2019-08-05 06:07:22.343 Error: > #2 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.344 Error: > #3 0xb6e8bfc4 in start_thread (arg=0xacff7430) at pthread_create.c:458
2019-08-05 06:07:22.344 Error: > #4 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.344 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.344 Error: >
2019-08-05 06:07:22.344 Error: > Thread 18 (Thread 0xad7f8430 (LWP 577)):
2019-08-05 06:07:22.344 Error: > #0 syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.345 Error: > #1 0x009ced5c in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2019-08-05 06:07:22.345 Error: > #2 0x0025e40c in CEventSystem::Do_Work() ()
2019-08-05 06:07:22.345 Error: > #3 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.345 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xad7f8430) at pthread_create.c:458
2019-08-05 06:07:22.345 Error: > #5 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.346 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.346 Error: >
2019-08-05 06:07:22.346 Error: > Thread 17 (Thread 0xadff9430 (LWP 557)):
2019-08-05 06:07:22.346 Error: > #0 0xb6e929a4 in __pthread_cond_wait (cond=0x2aeb488, mutex=0x2aeb464) at pthread_cond_wait.c:188
2019-08-05 06:07:22.346 Error: > #1 0x003f338c in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2019-08-05 06:07:22.347 Error: > #2 0x003f4180 in boost::asio::io_context::run() ()
2019-08-05 06:07:22.347 Error: > #3 0x008a3c5c in thread_proxy ()
2019-08-05 06:07:22.347 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xadff9430) at pthread_create.c:458
2019-08-05 06:07:22.347 Error: > #5 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.347 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.347 Error: >
2019-08-05 06:07:22.348 Error: > Thread 16 (Thread 0xae7fa430 (LWP 552)):
2019-08-05 06:07:22.348 Error: > #0 0xb6e92d3c in __pthread_cond_timedwait (cond=0x2b62c90, mutex=0x2b62c78, abstime=0xae7f9de8) at pthread_cond_timedwait.c:200
2019-08-05 06:07:22.348 Error: > #1 0x004d94d0 in MySensorsBase::Do_Work() ()
2019-08-05 06:07:22.348 Error: > #2 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.348 Error: > #3 0xb6e8bfc4 in start_thread (arg=0xae7fa430) at pthread_create.c:458
2019-08-05 06:07:22.349 Error: > #4 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.349 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.349 Error: >
2019-08-05 06:07:22.349 Error: > Thread 15 (Thread 0xaeffb430 (LWP 551)):
2019-08-05 06:07:22.349 Error: > #0 syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.350 Error: > #1 0x009ced5c in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2019-08-05 06:07:22.360 Error: > #2 0x00437e28 in CDomoticzHardwareBase::Do_Heartbeat_Work() ()
2019-08-05 06:07:22.360 Error: > #3 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.361 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xaeffb430) at pthread_create.c:458
2019-08-05 06:07:22.361 Error: > Backtrace stopped: Cannot access memory at address 0x1076f776
2019-08-05 06:07:22.361 Error: >
2019-08-05 06:07:22.361 Error: > Thread 14 (Thread 0xaf7fc430 (LWP 550)):
2019-08-05 06:07:22.361 Error: > #0 0xb6cde740 in __pselect (nfds=35, readfds=0xaf7fbca8, writefds=0xaf7fbd28, exceptfds=0x0, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:69
2019-08-05 06:07:22.362 Error: > #1 0x008d6240 in mosquitto_loop.part ()
2019-08-05 06:07:22.362 Error: > #2 0x004cd428 in MQTT::Do_Work() ()
2019-08-05 06:07:22.362 Error: > #3 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.362 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xaf7fc430) at pthread_create.c:458
2019-08-05 06:07:22.362 Error: > Backtrace stopped: Cannot access memory at address 0x4
2019-08-05 06:07:22.363 Error: >
2019-08-05 06:07:22.363 Error: > Thread 13 (Thread 0xafffd430 (LWP 494)):
2019-08-05 06:07:22.363 Error: > #0 0xb6e92d3c in __pthread_cond_timedwait (cond=0xb9ce20 <m_mainworker+3720>, mutex=0xb9ce08 <m_mainworker+3696>, abstime=0xafffcdc8) at pthread_cond_timedwait.c:200
2019-08-05 06:07:22.363 Error: > #1 0x002af548 in MainWorker::Do_Work_On_Rx_Messages() ()
2019-08-05 06:07:22.363 Error: > #2 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.364 Error: > #3 0xb6e8bfc4 in start_thread (arg=0xafffd430) at pthread_create.c:458
2019-08-05 06:07:22.364 Error: > #4 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.364 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.364 Error: >
2019-08-05 06:07:22.364 Error: > Thread 12 (Thread 0xb07fe430 (LWP 493)):
2019-08-05 06:07:22.365 Error: > #0 syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.365 Error: > #1 0x009ced5c in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2019-08-05 06:07:22.365 Error: > #2 0x002abf5c in MainWorker::Do_Work() ()
2019-08-05 06:07:22.365 Error: > #3 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.365 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xb07fe430) at pthread_create.c:458
2019-08-05 06:07:22.365 Error: > #5 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.366 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.366 Error: >
2019-08-05 06:07:22.366 Error: > Thread 11 (Thread 0xb0fff430 (LWP 492)):
2019-08-05 06:07:22.366 Error: > #0 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.366 Error: > #1 0x003f1f64 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2019-08-05 06:07:22.367 Error: > #2 0x003f3218 in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2019-08-05 06:07:22.367 Error: > #3 0x0065db80 in tcp::server::CTCPServer::Do_Work() ()
2019-08-05 06:07:22.367 Error: > #4 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.367 Error: > #5 0xb6e8bfc4 in start_thread (arg=0xb0fff430) at pthread_create.c:458
2019-08-05 06:07:22.368 Error: > #6 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.368 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.368 Error: >
2019-08-05 06:07:22.368 Error: > Thread 10 (Thread 0xb19fd430 (LWP 491)):
2019-08-05 06:07:22.368 Error: > #0 syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.369 Error: > #1 0x009ced5c in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2019-08-05 06:07:22.369 Error: > #2 0x002cf0b0 in CScheduler::Do_Work() ()
2019-08-05 06:07:22.369 Error: > #3 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.369 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xb19fd430) at pthread_create.c:458
2019-08-05 06:07:22.369 Error: > #5 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.370 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.380 Error: >
2019-08-05 06:07:22.380 Error: > Thread 9 (Thread 0xb21fe430 (LWP 490)):
2019-08-05 06:07:22.381 Error: > #0 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.381 Error: > #1 0x003f1f64 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2019-08-05 06:07:22.381 Error: > #2 0x003f3218 in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2019-08-05 06:07:22.381 Error: > #3 0x00698a4c in http::server::server_base::run() ()
2019-08-05 06:07:22.381 Error: > #4 0x0031a848 in http::server::CWebServer::Do_Work() ()
2019-08-05 06:07:22.382 Error: > #5 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.382 Error: > #6 0xb6e8bfc4 in start_thread (arg=0xb21fe430) at pthread_create.c:458
2019-08-05 06:07:22.382 Error: > #7 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.382 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.382 Error: >
2019-08-05 06:07:22.383 Error: > Thread 8 (Thread 0xb29ff430 (LWP 488)):
2019-08-05 06:07:22.383 Error: > #0 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.383 Error: > #1 0x003f1f64 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2019-08-05 06:07:22.383 Error: > #2 0x003f3218 in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2019-08-05 06:07:22.383 Error: > #3 0x003f4180 in boost::asio::io_context::run() ()
2019-08-05 06:07:22.384 Error: > #4 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.384 Error: > #5 0xb6e8bfc4 in start_thread (arg=0xb29ff430) at pthread_create.c:458
2019-08-05 06:07:22.384 Error: > #6 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.384 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.384 Error: >
2019-08-05 06:07:22.384 Error: > Thread 7 (Thread 0xb33b6430 (LWP 485)):
2019-08-05 06:07:22.385 Error: > #0 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.385 Error: > #1 0x003f1f64 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2019-08-05 06:07:22.385 Error: > #2 0x003f3218 in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2019-08-05 06:07:22.385 Error: > #3 0x00698a4c in http::server::server_base::run() ()
2019-08-05 06:07:22.386 Error: > #4 0x0031a848 in http::server::CWebServer::Do_Work() ()
2019-08-05 06:07:22.386 Error: > #5 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.386 Error: > #6 0xb6e8bfc4 in start_thread (arg=0xb33b6430) at pthread_create.c:458
2019-08-05 06:07:22.386 Error: > #7 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.386 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.387 Error: >
2019-08-05 06:07:22.387 Error: > Thread 6 (Thread 0xb3bb7430 (LWP 484)):
2019-08-05 06:07:22.387 Error: > #0 0xb6ce5704 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.387 Error: > #1 0x003f1f64 in boost::asio::detail::epoll_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) ()
2019-08-05 06:07:22.387 Error: > #2 0x003f3218 in boost::asio::detail::scheduler::run(boost::system::error_code&) ()
2019-08-05 06:07:22.388 Error: > #3 0x003f4180 in boost::asio::io_context::run() ()
2019-08-05 06:07:22.388 Error: > #4 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.388 Error: > #5 0xb6e8bfc4 in start_thread (arg=0xb3bb7430) at pthread_create.c:458
2019-08-05 06:07:22.388 Error: > #6 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.388 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.388 Error: >
2019-08-05 06:07:22.389 Error: > Thread 5 (Thread 0xb43b8430 (LWP 481)):
2019-08-05 06:07:22.389 Error: > #0 syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.389 Error: > #1 0x009ced5c in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2019-08-05 06:07:22.389 Error: > #2 0x003c1574 in CInfluxPush::Do_Work() ()
2019-08-05 06:07:22.390 Error: > #3 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.400 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xb43b8430) at pthread_create.c:458
2019-08-05 06:07:22.400 Error: > #5 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.400 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.401 Error: >
2019-08-05 06:07:22.401 Error: > Thread 4 (Thread 0xb4f60430 (LWP 461)):
2019-08-05 06:07:22.401 Error: > #0 syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.401 Error: > #1 0x009ced5c in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2019-08-05 06:07:22.401 Error: > #2 0x0060f1c4 in Plugins::CPluginSystem::Do_Work() ()
2019-08-05 06:07:22.402 Error: > #3 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.402 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xb4f60430) at pthread_create.c:458
2019-08-05 06:07:22.402 Error: > Backtrace stopped: Cannot access memory at address 0x65732f5a
2019-08-05 06:07:22.402 Error: >
2019-08-05 06:07:22.402 Error: > Thread 3 (Thread 0xb5761430 (LWP 460)):
2019-08-05 06:07:22.403 Error: > #0 syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
2019-08-05 06:07:22.403 Error: > #1 0x009ced5c in std::__atomic_futex_unsigned_base::_M_futex_wait_until(unsigned int*, unsigned int, bool, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> >) ()
2019-08-05 06:07:22.403 Error: > #2 0x002f0c94 in CSQLHelper::Do_Work() ()
2019-08-05 06:07:22.403 Error: > #3 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.403 Error: > #4 0xb6e8bfc4 in start_thread (arg=0xb5761430) at pthread_create.c:458
2019-08-05 06:07:22.404 Error: > #5 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.404 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.404 Error: >
2019-08-05 06:07:22.404 Error: > Thread 2 (Thread 0xb5f62430 (LWP 457)):
2019-08-05 06:07:22.404 Error: > #0 0xb6e9751c in __waitpid (pid=647, stat_loc=0xb5f61598, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
2019-08-05 06:07:22.405 Error: > #1 0x002d8840 in dumpstack_gdb(bool) ()
2019-08-05 06:07:22.405 Error: > #2 0x002d8d64 in signal_handler(int, siginfo_t*, void*) ()
2019-08-05 06:07:22.405 Error: > #3 <signal handler called>
2019-08-05 06:07:22.405 Error: > #4 raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:51
2019-08-05 06:07:22.405 Error: > #5 0x002d9028 in Do_Watchdog_Work() ()
2019-08-05 06:07:22.406 Error: > #6 0x009f18fc in execute_native_thread_routine ()
2019-08-05 06:07:22.406 Error: > #7 0xb6e8bfc4 in start_thread (arg=0xb5f62430) at pthread_create.c:458
2019-08-05 06:07:22.406 Error: > #8 0xb6ce5038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
2019-08-05 06:07:22.406 Error: > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
2019-08-05 06:07:22.406 Error: >
2019-08-05 06:07:22.406 Error: > Thread 1 (Thread 0xb6f72a60 (LWP 456)):
2019-08-05 06:07:22.407 Error: > #0 0xb6e96d60 in nanosleep () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.407 Error: > #1 0x00278548 in sleep_seconds(long) ()
2019-08-05 06:07:22.407 Error: > #2 0x001f6620 in main ()
2019-08-05 06:07:22.407 Error: >
2019-08-05 06:07:22.407 Error: > Main thread:
2019-08-05 06:07:22.408 Error: > #0 0xb6e96d60 in nanosleep () at ../sysdeps/unix/syscall-template.S:84
2019-08-05 06:07:22.408 Error: > #1 0x00278548 in sleep_seconds(long) ()
2019-08-05 06:07:22.408 Error: > #2 0x001f6620 in main ()
2019-08-05 06:07:22.842 Status: Closing application!...
2019-08-05 06:07:22.842 Status: Stopping worker...
2019-08-05 06:07:22.843 Status: RxQueue: queue worker stopped...
2019-08-05 06:07:23.328 MySensorsMQTT: Topic: domoticz/in/MyMQTT/18/1/1/0/17, Message: 2681
2019-08-05 06:07:23.345 Status: WebServer(HTTP) stopped
2019-08-05 06:07:23.349 Status: WebServer(SSL) stopped
2019-08-05 06:07:23.361 Status: TCPServer: shared server stopped
2019-08-05 06:07:23.361 Status: Stopping all hardware...
2019-08-05 06:07:23.364 Status: MQTT: Worker stopped...
2019-08-05 06:07:23.376 Status: Scheduler stopped...
2019-08-05 06:07:23.378 Status: EventSystem: Stopped...
2019-08-05 06:07:23.379 Status: EventSystem: Queue thread stopped...
2019-08-05 06:07:23.526 Status: EventSystem - Python stopped...
2019-08-05 06:07:23.541 Status: PluginSystem: Exiting work loop.
2019-08-05 06:07:23.681 Status: PluginSystem: Stopped.
2019-08-05 06:07:23.682 Status: Mainworker Stopped...
So, strange one this: ssh to Pi and ran update & upgrade again. Reboot and everything came back.
I have a watchdog running that should reboot if Domoticz hangs etc but it wasn't reacting. I will update if I get more failures. This was not network etc related. That I was able to troubleshoot from outside.
Update: it reoccured after I backed up my sd. Domoticz process was "exited". systemctl restart and it works fine again. Will examine the logs.
@dzjr Yeah, I have another beta running at another house. It's working fine, so not a global issue.
I updated my raspberry software as well (running DietPi though). Still works.
I will be troubleshooting this latest on sunday and hopefully figure it out. Or someone else has by then..
+1
I have also had a perfectly working system (beta as well) for a month (no Domoticz updates during this time, only apt-get update+upgrade for Rasbian) that stopped working suddenly. The problem has occured sometime between sunday and wednesday (today).
I didn't have time to troubleshoot today, but I did a reboot but no change.
@mfalkvidd What could be causing it? The two are in the same room 2m apart.
I have "overpowered" gw (wall wart) and node (usb+battery) to make sure power wouldnt again be the typical culprit here. Also re-verified all connections.
Built extra sensor too but thats not working at all (gotta re-check solders etc again and bootloader&sketch upload).
@mfalkvidd OK, I did research that a little bit.
If the signal is good, why all the NACKs?
This?
16329 RFM69:CSMA:RSSI=-95
16516 !RFM69:SWR:NACK
16520 !TSF:MSG:SEND,51-51-0-0,s=4,c=3,t=16,pt=0,l=0,sg=1,ft=2,st=NACK:
16532 !TSF:MSG:SIGN FAIL
16536 RFM69:SWR:SEND,TO=0,SEQ=19,RETRY=0
16546 RFM69:CSMA:RSSI=-91
I added the NEW_DRIVER to gw and node and re-added HW-option as well.
Now within 1m of each other I get this output from node:
| \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| | | | |_| |___| | __/ | | \__ \ _ | | \__ \
|_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/
|___/ 2.3.1
32 MCO:BGN:INIT NODE,CP=RPNNAS--,REL=255,VER=2.3.1
53 MCO:BGN:BFR
2082 TSM:INIT
2086 TSF:WUR:MS=0
2088 RFM69:INIT
2093 RFM69:INIT:PIN,CS=10,IQP=2,IQN=0
2099 RFM69:PTX:LEVEL=5 dBm
2105 TSM:INIT:TSP OK
2109 TSM:INIT:STATID=51
2113 TSF:SID:OK,ID=51
2117 TSM:FPAR
2119 RFM69:SWR:SEND,TO=255,SEQ=0,RETRY=0
2129 RFM69:CSMA:RSSI=-92
2134 RFM69:CSMA:RSSI=-96
2138 TSF:MSG:SEND,51-51-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
3012 RFM69:SAC:SEND ACK,TO=0,RSSI=-46
3020 RFM69:CSMA:RSSI=-100
3026 TSF:MSG:READ,0-0-51,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
4153 !TSM:FPAR:NO REPLY
4157 TSM:FPAR
4159 RFM69:SWR:SEND,TO=255,SEQ=2,RETRY=0
4167 RFM69:CSMA:RSSI=-93
4171 RFM69:CSMA:RSSI=-95
4179 TSF:MSG:SEND,51-51-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
4710 RFM69:SAC:SEND ACK,TO=0,RSSI=-48
4718 RFM69:CSMA:RSSI=-94
4724 RFM69:CSMA:RSSI=-95
4730 TSF:MSG:READ,0-0-51,s=255,c=3,t=8,pt=1,l=1,sg=0:0
4741 TSF:MSG:FPAR OK,ID=0,D=1
6195 TSM:FPAR:OK
6197 TSM:ID
6199 TSM:ID:OK
6203 TSM:UPL
6205 RFM69:SWR:SEND,TO=0,SEQ=4,RETRY=0
6213 RFM69:CSMA:RSSI=-92
6217 RFM69:CSMA:RSSI=-94
6221 RFM69:CSMA:RSSI=-91
6227 RFM69:CSMA:RSSI=-92
6232 RFM69:CSMA:RSSI=-90
6236 RFM69:CSMA:RSSI=-93
6240 RFM69:CSMA:RSSI=-98
6301 RFM69:SWR:ACK,FROM=0,SEQ=5,RSSI=-46
6309 RFM69:ATC:ADJ TXL,cR=-46,tR=-78..-82,TXL=5
6318 RFM69:PTX:LEVEL=4 dBm
6322 TSF:MSG:SEND,51-51-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
7012 RFM69:SAC:SEND ACK,TO=0,RSSI=-55
7020 RFM69:CSMA:RSSI=-89
7024 RFM69:CSMA:RSSI=-91
7028 RFM69:CSMA:RSSI=-88
7032 RFM69:CSMA:RSSI=-91
7038 RFM69:CSMA:RSSI=-95
7045 TSF:MSG:READ,0-0-51,s=255,c=3,t=25,pt=1,l=1,sg=0:1
7055 TSF:MSG:PONG RECV,HP=1
7061 TSM:UPL:OK
7063 TSM:READY:ID=51,PAR=0,DIS=1
7069 RFM69:SWR:SEND,TO=0,SEQ=6,RETRY=0
7077 RFM69:CSMA:RSSI=-96
7139 RFM69:SWR:ACK,FROM=0,SEQ=7,RSSI=-50
7147 RFM69:ATC:ADJ TXL,cR=-50,tR=-78..-82,TXL=4
7155 RFM69:PTX:LEVEL=3 dBm
7159 TSF:MSG:SEND,51-51-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
7839 RFM69:SAC:SEND ACK,TO=0,RSSI=-55
7845 RFM69:CSMA:RSSI=-92
7852 RFM69:CSMA:RSSI=-93
7856 RFM69:CSMA:RSSI=-99
7862 TSF:MSG:READ,0-0-51,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
7874 RFM69:SWR:SEND,TO=0,SEQ=8,RETRY=0
7882 RFM69:CSMA:RSSI=-93
7886 RFM69:CSMA:RSSI=-93
7890 RFM69:CSMA:RSSI=-96
7952 RFM69:SWR:ACK,FROM=0,SEQ=9,RSSI=-50
7960 RFM69:ATC:ADJ TXL,cR=-50,tR=-78..-82,TXL=3
7968 RFM69:PTX:LEVEL=2 dBm
7972 TSF:MSG:SEND,51-51-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
8806 RFM69:SAC:SEND ACK,TO=0,RSSI=-57
8814 RFM69:CSMA:RSSI=-92
8818 RFM69:CSMA:RSSI=-92
8824 RFM69:CSMA:RSSI=-92
8828 RFM69:CSMA:RSSI=-94
8833 RFM69:CSMA:RSSI=-94
8837 RFM69:CSMA:RSSI=-93
8843 RFM69:CSMA:RSSI=-90
8847 RFM69:CSMA:RSSI=-95
8851 RFM69:CSMA:RSSI=-93
8855 RFM69:CSMA:RSSI=-90
8861 RFM69:CSMA:RSSI=-92
8865 RFM69:CSMA:RSSI=-91
8869 RFM69:CSMA:RSSI=-92
8873 RFM69:CSMA:RSSI=-94
8880 RFM69:CSMA:RSSI=-93
8884 RFM69:CSMA:RSSI=-91
8888 RFM69:CSMA:RSSI=-91
8892 RFM69:CSMA:RSSI=-91
8898 RFM69:CSMA:RSSI=-93
8902 RFM69:CSMA:RSSI=-91
8906 RFM69:CSMA:RSSI=-96
8914 TSF:MSG:READ,0-0-51,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
8972 RFM69:SWR:SEND,TO=0,SEQ=10,RETRY=0
8980 RFM69:CSMA:RSSI=-93
8986 RFM69:CSMA:RSSI=-91
8990 RFM69:CSMA:RSSI=-96
9056 RFM69:SWR:ACK,FROM=0,SEQ=11,RSSI=-51
9062 RFM69:ATC:ADJ TXL,cR=-51,tR=-78..-82,TXL=2
9070 RFM69:PTX:LEVEL=1 dBm
9076 TSF:MSG:SEND,51-51-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.3.1
9091 RFM69:SWR:SEND,TO=0,SEQ=11,RETRY=0
9099 RFM69:CSMA:RSSI=-96
9162 RFM69:SWR:ACK,FROM=0,SEQ=12,RSSI=-54
9171 RFM69:ATC:ADJ TXL,cR=-54,tR=-78..-82,TXL=1
9179 RFM69:PTX:LEVEL=0 dBm
9185 TSF:MSG:SEND,51-51-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
10354 RFM69:SAC:SEND ACK,TO=0,RSSI=-56
10362 RFM69:CSMA:RSSI=-97
10369 TSF:MSG:READ,0-0-51,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
10427 RFM69:SWR:SEND,TO=0,SEQ=13,RETRY=0
10436 RFM69:CSMA:RSSI=-91
10440 RFM69:CSMA:RSSI=-93
10446 RFM69:CSMA:RSSI=-93
10450 RFM69:CSMA:RSSI=-91
10456 RFM69:CSMA:RSSI=-93
10460 RFM69:CSMA:RSSI=-93
10464 RFM69:CSMA:RSSI=-94
10470 RFM69:CSMA:RSSI=-96
10534 RFM69:SWR:ACK,FROM=0,SEQ=14,RSSI=-53
10542 RFM69:ATC:ADJ TXL,cR=-53,tR=-78..-82,TXL=0
10550 RFM69:PTX:LEVEL=-1 dBm
10556 TSF:MSG:SEND,51-51-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
12570 RFM69:SWR:SEND,TO=0,SEQ=14,RETRY=0
12578 RFM69:CSMA:RSSI=-96
12643 RFM69:SWR:ACK,FROM=0,SEQ=15,RSSI=-58
12649 RFM69:ATC:ADJ TXL,cR=-58,tR=-78..-82,TXL=-1
12660 RFM69:PTX:LEVEL=-2 dBm
12664 TSF:MSG:SEND,51-51-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
13553 RFM69:SAC:SEND ACK,TO=0,RSSI=-56
13561 RFM69:CSMA:RSSI=-95
13567 TSF:MSG:READ,0-0-51,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
13626 RFM69:SWR:SEND,TO=0,SEQ=16,RETRY=0
13634 RFM69:CSMA:RSSI=-94
13638 RFM69:CSMA:RSSI=-93
13644 RFM69:CSMA:RSSI=-94
13648 RFM69:CSMA:RSSI=-94
13655 RFM69:CSMA:RSSI=-93
13659 RFM69:CSMA:RSSI=-90
13663 RFM69:CSMA:RSSI=-92
13669 RFM69:CSMA:RSSI=-91
13673 RFM69:CSMA:RSSI=-98
13739 RFM69:SWR:ACK,FROM=0,SEQ=17,RSSI=-58
13747 TSF:MSG:SEND,51-51-0-0,s=255,c=3,t=11,pt=0,l=23,sg=1,ft=0,st=OK:RFID Lock & Door sensor
13763 RFM69:SWR:SEND,TO=0,SEQ=17,RETRY=0
13771 RFM69:CSMA:RSSI=-96
13984 !RFM69:SWR:NACK
13988 RFM69:SWR:SEND,TO=0,SEQ=18,RETRY=1
13997 RFM69:CSMA:RSSI=-91
14001 RFM69:CSMA:RSSI=-93
14005 RFM69:CSMA:RSSI=-91
14011 RFM69:CSMA:RSSI=-92
14015 RFM69:CSMA:RSSI=-92
14021 RFM69:CSMA:RSSI=-91
14025 RFM69:CSMA:RSSI=-91
14029 RFM69:CSMA:RSSI=-91
14036 RFM69:CSMA:RSSI=-93
14040 RFM69:CSMA:RSSI=-93
14044 RFM69:CSMA:RSSI=-91
14050 RFM69:CSMA:RSSI=-89
14054 RFM69:CSMA:RSSI=-93
14060 RFM69:CSMA:RSSI=-96
14271 !RFM69:SWR:NACK
14275 RFM69:SWR:SEND,TO=0,SEQ=18,RETRY=2
14283 RFM69:CSMA:RSSI=-91
14287 RFM69:CSMA:RSSI=-91
14292 RFM69:CSMA:RSSI=-93
14298 RFM69:CSMA:RSSI=-89
14302 RFM69:CSMA:RSSI=-90
14308 RFM69:CSMA:RSSI=-89
14312 RFM69:CSMA:RSSI=-91
14316 RFM69:CSMA:RSSI=-91
14322 RFM69:CSMA:RSSI=-91
14326 RFM69:CSMA:RSSI=-52
14330 RFM69:CSMA:RSSI=-51
14337 RFM69:CSMA:RSSI=-52
14341 RFM69:CSMA:RSSI=-94
14347 RFM69:CSMA:RSSI=-91
14351 RFM69:CSMA:RSSI=-92
14355 RFM69:CSMA:RSSI=-94
14361 RFM69:CSMA:RSSI=-91
14365 RFM69:CSMA:RSSI=-90
14369 RFM69:CSMA:RSSI=-93
14376 RFM69:CSMA:RSSI=-93
14380 RFM69:CSMA:RSSI=-93
14386 RFM69:CSMA:RSSI=-91
14390 RFM69:CSMA:RSSI=-94
14394 RFM69:CSMA:RSSI=-95
14400 RFM69:CSMA:RSSI=-90
14404 RFM69:CSMA:RSSI=-91
14408 RFM69:CSMA:RSSI=-91
14414 RFM69:CSMA:RSSI=-91
14419 RFM69:CSMA:RSSI=-91
14425 RFM69:CSMA:RSSI=-91
14429 RFM69:CSMA:RSSI=-96
14634 !RFM69:SWR:NACK
14638 RFM69:SWR:SEND,TO=0,SEQ=18,RETRY=3
14646 RFM69:CSMA:RSSI=-91
14650 RFM69:CSMA:RSSI=-93
14654 RFM69:CSMA:RSSI=-93
14660 RFM69:CSMA:RSSI=-93
14664 RFM69:CSMA:RSSI=-95
14670 RFM69:CSMA:RSSI=-93
14675 RFM69:CSMA:RSSI=-91
14679 RFM69:CSMA:RSSI=-89
14685 RFM69:CSMA:RSSI=-93
14689 RFM69:CSMA:RSSI=-93
14693 RFM69:CSMA:RSSI=-94
14699 RFM69:CSMA:RSSI=-95
14703 RFM69:CSMA:RSSI=-90
14709 RFM69:CSMA:RSSI=-92
14713 RFM69:CSMA:RSSI=-90
14718 RFM69:CSMA:RSSI=-91
14724 RFM69:CSMA:RSSI=-95
14935 !RFM69:SWR:NACK
14939 RFM69:SWR:SEND,TO=0,SEQ=18,RETRY=4
14947 RFM69:CSMA:RSSI=-93
14951 RFM69:CSMA:RSSI=-96
15164 !RFM69:SWR:NACK
15168 RFM69:SWR:SEND,TO=0,SEQ=18,RETRY=5
15176 RFM69:CSMA:RSSI=-95
15387 !RFM69:SWR:NACK
15391 !TSF:MSG:SEND,51-51-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
15404 !TSF:MSG:SIGN FAIL
15408 RFM69:SWR:SEND,TO=0,SEQ=18,RETRY=0
15418 RFM69:CSMA:RSSI=-93
15422 RFM69:CSMA:RSSI=-93
15426 RFM69:CSMA:RSSI=-97
15461 !RFM69:SWR:NACK
15465 RFM69:SWR:SEND,TO=0,SEQ=19,RETRY=1
15473 RFM69:CSMA:RSSI=-95
15494 !RFM69:SWR:NACK
15498 RFM69:SWR:SEND,TO=0,SEQ=19,RETRY=2
15506 RFM69:CSMA:RSSI=-93
15512 RFM69:CSMA:RSSI=-97
15725 !RFM69:SWR:NACK
15729 RFM69:SWR:SEND,TO=0,SEQ=19,RETRY=3
15737 RFM69:CSMA:RSSI=-94
15742 RFM69:CSMA:RSSI=-93
15746 RFM69:CSMA:RSSI=-96
15959 !RFM69:SWR:NACK
15963 RFM69:SWR:SEND,TO=0,SEQ=19,RETRY=4
15971 RFM69:CSMA:RSSI=-93
15975 RFM69:CSMA:RSSI=-94
15979 RFM69:CSMA:RSSI=-93
15985 RFM69:CSMA:RSSI=-94
15989 RFM69:CSMA:RSSI=-94
15995 RFM69:CSMA:RSSI=-91
16000 RFM69:CSMA:RSSI=-94
16004 RFM69:CSMA:RSSI=-93
16010 RFM69:CSMA:RSSI=-94
16014 RFM69:CSMA:RSSI=-51
16018 RFM69:CSMA:RSSI=-52
16024 RFM69:CSMA:RSSI=-94
16028 RFM69:CSMA:RSSI=-92
16034 RFM69:CSMA:RSSI=-96
16239 !RFM69:SWR:NACK
16243 RFM69:SWR:SEND,TO=0,SEQ=19,RETRY=5
16251 RFM69:CSMA:RSSI=-94
16256 RFM69:CSMA:RSSI=-91
16260 RFM69:CSMA:RSSI=-91
16266 RFM69:CSMA:RSSI=-92
16270 RFM69:CSMA:RSSI=-91
16276 RFM69:CSMA:RSSI=-89
16280 RFM69:CSMA:RSSI=-90
16284 RFM69:CSMA:RSSI=-93
16290 RFM69:CSMA:RSSI=-93
16294 RFM69:CSMA:RSSI=-91
16299 RFM69:CSMA:RSSI=-90
16305 RFM69:CSMA:RSSI=-94
16309 RFM69:CSMA:RSSI=-92
16315 RFM69:CSMA:RSSI=-93
16319 RFM69:CSMA:RSSI=-92
16323 RFM69:CSMA:RSSI=-94
16329 RFM69:CSMA:RSSI=-95
16516 !RFM69:SWR:NACK
16520 !TSF:MSG:SEND,51-51-0-0,s=4,c=3,t=16,pt=0,l=0,sg=1,ft=2,st=NACK:
16532 !TSF:MSG:SIGN FAIL
16536 RFM69:SWR:SEND,TO=0,SEQ=19,RETRY=0
16546 RFM69:CSMA:RSSI=-91
16550 RFM69:CSMA:RSSI=-93
16555 RFM69:CSMA:RSSI=-92
16561 RFM69:CSMA:RSSI=-91
16565 RFM69:CSMA:RSSI=-92
16571 RFM69:CSMA:RSSI=-92
16575 RFM69:CSMA:RSSI=-92
16579 RFM69:CSMA:RSSI=-92
16585 RFM69:CSMA:RSSI=-92
16589 RFM69:CSMA:RSSI=-93
16593 RFM69:CSMA:RSSI=-91
16600 RFM69:CSMA:RSSI=-93
16604 RFM69:CSMA:RSSI=-93
16610 RFM69:CSMA:RSSI=-91
16614 RFM69:CSMA:RSSI=-92
16618 RFM69:CSMA:RSSI=-93
16624 RFM69:CSMA:RSSI=-93
16628 RFM69:CSMA:RSSI=-95
16632 RFM69:CSMA:RSSI=-90
16639 RFM69:CSMA:RSSI=-93
16643 RFM69:CSMA:RSSI=-93
16649 RFM69:CSMA:RSSI=-92
That implies bad radio-levels, right?
@mfalkvidd Verbose_rfm69 did nothing but uncommenting the HW seems to have worked. I'm getting 2m range now, so probably same problem on the GW as well?
I looked at the modules and compared pictures. They're Chinese but the smd's on the board do match the HW-version.
@mfalkvidd Exactly. That's where it just gets stuck. The other node didn't have the void-before so it just gets stuck when I power it up.
I need help after 3wks of trying to find the problem. Couldn't find any similar problems of the forum either.
I have built a node using Slim Node PCB but instead of NRF24 I have jumper wires to RFM69 connected per pin numbers to Atmega328P.
My gateway is ESP8266(LolinV3)+RFM69HW (I can ping the ip without problems) so it's probably working (Domoticz "sees" it OK as well).
This is my node sketch. The "void before" blinks the LED okay, but then it hangs.
I have checked radio connections. I have the normal 10K res & 3x 0.1yF caps on PCB + 1x 4.7yF electrolytic+1x 0.1yF ceramic closer to the radio.
I built also another node, but it has similar problems.
/**
* DESCRIPTION
* RFID Lock sensor/actuator
*
* Use the I2C wiring option for your RFID module and connect to the following Arduino pins.
* RFID Arduino
* ----- -------
* GND -> GND
* VCC -> +5V
* SCL -> A5
* SDA -> A4
* Relay for solenoid lock on pin 4
*/
#define MY_DEBUG
#define MY_RADIO_RFM69
#define MY_RFM69_FREQUENCY RFM69_868MHZ // Set your frequency here
#define MY_IS_RFM69HW
#define MY_SIGNING_SIMPLE_PASSWD "XXXXXXXXXX"
#define MY_NODE_ID 51
#define MY_BAUD_RATE 57600
#include <MySensors.h>
#include <Wire.h>
#include <PN532_I2C.h>
#include <PN532.h>
// Add your valid rfid keys here. To find you your key just run sketch; hold your new RFID tag in fron ot the reader;
// and copy the key from serial output of this sketch.
const uint8_t maxKeyLength = 7;
uint8_t validKeys[][maxKeyLength] = {
{ 0xB3, 0xC6, 0xD9, 0x80, 0x00, 0x00, 0x00 },
{ 0, 0, 0, 0, 0, 0, 0 }, // ADD YOUR KEYS HERE!
{ 0, 0, 0, 0, 0, 0, 0 }};
int keyCount = sizeof validKeys / maxKeyLength;
#define LOCK 4 // Id and pin of Lock solenoid
#define DOOR 5 // Reed switch
#define LED 7 //Indicator LED
bool lockStatus;
bool lastStatus = 1;
MyMessage lockMsg(LOCK, V_LOCK_STATUS);
MyMessage doorMsg(DOOR, V_TRIPPED);
PN532_I2C pn532i2c(Wire);
PN532 nfc(pn532i2c);
void before()
{
pinMode(LED, OUTPUT);
int i = 0;
for(i=0; i < 5; i++) {
digitalWrite(LED, HIGH);
delay(100);
digitalWrite(LED, LOW);
delay(300);
}
}
void setup() {
pinMode(LOCK, OUTPUT);
pinMode(DOOR, INPUT); digitalWrite(DOOR, HIGH);
nfc.begin();
uint32_t versiondata = nfc.getFirmwareVersion();
if (! versiondata) {
Serial.print("Couldn't find PN53x board");
while (1); // halt
}
Serial.print("Found NFC chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
// Set the max number of retry attempts to read from a card
// This prevents us from waiting forever for a card, which is
// the default behaviour of the PN532.
nfc.setPassiveActivationRetries(0x3);
// configure board to read RFID tags
nfc.SAMConfig();
lockStatus = loadState(LOCK); // Read last lock status from eeprom
setLockState(lockStatus, true); // Now set the last known state and send it to controller
}
void presentation() {
sendSketchInfo("RFID Lock & Door sensor", "v11052019");
present(LOCK, S_LOCK);
present(DOOR, S_BINARY);
}
void loop() {
bool success;
uint8_t key[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
uint8_t currentKeyLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
// Wait for an ISO14443A type cards (Mifare, etc.). When one is found
// 'uid' will be populated with the UID, and uidLength will indicate
// if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &key[0], ¤tKeyLength);
if (success) {
Serial.print("Found tag id: ");
for (uint8_t i=0; i < currentKeyLength; i++)
{
if (i>0) Serial.print(",");
Serial.print("0x");Serial.print(key[i], HEX);
}
for (uint8_t i=currentKeyLength; i < maxKeyLength; i++)
{
Serial.print(",0x00");
}
Serial.println("");
bool valid = false;
// Compare this key to the valid once registered here in sketch
for (int i=0;i<keyCount && !valid;i++) {
for (int j=0;j<currentKeyLength && !valid;j++) {
if (key[j] != validKeys[i][j]) {
break;
}
if (j==currentKeyLength-1) {
valid = true;
}
}
}
if (valid) {
// Switch lock status
setLockState(!lockStatus, true);
}
// Wait for card/tag to leave reader
while(nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &key[0], ¤tKeyLength));
}
wait(10);
// Door status read and send if changed, require ACK
bool tripped = digitalRead(DOOR) == HIGH;
if (tripped != lastStatus) {
Serial.print("Door");
if (tripped == 1) {
Serial.println(" open");
}
else {
Serial.println(" closed");
}
send(doorMsg.set(tripped?"1":"0")); // Send tripped value to gw
digitalWrite(LED, HIGH);
wait(100);
digitalWrite(LED, LOW);
lastStatus = tripped;
}
}
// Unlocks the door.
void setLockState(bool state, bool doSend){
if (state)
Serial.println("open lock");
else
Serial.println("close lock");
if (doSend)
send(lockMsg.set(state));
digitalWrite(LOCK, state);
saveState(LOCK,state);
lockStatus = state;
}
void receive(const MyMessage &message) {
// We only expect one type of message from controller. But we better check anyway.
if (message.type==V_LOCK_STATUS) {
// Change relay state
setLockState(message.getBool(), false);
// Write some debug info
Serial.print("Incoming lock status:");
Serial.println(message.getBool());
}
}
And this is my debug:
__ __ ____
| \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| | | | |_| |___| | __/ | | \__ \ _ | | \__ \
|_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/
|___/ 2.3.1
32 MCO:BGN:INIT NODE,CP=RRNNAS--,REL=255,VER=2.3.1
53 MCO:BGN:BFR
2086 TSM:INIT
2088 TSF:WUR:MS=0
2095 TSM:INIT:TSP OK
2099 TSM:INIT:STATID=51
2103 TSF:SID:OK,ID=51
2107 TSM:FPAR
I built a ESP8266 (Lolin V3) gw with RFM69 868mhz according to instructions.
I flashed NodeMCU with EspTool without problems. I then uploaded my sketch. It started first OK, but after I set a fixed IP with my router, it will not connect anymore (to router??).
Debug:
$l⸮⸮`,ld⸮p :Y⸮56 MCO:BGN:INIT GW,CP=RRNGE---,REL=255,VER=2.3.1
108 TSF:LRT:OK
124 TSM:INIT
137 TSF:WUR:MS=0
157 TSM:INIT:TSP OK
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 7
cnt
connected with Neptune, channel 11
dhcp client start...
323 TSM:INIT:GW MODE
346 TSM:READY:ID=0,PAR=0,DIS=0
378 MCO:REG:NOT NEEDED
406 TSM:READY:NWD REQ
1840 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
scandone
1923 GWT:TPC:CONNECTING...
2452 GWT:TPC:CONNECTING...
2980 GWT:TPC:CONNECTING...
3508 GWT:TPC:CONNECTING...
4036 GWT:TPC:CONNECTING...
4564 GWT:TPC:CONNECTING...
5092 GWT:TPC:CONNECTING...
5620 GWT:TPC:CONNECTING...
6148 GWT:TPC:CONNECTING...
6676 GWT:TPC:CONNECTING...
7204 GWT:TPC:CONNECTING...
7732 GWT:TPC:CONNECTING...
8260 GWT:TPC:CONNECTING...
8788 GWT:TPC:CONNECTING...
9316 GWT:TPC:CONNECTING...
9844 GWT:TPC:CONNECTING...
pm open,type:2 0
10372 GWT:TPC:CONNECTING...
10901 GWT:TPC:CONNECTING...
11430 GWT:TPC:CONNECTING...
11959 GWT:TPC:CONNECTING...
12488 GWT:TPC:CONNECTING...
13017 GWT:TPC:CONNECTING...
Sketch:
#define MY_DEBUG
#define MY_BAUD_RATE 9600
#define MY_RADIO_RFM69
#define MY_RFM69_FREQUENCY RFM69_868MHZ // Set your frequency here
#define MY_IS_RFM69HW // Omit if your RFM is not "H"
#define MY_RFM69_IRQ_PIN D1
#define MY_RFM69_IRQ_NUM MY_RFM69_IRQ_PIN
#define MY_GATEWAY_MQTT_CLIENT
#define MY_GATEWAY_ESP8266
#define MY_MQTT_PUBLISH_TOPIC_PREFIX "domoticz/in/mysenRFM69"
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "domoticz/out/mysenRFM69"
#define MY_MQTT_CLIENT_ID "mysenRFM69"
#define MY_MQTT_USER "ZZZZ"
#define MY_MQTT_PASSWORD "YYYYYYYY"
#define MY_WIFI_SSID "Neptune"
#define MY_WIFI_PASSWORD "XXXXXXXXXXXX"
#define MY_HOSTNAME "mqtt-ESP8266-gateway"
#define MY_CONTROLLER_IP_ADDRESS 192, 168, 1, 51
#define MY_PORT 1883
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
#define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 16 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 16 // the PCB, on board LED
#include <ESP8266WiFi.h>
#include <MySensors.h>
void setup()
{
// Setup locally attached sensors
}
void presentation()
{
// Present locally attached sensors here
}
void loop()
{
// Send locally attached sensors data here
}
Sketch or router problem?
Powered with computer usb + 800mA 5V charger at the moment.
@lemme Great, I'll try that. Is that working for you?
Thanks for that json-code bit!
Can someone help with how to make a toggling switch in Domoticz? I've only used blockly for automation, but I think I might have to do something else to make this work.
Push button sketch:
/**
* Single button sending transmitter
* Battery powered by 3V Li-bat
*/
#define MY_DEBUG
#define MY_RADIO_RF24
#define MY_NODE_ID 7
#include <MySensors.h>
int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point
int oldBatteryPcnt = 0;
#define BUTTON_PIN 2 //pin for button
MyMessage msgButton(BUTTON_PIN, V_STATUS);
int sentCounter = 2;
int reading; // the current reading from the input pin
int previous = HIGH; // the previous reading from the input pin
void setup()
{
pinMode(BUTTON_PIN, INPUT);
digitalWrite(BUTTON_PIN, HIGH);
analogReference(INTERNAL);
}
void presentation()
{
sendSketchInfo("WCNappiBAT", "v08032019");
present(BUTTON_PIN, S_BINARY, "WC Nappi");
}
void loop()
{
delay(10);
reading = digitalRead(BUTTON_PIN);
if (reading == LOW && previous == HIGH) {
previous = reading;
send(msgButton.set(1));
sentCounter++;
delay(50);
}
else {
previous = reading;
}
if (sentCounter % 5 == 0) {
int sensorValue = analogRead(BATTERY_SENSE_PIN);
// 3.44/1023 = Volts per bit = 0.003363075
int batteryPcnt = sensorValue / 10;
float batteryV = sensorValue * 0.003363075;
Serial.print("Battery Voltage: ");
Serial.print(batteryV);
Serial.print(" V, ");
Serial.print("Battery percent: ");
Serial.print(batteryPcnt);
Serial.println(" %");
sendBatteryLevel(batteryPcnt);
}
sleep(0, CHANGE, 0);
}
So the idea is it sends a "1" for every press. That should toggle the lights (controlled by another nodes relay). I had direct communication before but it keeps failing.
Any ideas? Or should I change the sketch? I thought about sending alternate 0 & 1 but then it will not "know" if the light is on or not...
More problems when I try to "make" after configuring. Tried with and without sudo...
dietpi@Domoticz:~/MySensors$ sudo make
gcc -MT build/hal/architecture/Linux/drivers/core/log.o -MMD -MP -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -DMY_SIGNING_SIMPLE_PASSWD=\"ZZZZZZZ\" -DMY_RADIO_RF24 -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_LINUX_CONFIG_FILE=\"/etc/mysensors.conf\" -DMY_DEFAULT_TX_LED_PIN=18 -DMY_DEFAULT_RX_LED_PIN=16 -DMY_DEFAULT_ERR_LED_PIN=12 -DMY_MQTT_CLIENT_ID=\"mygateway1\" -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mysensors-in\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mysensors-out\" -DMY_MQTT_PASSWORD=\"YYYYY\" -DMY_MQTT_USER=\"XXXX\" -DMY_CONTROLLER_IP_ADDRESS=127,0,0,1 -DMY_DEBUG_VERBOSE_SIGNING -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/log.c -o build/hal/architecture/Linux/drivers/core/log.o
In file included from hal/architecture/Linux/drivers/core/log.c:20:0:
hal/architecture/Linux/drivers/core/log.h:24:19: fatal error: stdio.h: File not found
#include <stdio.h>
^
compilation terminated.
Makefile:102: recipe for target 'build/hal/architecture/Linux/drivers/core/log.o' failed
make: *** [build/hal/architecture/Linux/drivers/core/log.o] Error 1
EDIT: ...and here's the fix: "sudo apt-get install g++" (I'm using DietPi now to make it lighter for Pi Zero W).
I had a working mqtt-gw but the lastest update (using openhabian so updates every time with system) screwed up my system. I have reloaded the binding and also rebuilt the gw (Rpi) to get newest MySensors version.
Haven't had time to troubleshoot yet.
Binding behind after latest update?
@mfalkvidd It sure looks the same. I did a fresh git clone to update my gateway, so shouldn't it be fixed? From what appears on github it looked fixed..
EDIT appears fixed in development branch. But not master?
I get weird errors when "make"ing. Branch master.
My command:
sudo ./configure --my-transport=rf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-security-password=ZZZZZZZZZZ --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=XXXX --my-mqtt-password=YYYYY --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-config-file=/etc/mysensors.conf
M -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftGetNonce(MyMessage&)’:
./core/MySigningAtsha204Soft.cpp:173:55: error: no matching function for call to ‘min(unsigned int, int)’
msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:173:55: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:173:55: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:173:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:173:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
msg.set(_signing_verifying_nonce, MIN(MAX_PAYLOAD, 32));
^
./core/MySigningAtsha204Soft.cpp: In function ‘void signerAtsha204SoftPutNonce(MyMessage&)’:
./core/MySigningAtsha204Soft.cpp:190:89: error: no matching function for call to ‘min(unsigned int, int)’
(void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:190:89: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
(void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:190:89: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
(void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:190:89: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
(void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:190:89: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
(void)memcpy((void *)_signing_nonce, (const void *)msg.getCustom(), MIN(MAX_PAYLOAD, 32));
^
./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftSignMsg(MyMessage&)’:
./core/MySigningAtsha204Soft.cpp:229:50: error: no matching function for call to ‘min(unsigned int, int)’
MIN(MAX_PAYLOAD-mGetLength(msg), 32));
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:229:50: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
MIN(MAX_PAYLOAD-mGetLength(msg), 32));
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:229:50: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
MIN(MAX_PAYLOAD-mGetLength(msg), 32));
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:229:50: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
MIN(MAX_PAYLOAD-mGetLength(msg), 32));
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:229:50: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
MIN(MAX_PAYLOAD-mGetLength(msg), 32));
^
./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftVerifyMsg(MyMessage&)’:
./core/MySigningAtsha204Soft.cpp:283:55: error: no matching function for call to ‘min(unsigned int, int)’
MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:283:55: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:283:55: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’
MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:283:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:283:55: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘int’)
MIN(MAX_PAYLOAD-mGetLength(msg), 32))) {
^
./core/MySigningAtsha204Soft.cpp: In function ‘void signerCalculateSignature(MyMessage&, bool)’:
./core/MySigningAtsha204Soft.cpp:307:48: error: no matching function for call to ‘min(uint8_t&, int)’
uint8_t bytes_to_include = MIN(bytes_left, 32);
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algo.h:3453:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:307:48: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned char’
uint8_t bytes_to_include = MIN(bytes_left, 32);
^
In file included from /usr/include/c++/6/algorithm:62:0,
from ./drivers/Linux/Arduino.h:32,
from ./MySensors.h:39,
from examples_linux/mysgw.cpp:82:
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/6/bits/stl_algo.h:3447:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:307:48: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned char’
uint8_t bytes_to_include = MIN(bytes_left, 32);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/6/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:307:48: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned char’ and ‘int’)
uint8_t bytes_to_include = MIN(bytes_left, 32);
^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from examples_linux/mysgw.cpp:20:
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
In file included from ./MySensors.h:148:0,
from examples_linux/mysgw.cpp:82:
./core/MySigningAtsha204Soft.cpp:307:48: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned char’ and ‘int’)
uint8_t bytes_to_include = MIN(bytes_left, 32);
^
./core/MySigningAtsha204Soft.cpp: In function ‘bool signerAtsha204SoftVerifyMsg(MyMessage&)’:
./core/MySigningAtsha204Soft.cpp:289:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
make: *** [build/examples_linux/mysgw.o] Error 1
Can someone better versed help?
EDIT: tested branch development, no problems.
@mfalkvidd Yeah, it became stable after I did the same. I will have to simplify the tasks for my bare bones nodes.
Since I'm getting wrong (no warnings) memory messages uploading, do you think I should edit boards.txt?
atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)
atmega328bb.upload.protocol=arduino
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600
atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0xfd
atmega328bb.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=arduino:standard
atmega328bb.bootloader.tool=arduino:avrdude
atmega328bb.upload.tool=arduino:avrdude```
I finally got bootloader and upload issues done, but now one sketch/node is killing me. I have tried different AtMega328Ps but the symptom remains.
The node: SlimNode, constant power (step down to 3.3V from alarm system 12V battery), non-PA NRF24, DHT11. Extra LED to blink at start-up, extra cap 100yF at power input. Pins/connections verified once extra.
Serial:
__ __ ____
| \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| | | | |_| |___| | __/ | | \__ \ _ | | \__ \
|_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/
|___/ 2.3.1
34 MCO:BGN:INIT REPEATER,CP=RNNRASQ-,REL=255,VER=2.3.1
55 MCO:BGN:BFR
2093 TSM:INIT
2097 TSF:WUR:MS=0
2105 TSM:INIT:TSP OK
2109 TSM:INIT:STATID=3
2113 TSF:SID:OK,ID=3
2117 TSM:FPAR
2154 TSF:MSG:SEND,3-3-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
3115 TSF:MSG:READ,0-0-3,s=255,c=3,t=8,pt=1,l=1,sg=0:0
3125 TSF:MSG:FPAR OK,ID=0,D=1
4167 TSM:FPAR:OK
4169 TSM:ID
4171 TSM:ID:OK
4175 TSM:UPL
4182 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
4194 TSF:MSG:READ,0-0-3,s=255,c=3,t=25,pt=1,l=1,sg=0:1
4204 TSF:MSG:PONG RECV,HP=1
4208 TSM:UPL:OK
4212 TSM:READY:ID=3,PAR=0,DIS=1
4222 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
4235 TSF:MSG:READ,0-0-3,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
4249 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
4263 TSF:MSG:READ,0-0-3,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
4329 TSF:MSG:SEND,3-3-0-0,s=255,c=0,t=18,pt=0,l=5,sg=1,ft=1,st=OK:2.3.1
4341 !TSF:RTE:FPAR ACTIVE
__ __ ____
| \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| | | | |_| |___| | __/ | | \__ \ _ | | \__ \
|_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/
|___/ 2.3.1
36 MCO:BGN:INIT REPEATER,CP=RNNRASQ-,REL=255,VER=2.3.1
57 MCO:BGN:BFR
...and this keeps repeating
Code:
/**
*
* DESCRIPTION
* Temp Sensor and repeater / Slim node
*
*/
#define MY_DEBUG
#define MY_RADIO_RF24
#define MY_REPEATER_FEATURE // Enable repeater functionality for this node
#define MY_SIGNING_SIMPLE_PASSWD "XXXXXXXXXX"
#define MY_RF24_IRQ_PIN 2
#define MY_RX_MESSAGE_BUFFER_FEATURE
#define MY_NODE_ID 3
#define MY_BAUD_RATE 57600
#define DHT_DATA_PIN 4
#define SENSOR_TEMP_OFFSET 0
#define HUM 1
#define TEMP 2
static const uint8_t FORCE_UPDATE_N_READS = 10;
float lastTemp;
float lastHum;
uint8_t nNoUpdatesTemp;
uint8_t nNoUpdatesHum;
bool metric = true;
#include <SPI.h>
#include <DHT.h>
#include <MySensors.h>
MyMessage msgHum(HUM, V_HUM);
MyMessage msgTemp(TEMP, V_TEMP);
DHT dht;
void before()
{
pinMode(7, OUTPUT);
int i = 0;
for(i=0; i < 5; i++) {
digitalWrite(7, HIGH);
delay(100);
digitalWrite(7, LOW);
delay(300);
}
}
void setup()
{
delay(100); // Let power settle
dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
wait(2000);
}
void presentation()
{
sendSketchInfo("Temp Sensor & Repeater", "v06012019");
present(HUM, S_HUM);
present(TEMP, S_TEMP);
metric = getControllerConfig().isMetric;
}
void loop()
{
// Force reading sensor, so it works also after sleep()
dht.readSensor(true);
float temperature = dht.getTemperature();
if (isnan(temperature)) {
Serial.println("Failed reading temperature from DHT!");
} else if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) {
// Only send temperature if it changed since the last measurement or if we didn't send an update for n times
lastTemp = temperature;
if (!metric) {
temperature = dht.toFahrenheit(temperature);
}
// Reset no updates counter
nNoUpdatesTemp = 0;
temperature += SENSOR_TEMP_OFFSET;
send(msgTemp.set(temperature, 1));
#ifdef MY_DEBUG
Serial.print("T: ");
Serial.println(temperature);
#endif
} else {
// Increase no update counter if the temperature stayed the same
nNoUpdatesTemp++;
}
float humidity = dht.getHumidity();
if (isnan(humidity)) {
Serial.println("Failed reading humidity from DHT");
} else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) {
// Only send humidity if it changed since the last measurement or if we didn't send an update for n times
lastHum = humidity;
// Reset no updates counter
nNoUpdatesHum = 0;
send(msgHum.set(humidity, 1));
#ifdef MY_DEBUG
Serial.print("H: ");
Serial.println(humidity);
#endif
} else {
// Increase no update counter if the humidity stayed the same
nNoUpdatesHum++;
}
// Sleep for a while to save energy
//sleep(UPDATE_INTERVAL);
//}
wait(120000);
}
I dont think it's a power issue but what else could it be? Behavior is the same with DHT11 unplugged. Also same if powering from FTDI.
Can someone help me with these questions?
I want the Slim Node to function "like a 3.3/8mhz pro mini" for MySensors home autom applications. So I can upload sketches thru ftdi-pins. Since I also use Pro Minis, I would not want change the mysensors library (serial baud).
EDIT, to help others
I have now. I always have that nagging feeling...
But after MANY iterations, finally success. At least partly.
BlinkWithoutDelay works AND mysensors sketch as well (will do more testing...).
What made it work, if anyone else struggles with this:
-connect uno (to computer-linux), board:uno, upload ArduinoISP, disconnect
-add shield to uno and atmega328p-pu to shield, connect to computer, board: "8mhz on breadboard", "programmer: "Arduino as ISP", burn bootloader, disconnect
-board: Uno, connect as above, "upload sketch using programmer", disconnect EDIT this last part appears to work but internal clock is all messed up. Bootloader works fine like this.
The magic happened after I changed the board back to Uno after burning bootloader. Why is beyond me, but maybe some arduino-ninja can figure it out.
@electrik Everything's 100% chinese
I checked power at all terminals and the atmega-connections, as well as radio hookup etc. I have all the caps on "My Slim Node" (4x 0,1yF and 4,7 yF). I normally get better power thru regulators than with FTDI but I did check that originally.
I built two like this, same type of problem. I have Gert Sanders's "boards" installed. Is there a very basic setup I could try? I'm having trouble figuring out all the options that are available. All I want is Atmega working like a normal 3.3v/8MHz Arduino.
Continuing on...I need help getting my Atmega328P-PU to work.
I'm able to burn the bootloader (8MHz on breadboard) and upload sketch ("using programmer"). However when I power the PCB, the sketch doesn't run. I soldered on a LED and uploaded BlinkWithoutDelay, just to verify that it works, but does not. I measured power and all connections. I'm powering with regulated 3.3V.
To make things more weird, I connected FTDI to one node and with that connection it works fine. But when powering from pins, nothing (again using regulated 3.3V.
@nagelc I've been afraid to try that. Maybe do a full backup and try it. Not sure if I should erase everything first or not.
I'm having trouble updating and can't find answer just googling it.
My dashboard shows v3.7243.
It's running on a linux machine. I've tried the .updaterelease but it terminates because it doesn't seem to locate a network address. If I click in the dashboard window (setup - check for update) it says "no update available".
I haven't logged on to Domoticz forum (yet), to ask around there if someone here can help. I did try to google for help but found nothing useful.
@timo OK, here's the output:
2018-08-15 23:55:44.092 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid paho79389486520739 and file store '/var/lib/openhab2/mqtt/127.0.0.1'
2018-08-15 23:55:47.333 [INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder
2018-08-15 23:55:53.357 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Helsinki'.
2018-08-15 23:55:53.406 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '60.172424790463936,25.020736667463083'.
2018-08-15 23:55:53.427 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'fi'.
2018-08-15 23:56:01.971 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.51:8080
2018-08-15 23:56:02.082 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.51:8443
2018-08-15 23:57:01.390 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.items'
2018-08-15 23:57:21.507 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2018-08-15 23:57:24.448 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'
2018-08-15 23:57:26.351 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mys.things'
==> /var/log/openhab2/events.log <==
2018-08-15 23:57:27.306 [.ItemChannelLinkAddedEvent] - Link 'PukuhLiike-mysensors:motion:mygateway1:PukuhLiike:tripped' has been added.
2018-08-15 23:57:27.346 [.ItemChannelLinkAddedEvent] - Link 'PukuhValoisuus-mysensors:light-level:mygateway1:PukuhValoisuus:light-level' has been added.
2018-08-15 23:57:27.424 [.ItemChannelLinkAddedEvent] - Link 'TalliSivuoviLukko-mysensors:lock:mygateway1:TalliSivuoviLukko:lock-status' has been added.
2018-08-15 23:57:27.487 [.ItemChannelLinkAddedEvent] - Link 'BoilerTemp-mysensors:temperature:mygateway1:BoilerTemp:temp' has been added.
2018-08-15 23:57:27.655 [.ItemChannelLinkAddedEvent] - Link 'TalliSivuovi-mysensors:door:mygateway1:TalliSivuovi:tripped' has been added.
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:57:44.601 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTING - org.openhab.binding.mysensors
2018-08-15 23:57:46.005 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=296, service.bundleid=197, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=176} - org.openhab.binding.mysensors
2018-08-15 23:57:47.811 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTED - org.openhab.binding.mysensors
2018-08-15 23:57:53.081 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-08-15 23:57:56.733 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-08-15 23:57:59.038 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-08-15 23:58:02.474 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:02.518 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:mygateway1' changed from UNINITIALIZED to INITIALIZING
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:02.740 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist.
2018-08-15 23:58:02.777 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [1]
2018-08-15 23:58:03.074 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog
2018-08-15 23:58:03.246 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Connected to MQTT broker!
2018-08-15 23:58:03.294 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=324, service.bundleid=197, service.scope=singleton} - org.openhab.binding.mysensors
2018-08-15 23:58:03.308 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan
2018-08-15 23:58:03.330 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:03.493 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2018-08-15 23:58:03.617 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:03.743 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Adding consumer for topic: mysensors-out/+/+/+/+/+
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:03.840 [hingStatusInfoChangedEvent] - 'mysensors:light-level:mygateway1:PukuhValoisuus' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2018-08-15 23:58:03.908 [hingStatusInfoChangedEvent] - 'mysensors:door:mygateway1:TalliSivuovi' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2018-08-15 23:58:03.997 [hingStatusInfoChangedEvent] - 'mysensors:lock:mygateway1:TalliSivuoviLukko' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:04.055 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 0;0;3;0;2;
2018-08-15 23:58:04.076 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Sending MQTT Message: Topic: mysensors-in, Message: 0;0;3;0;2;
2018-08-15 23:58:04.241 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/0/255/3/0/2, Message: 2.3.0
2018-08-15 23:58:04.276 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 0/255/3/0/2
2018-08-15 23:58:04.311 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 0;255;3;0;2;2.3.0
2018-08-15 23:58:04.373 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 0;255;3;0;2;2.3.0
2018-08-15 23:58:04.390 [DEBUG] [rsAbstractConnection$MySensorsReader] - Good,Gateway is up and running! (Ver:2.3.0)
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:04.849 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:mygateway1' changed from INITIALIZING to ONLINE
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:04.940 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [1]
2018-08-15 23:58:04.975 [INFO ] [rotocol.mqtt.MySensorsMqttConnection] - Successfully connected to MySensors Bridge.
2018-08-15 23:58:05.191 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=5, childId=5, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false}
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:05.211 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:05.224 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=1, childId=15, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false}
2018-08-15 23:58:05.347 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=1, childId=3, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false}
2018-08-15 23:58:05.404 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=1, childId=14, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false}
2018-08-15 23:58:05.494 [DEBUG] [ensors.handler.MySensorsThingHandler] - Configuration: MySensorsSensorConfiguration{nodeId=5, childId=6, requestAck=false, revertState=true, smartSleep=false, childUpdateTimeout=-1, nodeUpdateTimeout=-1, requestHeartbeatResponse=false, usePureWhiteLightInRGBW=false}
2018-08-15 23:58:05.521 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Adding device MySensorsNode [nodeId=5, childNumber=1, chidldList={5=MySensorsChild [childId=5, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LOCK_STATUS=MySensorsVariableVLockStatus [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]}]
2018-08-15 23:58:05.610 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Merging child map: {5=MySensorsChild [childId=5, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LOCK_STATUS=MySensorsVariableVLockStatus [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]} with: {6=MySensorsChild [childId=6, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_TRIPPED=MySensorsVariableVTripped [value=null], V_ARMED=MySensorsVariableVArmed [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]}
2018-08-15 23:58:05.607 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 5-5 not registered yet, registering...
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:05.704 [hingStatusInfoChangedEvent] - 'mysensors:lock:mygateway1:TalliSivuoviLukko' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:05.737 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Merging child map: {} with: {14=MySensorsChild [childId=14, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_LEVEL=MySensorsVariableVLevel [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LIGHT_LEVEL=MySensorsVariableVLightLevel [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]}
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:05.800 [hingStatusInfoChangedEvent] - 'mysensors:light-level:mygateway1:PukuhValoisuus' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:05.769 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 5-6 not registered yet, registering...
2018-08-15 23:58:05.783 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Merging child map: {14=MySensorsChild [childId=14, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_LEVEL=MySensorsVariableVLevel [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LIGHT_LEVEL=MySensorsVariableVLightLevel [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]} with: {15=MySensorsChild [childId=15, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null], V_TEMP=MySensorsVariableVTemp [value=null], V_ID=MySensorsVariableVId [value=null]}]}
2018-08-15 23:58:05.795 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 1-14 not registered yet, registering...
2018-08-15 23:58:05.858 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Merging child map: {14=MySensorsChild [childId=14, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_LEVEL=MySensorsVariableVLevel [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_LIGHT_LEVEL=MySensorsVariableVLightLevel [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}], 15=MySensorsChild [childId=15, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null], V_TEMP=MySensorsVariableVTemp [value=null], V_ID=MySensorsVariableVId [value=null]}]} with: {3=MySensorsChild [childId=3, nodeValue={V_VAR1=MySensorsVariableVVar1 [value=null], V_TRIPPED=MySensorsVariableVTripped [value=null], V_ARMED=MySensorsVariableVArmed [value=null], V_VAR2=MySensorsVariableVVar2 [value=null], V_VAR3=MySensorsVariableVVar3 [value=null], V_VAR4=MySensorsVariableVVar4 [value=null], V_VAR5=MySensorsVariableVVar5 [value=null]}]}
2018-08-15 23:58:05.866 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 1-15 not registered yet, registering...
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:05.908 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:05.902 [DEBUG] [ensors.handler.MySensorsThingHandler] - Event listener for node 1-3 not registered yet, registering...
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:05.982 [hingStatusInfoChangedEvent] - 'mysensors:door:mygateway1:TalliSivuovi' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2018-08-15 23:58:06.050 [hingStatusInfoChangedEvent] - 'mysensors:lock:mygateway1:TalliSivuoviLukko' changed from INITIALIZING to ONLINE
2018-08-15 23:58:06.109 [hingStatusInfoChangedEvent] - 'mysensors:light-level:mygateway1:PukuhValoisuus' changed from INITIALIZING to ONLINE
2018-08-15 23:58:06.160 [hingStatusInfoChangedEvent] - 'mysensors:door:mygateway1:TalliSivuovi' changed from INITIALIZING to ONLINE
2018-08-15 23:58:06.202 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from INITIALIZING to ONLINE
2018-08-15 23:58:06.253 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from INITIALIZING to ONLINE
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:10.493 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/1/14/1/0/23, Message: 0
2018-08-15 23:58:10.511 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 1/14/1/0/23
2018-08-15 23:58:10.526 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 1;14;1;0;23;0
2018-08-15 23:58:10.542 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 1;14;1;0;23;0
2018-08-15 23:58:10.574 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 1 found in gateway
2018-08-15 23:58:10.586 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/1/15/1/0/0, Message: 53
2018-08-15 23:58:10.606 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 1/15/1/0/0
2018-08-15 23:58:10.591 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 14 found in node 1
2018-08-15 23:58:10.619 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 1;15;1;0;0;53
2018-08-15 23:58:10.661 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: light-level(V_LIGHT_LEVEL) value to: 0
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:11.034 [vent.ItemStateChangedEvent] - PukuhValoisuus changed from NULL to 0
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:11.617 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 1/14 to 2018-08-15T23:58:10.000+0300
2018-08-15 23:58:11.629 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 1;15;1;0;0;53
2018-08-15 23:58:11.642 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 1 found in gateway
2018-08-15 23:58:11.657 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 15 found in node 1
2018-08-15 23:58:11.671 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: temp(V_TEMP) value to: 53
==> /var/log/openhab2/events.log <==
2018-08-15 23:58:11.758 [vent.ItemStateChangedEvent] - BoilerTemp changed from NULL to 53
==> /var/log/openhab2/openhab.log <==
2018-08-15 23:58:11.770 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 1/15 to 2018-08-15T23:58:11.000+0300
2018-08-15 23:58:47.461 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/1/14/1/0/23, Message: 0
2018-08-15 23:58:47.482 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 1/14/1/0/23
2018-08-15 23:58:47.495 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 1;14;1;0;23;0
2018-08-15 23:58:47.513 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 1;14;1;0;23;0
2018-08-15 23:58:47.533 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 1 found in gateway
2018-08-15 23:58:47.565 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/1/15/1/0/0, Message: 53
2018-08-15 23:58:47.556 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 14 found in node 1
2018-08-15 23:58:47.579 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: light-level(V_LIGHT_LEVEL) value to: 0
2018-08-15 23:58:47.597 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 1/15/1/0/0
2018-08-15 23:58:47.612 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 1;15;1;0;0;53
2018-08-15 23:58:47.719 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 1/14 to 2018-08-15T23:58:47.000+0300
2018-08-15 23:58:47.731 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 1;15;1;0;0;53
2018-08-15 23:58:47.750 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 1 found in gateway
2018-08-15 23:58:47.765 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 15 found in node 1
2018-08-15 23:58:47.778 [DEBUG] [ensors.handler.MySensorsThingHandler] - Updating channel: temp(V_TEMP) value to: 53
2018-08-15 23:58:47.839 [DEBUG] [ensors.handler.MySensorsThingHandler] - Setting last update for node/child 1/15 to 2018-08-15T23:58:47.000+0300
And my item & thing (in separate files of course):
Number PukuhValoisuus "Pukuhuone valoisuus [%.1f %]" <719914_monitor> {channel="mysensors:light-level:mygateway1:PukuhValoisuus:light-level"}
light-level PukuhValoisuus [nodeId=1, childId=14]
@timo Firstly, I am very thankful for your help.
I changed that item and it started receiving values! I think there's something wrong with my light-level sensor's syntax too.
In console I did: log:set DEBUG.
That prints out hundreds and hundreds of lines....should I narrow the search somehow?
@timo Before I did the re-install of everything autodiscovery was working, but now it isn't. Current sys: RpiZeroW, Openhabian 2.3.0-1release, mosquitto.
The temperature is not updating in OH2. But the mysensors-out topic does show the gateway sending the values out. OH2 is not listening for some reason...
Re-install some (which?) parts or bindings? Openhab2 mqtt-binding?
Permissions?
I need a fresh set of eyes on my problem.
Gateway is online, but things are not discovered. I have tried adding them manually (my syntax could be wrong), but it doesn't help.
There are no errors in mysgw.log-file.
Mosquitto mysensors-out:
mysensors-out/1/14/1/0/23 35
mysensors-out/1/15/1/0/0 49
mysensors-out/1/14/1/0/23 35
mysensors-out/1/15/1/0/0 49
mysensors-out/1/14/1/0/23 35
mysensors-out/1/15/1/0/0 49
mysensors-out/1/14/1/0/23 35
mysensors-out/1/15/1/0/0 49
mysgw.things:
Bridge mysensors:bridge-mqtt:mygateway1 [brokerName="mosquitto",
topicPublish="mysensors-in",
topicSubscribe="mysensors-out",
startupCheckEnabled=true ]
{
/** define things connected to that bridge here */
temperature BoilerTemp [nodeID=1, childId=15]
motion PukuhLiike [nodeID=1, childId=3]
}
default.items:
Number BoilerTemp "Lämminvesivaraaja [%.1f °C]" <heating> {channel="mysensors:temperature:mygateway1:temperature_1_15:temp"}
Contact PukuhLiike "Pukuhuone Liike" <motion> {channel="mysensors:motion:mygateway1:motion_1_3:tripped"}
OpenHab2 frontail:
2018-08-13 22:34:03.284 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid paho111686078117 and file store '/var/lib/openhab2/mqtt/127.0.0.1'
2018-08-13 22:34:05.499 [INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder
2018-08-13 22:34:11.928 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Helsinki'.
2018-08-13 22:34:11.999 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'fi'.
2018-08-13 22:34:20.211 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.51:8080
2018-08-13 22:34:20.317 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.51:8443
2018-08-13 22:35:16.502 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.items'
2018-08-13 22:35:34.984 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2018-08-13 22:35:38.657 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mys.things'
2018-08-13 22:35:39.245 [.ItemChannelLinkAddedEvent] - Link 'PukuhLiike-mysensors:motion:mygateway1:motion_1_3:tripped' has been added.
2018-08-13 22:35:39.309 [.ItemChannelLinkAddedEvent] - Link 'BoilerTemp-mysensors:temperature:mygateway1:temperature_1_15:temp' has been added.
2018-08-13 22:36:14.848 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-08-13 22:36:18.741 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-08-13 22:36:22.407 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-08-13 22:36:25.610 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:mygateway1' changed from UNINITIALIZED to INITIALIZING
2018-08-13 22:36:26.660 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2018-08-13 22:36:26.861 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2018-08-13 22:36:27.453 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:mygateway1' changed from INITIALIZING to ONLINE
2018-08-13 22:36:27.546 [INFO ] [rotocol.mqtt.MySensorsMqttConnection] - Successfully connected to MySensors Bridge.
2018-08-13 22:36:28.075 [hingStatusInfoChangedEvent] - 'mysensors:temperature:mygateway1:BoilerTemp' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)
2018-08-13 22:36:28.120 [hingStatusInfoChangedEvent] - 'mysensors:motion:mygateway1:PukuhLiike' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)
In my addons I have the 2.4.0 Snapshot.
org.eclipse.smarthome.mqttbroker.cfg:
name=mosquitto
host=127.0.0.1
secure=false
port=1883
username=XXXX
password=YYYYY
retain=false
clientId=openhabian
EDIT: After a week of trying things. This worked: https://forum.mysensors.org/post/73600
No autodiscovery, but this switches my sensors ONLINE (even ones that are not powered up ), but it's not updating the values.
Apparently sleeping less and debugging late solves problems. This is SOLVED.
My IDE library was outdated. I updated my Arduino Mysensors-library, upload to one node, and my node started to communicate fine. Must reupload all nodes unfortunately. Probably the problems are caused by signing differences in previous library versions vs. 2.3.0 release for Raspberry.
Again, hope this helps someone who encounters the same problem.
I had a perfectly working system, but to get logging I reinstalled everything. Now it's broken.
RPi Zero W (dietpi), MQTT gw, mosquitto, Openhab2, NRF24.
Installation goes fine. Configure command:
./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-security-password=XXXXXXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ--my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-config-file=/etc/mysensors.conf
Mysgw startup goes fine. Then the problems start:
Aug 08 23:21:27 DEBUG TSF:MSG:READ,23-162-105,s=223,c=3,t=34,pt=2,l=17,sg=0:19080
Aug 08 23:21:27 DEBUG !TSF:MSG:LEN,16!=24
Aug 08 23:22:29 DEBUG TSF:MSG:READ,58-6-85,s=14,c=5,t=81,pt=0,l=13,sg=1:????x+
Aug 08 23:22:29 DEBUG !TSF:MSG:LEN,16!=32
Aug 08 23:22:31 DEBUG TSF:MSG:READ,116-5-135,s=184,c=1,t=215,pt=3,l=17,sg=0:29731
Aug 08 23:22:31 DEBUG !TSF:MSG:LEN,16!=24
Aug 08 23:22:33 DEBUG TSF:MSG:READ,136-132-215,s=249,c=5,t=1,pt=7,l=10,sg=0:-0.35548508
Aug 08 23:22:33 DEBUG !TSF:MSG:LEN,16!=17
Aug 08 23:22:35 DEBUG TSF:MSG:READ,194-137-143,s=33,c=7,t=101,pt=7,l=8,sg=0:104405227536384.00000000
Aug 08 23:22:35 DEBUG !TSF:MSG:LEN,16!=15
Aug 08 23:23:38 DEBUG TSF:MSG:READ,154-105-25,s=119,c=6,t=21,pt=2,l=23,sg=1:-15540
Aug 08 23:23:38 DEBUG !TSF:MSG:LEN,16!=32
Aug 08 23:23:40 DEBUG TSF:MSG:READ,146-49-193,s=128,c=1,t=186,pt=1,l=0,sg=0:103
Aug 08 23:23:40 DEBUG !TSF:MSG:LEN,16!=7
Aug 08 23:23:42 DEBUG TSF:MSG:READ,145-68-141,s=151,c=0,t=111,pt=1,l=14,sg=0:191
Aug 08 23:23:42 DEBUG !TSF:MSG:LEN,16!=21
I have no sensors with those id's of course.
Also mysgw.service does not start up automatically anymore (systemctl enabled etc). If I start it manually, it shuts down after a while. I have tried branch master ja develpment. No difference.
Again, everything worked fine before reinstall, so not a h/w problem.
Help? Ideas?
@jogant Finally had time to double check this:
Paper UI:
Broker Name
mosquitto
Subscription Topic
mygateway1-out
Publish Topic
mygateway1-in
Send Delay 100
Startup check enabled
Metric answer enabled
Network sanity check enabled
Interval to launch network sanity check 3
Attempts before disconnecting the bridge 3
Heartbeat disabled
Attempts before disconnecting nodes 10
EDIT: I noticed I have different topics in MQTT, corrected AND I did:
cd /usr/share/openhab2/addons/
wget http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.4.0-SNAPSHOT.jar <== THIS probably fixed it!
chown for the same file
rm org.openhab.binding.mysensors-2.3.0-SNAPSHOT.jar
Now my MQTT Gw is ONLINE, in Paper UI I just selected the bridge for every individual Thing and now it works.
Hope this helps people strugling with this.
Not sure how to answer some of your questions...but here goes.
configuration:
sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-signing-password=XXXXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
I'm not sure what "eventbus"-binding is. Something I need to install in Paper UI?
Is the configuration file mqtt-eventbus.cfg or something else? Should I try to install it? I have not installed the MQTT binding in OpenHab because at least originally the instructions said not to.
I'm still unsuccesful.
Do I need to reinstall all the files as well? I didn't find a new set of instructions.
In my /etc/openhab2/services-folder I have:
mqtt-eventbus.cfg containing just
broker=mosquitto
and org.eclipse.smarthome.mqttbroker.cfg:
name=mosquitto
host=127.0.0.1
secure=false
port=1883
secure=false
username=XXXX
password=YYYYY
retain=false
clientId=openhabMys
openhab.log everything mysensors related:
2018-07-09 06:40:36.782 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid paho175068223000 and file store '/var/lib/openhab2/mqtt/127.0.0.1'
2018-07-09 06:40:37.050 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTING - org.openhab.binding.mysensors
2018-07-09 06:40:37.075 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTED - org.openhab.binding.mysensors
2018-07-09 06:40:37.206 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=119, service.bundleid=13, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=17} - org.openhab.binding.mysensors
2018-07-09 06:42:36.466 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Tiedostoa tai hakemistoa ei ole)
2018-07-09 06:42:36.685 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2018-07-09 06:42:37.484 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge
2018-07-09 06:42:38.136 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist.
2018-07-09 06:42:38.178 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 1, 99, 4, 5]
2018-07-09 06:42:38.608 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog
2018-07-09 06:42:38.830 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=281, service.bundleid=13, service.scope=singleton} - org.openhab.binding.mysensors
2018-07-09 06:42:38.897 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan
2018-07-09 06:42:38.926 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!
Anyone spot what's still wrong?
P.S. I remember seeing someone got MyS gateway to log to a different file. Does anyone know how to implement that in the ./configure -command? Or how can I do that?
@timo I did. I can't figure out where it's finding that .0 it adds to the 1883 port I have in the cfg-file
Did that, MQTT bridge stuck at "initializing". Not the full answer yet, but thanks @timo for your effort!
Openhab.log when I checked the Services - MQTT in Paper UI
2018-06-08 00:59:19.162 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - Reason unknown
2018-06-08 00:59:19.221 [WARN ] [me.config.core.internal.ConfigMapper] - Could not set field value for field 'port': For input string: "1883.0"
java.lang.NumberFormatException: For input string: "1883.0"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
at java.lang.Integer.parseInt(Integer.java:580) [?:?]
at java.lang.Integer.valueOf(Integer.java:766) [?:?]
at org.eclipse.smarthome.config.core.internal.ConfigMapper.objectConvert(ConfigMapper.java:159) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
at org.eclipse.smarthome.config.core.internal.ConfigMapper.as(ConfigMapper.java:98) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
at org.eclipse.smarthome.config.core.Configuration.as(Configuration.java:54) [98:org.eclipse.smarthome.config.core:0.10.0.oh230]
at org.eclipse.smarthome.io.transport.mqtt.internal.MqttBrokerConnectionServiceInstance.modified(MqttBrokerConnectionServiceInstance.java:77) [207:org.eclipse.smarthome.io.transport.mqtt:0.10.0.oh230]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:229) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:650) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:506) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:307) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:299) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:772) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:727) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:645) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) [41:org.apache.felix.scr:2.0.12]
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2090) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2058) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]
at java.lang.Thread.run(Thread.java:748) [?:?]
2018-06-08 00:59:19.340 [WARN ] [.MqttBrokerConnectionServiceInstance] - Ignore existing broker connection configuration for: mosquitto```
Help!
I semi-followed this thread but also built a shield like this:
http://www.instructables.com/id/Arduino-UNO-as-AtMega328P-Programmer/
For the Uno, the ArduinoISP sketch goes fine. After that, I connect the shield and 328p and upload stuff.
Since my build has 3.3V regulated power (using PCB My Slim 2AA Battery Node..but I can sneak wires to it easily so no need for batteries), I selected 'Board -> Pro Mini' and type '3.3V 8Mhz'. Burn bootloader goes fine, no errors. Upload sketch using programmer (Arduino as ISP) also uploads fine.
When I plug it in (USB FTDI-clone 3.3V selected) and see serial monitor, it remains blank. Nor does the node work when plugged into power.
Anybody else try this? Ideas? The slim node has all caps and resistor connected.
EDIT:
I used the recommended board download from 8Mhz instructions and bingo, it's working...partly. Have to check radio wiring.
Should just follow instructions and not go off on my own......
Great instructions, thanks!
My problems started yesterday with my OpenHab2 updating to 2.3.0.
I'm using Rpi Zero W / DietPi - conf to MQTT gw. Mosquitto and mysgw service work OK. Everything else doesn't.
My problems briefly from the logs:
1527624943: New client connected from 127.0.0.1 as mygateway1 (c1, k15, u'masi').
1527626485: New connection from 127.0.0.1 on port 1883.
1527626485: New client connected from 127.0.0.1 as mosqsub/3760-DietPi (c1, k60, u'masi').
1527626499: Socket error on client mosqsub/3760-DietPi, disconnecting.
OpenHab (edited):
2018-05-29 23:17:17.655 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTING - org.openhab.binding.mysensors
2018-05-29 23:17:17.880 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTED - org.openhab.binding.mysensors
2018-05-29 23:17:18.019 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=116, service.bundleid=13, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=15} - org.openhab.binding.mysensors
2018-05-29 23:19:24.908 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, Tiedostoa tai hakemistoa ei ole)
2018-05-29 23:19:25.184 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2018-05-29 23:19:25.985 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge
2018-05-29 23:19:26.257 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist.
2018-05-29 23:19:26.315 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 1, 99, 4, 5]
2018-05-29 23:19:26.594 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog
2018-05-29 23:19:26.795 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto
2018-05-29 23:19:26.834 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=280, service.bundleid=13, service.scope=singleton} - org.openhab.binding.mysensors
2018-05-29 23:19:26.925 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan
2018-05-29 23:19:27.032 [INFO ] [ateway.MySensorsNetworkSanityChecker] - Network Sanity Checker thread stopped
2018-05-29 23:19:27.191 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,1,99,4,5]
2018-05-29 23:19:27.242 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!
2018-05-29 23:19:27.250 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
I've gone through your steps, Mysensors MQTT gateway remain offline.
What I'm wondering (since the directory structure is different), what is the total content of file: mqtt-eventbus.cfg? Can you post?
Ideas?
A little off topic but I'm struggling with a same type of scenario. Didnt want to start a new topic if the answer is here.
The battery I figured out but I'm having problems with the item (contact) and getting it to my sitemap.
I have checked both files "Contact" in items and "Text" in sitemap (when I add this line the sitemap doesnt load).
I will post my code if necessary, but can you tell me if a map is always necessary for door contacts? I have other types of sensors working without problems. Should my arduino send only specific words or boolean to make it work?
Just a quick idea: are you powering the RFM69 from the Rpi?
I use a Rpi Zero W and when I powered my radio NRF24 from that it doesnt get enough juice even with caps.
I now use a bigger USB-wall wart and use AMS1117-3.3 to power the radio (PA-version) and added caps.
My two cents
@mbj I think I finally solved the GW problem (signing password too short!).
Now I'm starting to deal with OH2. I'm seeing this in the log:
2018-04-03 00:10:59.717 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - MQTT message received. Topic: mysensors-out/99/0/1/0/1, Message: 15.0
2018-04-03 00:10:59.747 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Message topic part: 99/0/1/0/1
2018-04-03 00:10:59.758 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Converted MQTT message to MySensors Serial format. Sending on to bridge: 99;0;1;0;1;15.0
2018-04-03 00:10:59.768 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 99;0;1;0;1;15.0
2018-04-03 00:10:59.777 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 99 found in gateway
2018-04-03 00:10:59.785 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 not present in node 99
I have one node sending temp & hum data (DHT11: child 0 hum, child 1 temp). OH2 wont autodiscover. Does this mean it must be added manually?
I hope there's an autodiscover if I'm going to build a network....
@mfalkvidd Made the password 10 characters. From looks of the logs, it's working now.
I cant believe I skipped the step of making the password longer... Just got too fixated on the password I came up with.
@anticimex I've built a new node, DHT11 that sends temp&hum data. I reconfigured Rpi with this:
sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing-debug --my-signing=password --my-signing-password=XXXXXX --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=YYYY --my-mqtt-password=ZZZZZ --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
This is what I get in gw syslog:
Apr 2 22:53:11 DietPi mysgw: Starting gateway...
Apr 2 22:53:11 DietPi mysgw: Protocol version - 2.2.0
Apr 2 22:53:11 DietPi mysgw: MCO:BGN:INIT GW,CP=RNNGLSQX,VER=2.2.0
Apr 2 22:53:11 DietPi mysgw: !SGN:BND:PWD<8
Apr 2 22:53:11 DietPi mysgw: !SGN:INI:BND FAIL
Apr 2 22:53:11 DietPi mysgw: TSF:LRT:OK
Apr 2 22:53:11 DietPi mysgw: TSM:INIT
Apr 2 22:53:11 DietPi mysgw: TSF:WUR:MS=0
Apr 2 22:53:11 DietPi mysgw: TSM:INIT:TSP OK
Apr 2 22:53:11 DietPi mysgw: TSM:INIT:GW MODE
Apr 2 22:53:11 DietPi mysgw: TSM:READY:ID=0,PAR=0,DIS=0
Apr 2 22:53:11 DietPi mysgw: MCO:REG:NOT NEEDED
Apr 2 22:53:11 DietPi mysgw: MCO:BGN:STP
Apr 2 22:53:11 DietPi mysgw: MCO:BGN:INIT OK,TSP=1
Apr 2 22:53:11 DietPi mysgw: GWT:RMQ:MQTT RECONNECT
Apr 2 22:53:11 DietPi mysgw: connected to 127.0.0.1
Apr 2 22:53:11 DietPi mysgw: GWT:RMQ:MQTT CONNECTED
Apr 2 22:53:11 DietPi mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
Apr 2 22:53:23 DietPi mysgw: TSF:MSG:READ,99-99-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
Apr 2 22:53:23 DietPi mysgw: TSF:MSG:BC
Apr 2 22:53:23 DietPi mysgw: TSF:MSG:FPAR REQ,ID=99
Apr 2 22:53:23 DietPi mysgw: TSF:PNG:SEND,TO=0
Apr 2 22:53:23 DietPi mysgw: TSF:CKU:OK
Apr 2 22:53:23 DietPi mysgw: TSF:MSG:GWL OK
Apr 2 22:53:23 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=8
Apr 2 22:53:23 DietPi mysgw: TSF:MSG:SEND,0-0-99-99,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
Apr 2 22:53:25 DietPi mysgw: TSF:MSG:READ,99-99-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
Apr 2 22:53:25 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=24
Apr 2 22:53:25 DietPi mysgw: TSF:MSG:PINGED,ID=99,HP=1
Apr 2 22:53:25 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=25
Apr 2 22:53:25 DietPi mysgw: TSF:MSG:SEND,0-0-99-99,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
Apr 2 22:54:18 DietPi mysgw: TSF:MSG:READ,99-99-0,s=1,c=3,t=16,pt=0,l=0,sg=0:
Apr 2 22:54:18 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=16
Apr 2 22:54:18 DietPi mysgw: !SGN:NCE:GEN
Apr 2 22:54:23 DietPi mysgw: TSF:MSG:READ,99-99-0,s=0,c=3,t=16,pt=0,l=0,sg=0:
Apr 2 22:54:23 DietPi mysgw: SGN:SKP:MSG CMD=3,TYPE=16
Apr 2 22:54:23 DietPi mysgw: !SGN:NCE:GEN
This is kicking my butt... I cant understand that last part about the nonce
I will add the code from the node as soon as possible.
@bgunnarb I thought this was 2.2: https://forum.mysensors.org/topic/8201/openhab-2-2-binding-mqtt-support
Are you using the older binding? I'm doing battle with signing at the moment, so that could be holding up the function of OH2 as well.
@anticimex I thought so too, but I'm grasping at straws to get the signing to work.
To clarify, is the following enough for simple signing: --my-signing-debug --my-signing=password --my-signing-password=ZZZZZZ
And the arduino code #define MY_SIGNING_SIMPLE_PASSWD = "ZZZZZZ"
Any difference where it's placed in the code? Anything else to check for?
@gohan The whole configure-line:
sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing=software --my-signing-request-signatures --my-signing-weak_security --my-signing-debug --my-signing=password --my-signing-password=ZZZZZZ --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=XXXX --my-mqtt-password=YYYYY --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
If anyone can tell what's missing or if there's a typo?
@anticimex This is what's happening in the gw:
TSF:MSG:READ,36-192-15,s=69,c=0,t=81,pt=1,l=21,sg=0:221
!TSF:MSG:LEN,16!=28
TSF:MSG:READ,75-68-77,s=48,c=1,t=110,pt=1,l=25,sg=1:249
!TSF:MSG:LEN,16!=32
The parser didn't really help much: more baffled than before....and I came away from the troubleshooting guide feeling really stupid
@anticimex Both Arduino IDE is 2.2 and Rpi is compiled with 2.2 stable.
I'm seeing !TSF:MSG:SIGN FAIL in the serial monitor so something is not compatible... I will try making password >8 characters next (currently 6).
I will also add those parameters to see if that makes a difference before reuploading arduino code
@gohan I did, I will post it (but it appears to send normally). But the only things I changed was:
@gohan I made a sensor that sends DHT11 temp+hum. This is the output (some of it..) from mosquitto_sub to topic mysensors-out. So I appear to have a something working. OpenHab2 is not finding any items still...
pi@DietPi:~ $ mosquitto_sub -u XXXXXX -P YYYYYY -v -t 'mysensors-out/#'
mysensors-out/99/1/1/0/0 14.0
mysensors-out/99/0/1/0/1 46.0
mysensors-out/99/1/1/0/0 15.0
mysensors-out/99/0/1/0/1 45.0
mysensors-out/99/1/1/0/0 15.0
mysensors-out/99/0/1/0/1 45.0
mysensors-out/99/0/1/0/1 44.0
mysensors-out/99/0/1/0/1 45.0
mysensors-out/99/0/1/0/1 44.0
mysensors-out/99/1/1/0/0 15.0
mysensors-out/99/0/1/0/1 45.0
mysensors-out/99/1/1/0/0 15.0
mysensors-out/99/0/1/0/1 44.0
mysensors-out/99/0/1/0/1 45.0
mysensors-out/99/0/1/0/1 44.0
mysensors-out/99/1/1/0/0 15.0
mysensors-out/99/0/1/0/1 44.0
mysensors-out/99/1/1/0/0 15.0
Once I changed the config to include simple password, it's not showing anything anymore in mosquitto_sub
It would appear that something is missing from my setup or there's a bug in the configure-line. Can someone tell if there's a bug here somewhere:
sudo ./configure --my-transport=nrf24 --my-rf24-irq-pin=15 --my-signing=password --my-signing-password=ZZZZZZ --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=XXXXXX --my-mqtt-password=YYYYYY --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
@marceloaqno OK, I will look into that once I have an extra sensor feeding my gw (the one I built is a little complex and could be buggy).
Another question: I configured mysgw without "simple password" to sort out problems.
Now to reconfigure mysgw I have to run the "./configure --blah --blahblah..." command and "make", but do I also have to do "make install"? And do I have to re-start & enable the service? Should I stop it first also? Anybody got a step-by-step for this?
I'm using the OH2 2.2 MQTT binding, but it's not discovering anything when I scan in Paper UI. Any tips?
My setup: RPi W, Dietpi stretch, Mosquitto, mysgw 2.2.
I manually added the thing for the MQTT gw because it was not discovered after following the instructions in that thread.
My next step is to build one sensor for extra testing. But I'm having problems with "simple password". I configured mysgw without them to sort out problems.
To reconfigure mysgw I have to run the "./configure" command and "make", but do I also have to do "make install"? And do I have to re-start & enable the service?
Thanks!
@otto001
Syslog:
Mar 21 20:06:05 DietPi systemd[1]: Started MySensors Gateway daemon.
Mar 21 20:06:05 DietPi mysgw: Starting gateway...
Mar 21 20:06:05 DietPi mysgw: Protocol version - 2.2.0
Mar 21 20:06:05 DietPi mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0
Mar 21 20:06:05 DietPi mysgw: TSF:LRT:OK
Mar 21 20:06:05 DietPi mysgw: TSM:INIT
Mar 21 20:06:05 DietPi mysgw: TSF:WUR:MS=0
Mar 21 20:06:05 DietPi mysgw: TSM:INIT:TSP OK
Mar 21 20:06:05 DietPi mysgw: TSM:INIT:GW MODE
Mar 21 20:06:05 DietPi mysgw: TSM:READY:ID=0,PAR=0,DIS=0
Mar 21 20:06:05 DietPi mysgw: MCO:REG:NOT NEEDED
Mar 21 20:06:05 DietPi mysgw: MCO:BGN:STP
Mar 21 20:06:05 DietPi mysgw: MCO:BGN:INIT OK,TSP=1
Mar 21 20:06:05 DietPi mysgw: GWT:RMQ:MQTT RECONNECT
Mar 21 20:06:05 DietPi mysgw: connected to 127.0.0.1
Mar 21 20:06:05 DietPi mysgw: GWT:RMQ:MQTT CONNECTED
Mar 21 20:06:05 DietPi mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
Where is mysgw.log?
@marceloaqno What does your mosquitto.log show?
I did a fresh install of DietPi (stretch), Mosquitto and MySensors --branch master. I left out everything and pretty much did the configure command as you did. I get the same result, but mosuiqtto log shows:
1521584708: New connection from 127.0.0.1 on port 1883.
1521584708: New client connected from 127.0.0.1 as mygateway1 (c1, k15, u'masi').
1521584733: Socket error on client mygateway1, disconnecting.
1521584778: New connection from 127.0.0.1 on port 1883.
So is this normal?
I have one sensors built that's not connecting (its log shows it just trying and trying..). I would like to user simple password and the LEDs, I will build one extra sensors just to help testing.
@gohan I configured:
./configure --my-transport=nrf24 --my-gateway=ethernet --my-controller-ip-address=127.0.0.1 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-signing=password --my-signing-password=ZZZZZZ
./bin/mysgw -d:
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.0
mysgw: MCO:BGN:INIT GW,CP=RNNGLSQX,VER=2.2.0
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY:ID=0,PAR=0,DIS=0
mysgw: MCO:REG:NOT NEEDED
mysgw: connect: Connection refused
mysgw: failed to connect
mysgw: GWT:TIN:ETH OK
mysgw: connect: Connection refused
mysgw: failed to connect
mysgw: GWT:TPS:ETH OK
mysgw: connect: Connection refused
mysgw: failed to connect
mysgw: GWT:TPS:ETH OK
The controller doesn't exist on the DietPi card yet but I'm not sure if that's causing the problem.
@gohan How would I interface the rest of my HA without MQTT...that's at the center of my plan really
@gohan I had another sd card and tried a ready image of DietPi with Mosquitto pre-installed.
I tried it without user/password and mosquitto accepting anonymous but:
/var/log/mosquitto/mosquitto.log:
1521141160: Socket error on client <unknown>, disconnecting.
1521141160: New connection from 127.0.0.1 on port 1883.
..keeps repeating...
...and sudo ./bin/mysgw -d:
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.0
mysgw: MCO:BGN:INIT GW,CP=RNNGLSQX,VER=2.2.0
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY:ID=0,PAR=0,DIS=0
mysgw: MCO:REG:NOT NEEDED
mysgw: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1
mysgw: GWT:RMQ:MQTT RECONNECT
mysgw: connected to 127.0.0.1
mysgw: GWT:RMQ:MQTT RECONNECT
mysgw: connected to 127.0.0.1
mysgw: GWT:RMQ:MQTT RECONNECT```
@marceloaqno Mosquitto v1.4.14.
The broker is working, at least sending & receiving command line (_sub & _pub) messages.
@gohan OK. I did that, the same socket error remains in Mosquitto just under new id.
Is my syntax correct or am I somehow having problems with mosquitto user-pw...?
Haven't tried DietPi. Would Mys+Mosquitto+Openhab2 have trouble running on it? Or why should I change to it?
@gohan Can I just edit mysgw.cpp and do "daemon-reload"?
I have just this one gw. And openHab2 but that has a different id.
I need help with my Rpi mqtt-gw.
I tried to get dev-branch working but changed now to stable. All the install routines run without problems. The service just doesn't seem to work and I can't figure out why.
1521010232: New connection from 127.0.0.1 on port 1883.
1521010232: New client connected from 127.0.0.1 as mygateway1 (c1, k15, u'xxxx').
1521010232: Socket error on client mygateway1, disconnecting.
syslog:
Mar 14 08:51:02 GwMqOH2 systemd[1]: Starting MySensors Gateway daemon...
Mar 14 08:51:02 GwMqOH2 systemd[1]: Started MySensors Gateway daemon.
Mar 14 08:51:03 GwMqOH2 mysgw: Starting gateway...
Mar 14 08:51:03 GwMqOH2 mysgw: Protocol version - 2.2.0
Mar 14 08:51:03 GwMqOH2 mysgw: MCO:BGN:INIT GW,CP=RNNGLSQX,VER=2.2.0
Mar 14 08:51:03 GwMqOH2 mysgw: TSF:LRT:OK
Mar 14 08:51:03 GwMqOH2 mysgw: TSM:INIT
Mar 14 08:51:03 GwMqOH2 mysgw: TSF:WUR:MS=0
Mar 14 08:51:03 GwMqOH2 mysgw: TSM:INIT:TSP OK
Mar 14 08:51:03 GwMqOH2 mysgw: TSM:INIT:GW MODE
Mar 14 08:51:03 GwMqOH2 mysgw: TSM:READY:ID=0,PAR=0,DIS=0
Mar 14 08:51:03 GwMqOH2 mysgw: MCO:REG:NOT NEEDED
Mar 14 08:51:03 GwMqOH2 mysgw: MCO:BGN:STP
Mar 14 08:51:03 GwMqOH2 mysgw: MCO:BGN:INIT OK,TSP=1
Mar 14 08:51:03 GwMqOH2 mysgw: GWT:RMQ:MQTT RECONNECT
Mar 14 08:51:03 GwMqOH2 mysgw: connected to 127.0.0.1
Mar 14 08:51:03 GwMqOH2 mysgw: GWT:RMQ:MQTT CONNECTED
Mar 14 08:51:03 GwMqOH2 mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
Mar 14 08:51:03 GwMqOH2 systemd[1]: mysgw.service: main process exited, code=killed, status=11/SEGV
Mar 14 08:51:03 GwMqOH2 systemd[1]: Unit mysgw.service entered failed state```
GW configure-line:
./configure --my-transport=nrf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-mqtt-user=xxxx --my-mqtt-password=yyyyy --my-signing=password --my-signing-password=zzzzzz```
I have checked mosquitto has correct user-pw combination, but what should I check next? Help!
Hi everyone. Since my last I reinstalled everything. I went back to Raspbian Jessie to get Mosquitto working properly. Full reinstall of MySensors mqtt gw and Openhab2 and binding.
I have one sensor built that will not connect to the gw and I seem to be having problems on the gw as well.
Quick specs: Rpi W, jessie, nrf24.
I'm pretty new to Rpi as gateway, so I'm having little difficulty with finding debug-logs etc as well.
Here's what my configuration was:
./configure --my-transport=nrf24 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-mqtt-user=XXXX --my-mqtt-password=YYYYY --my-signing=password --my-signing-password=123456
/var/log/openhab2/openhab.log
2018-02-19 16:56:15.280 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection 'mosquitto' to 'tcp://127.0.0.1:1883' with clientid paho108561372416048 and file store '/var/lib/openhab2/tmp/mosquitto'
2018-02-19 16:56:15.406 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection 'mosquitto' to 'tcp://127.0.0.1:1883' with clientid paho108561583416206 and file store '/var/lib/openhab2/tmp/mosquitto'
......keeps repeating
/var/log/mosquitto/mosquitto.log
1519052215: Socket error on client <unknown>, disconnecting.
1519052215: New connection from 127.0.0.1 on port 1883.
1519052215: Socket error on client <unknown>, disconnecting.
1519052225: New connection from 127.0.0.1 on port 1883.
....keeps repeating
systemctl status mysgw.service
Feb 18 10:27:44 GwMqOH2 mysgw[359]: connect: Connection refused
Feb 18 10:27:44 GwMqOH2 mysgw[359]: failed to connect
...repeating
when I run mysgw -d:
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.1-alpha
mysgw: MCO:BGN:INIT GW,CP=RNNGLSQX,VER=2.2.1-alpha
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY:ID=0,PAR=0,DIS=0
mysgw: MCO:REG:NOT NEEDED
mysgw: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1
mysgw: GWT:RMQ:MQTT RECONNECT
mysgw: connected to 127.0.0.1
mysgw: GWT:RMQ:MQTT CONNECTED
mysgw: GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
Any ideas? Where should I start?
Sorry for flooding, the code-block is not working for some reason....
@alowhum I'm not using the GPIO for anything else.
I had everything working (mysgw-MQTT, Mosquitto, Node-Red and OH2) for almost 6h. Then I moved the set-up and everything went south: cant get mosquitto to start, cant get mysgw to connect to that or another Mosquitto broker, OH2 seems to ignore everything...
Spent the last 24h trying to resurrect Mosquitto but it's beyond me what's wrong.
I remember reading that mysgw renders rest of the gpio unusable. Maybe that's giving you problems.
Well, this joy lasted almost 24h...until I unplugged and moved the set-up.
Now Mosquitto-service wont start "Status 11/SEGV"...went nuts looking for that.
Moved Mosquitto to another machine, but now mysgw-service "failed to connect".
Any ideas why Mosquitto went status11 after reboot?
Why wont mysgw connect to another Mosquitto IP? does the port 1883 need to be configured as well?
My configure-line: --my-transport=nrf24 --my-gateway=mqtt --my-controller-ip-address=192.168.0.52 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18 --my-mqtt-user=????? —-my-mqtt-password=???????
@timo Alright!! MQTT Gateway Online. Thanks for your patience. Hopefully this thread will help future hopefuls.
Now, I'm gonna activate some nodes and see what happens.
@lastsamurai I kinda figured that. From the first post I understood that the MQTT binding (binding-mqtt1 - 1.11.0) did not need to be installed. mqtt.cfg -file does come from that. So far I haven't installed it, but if that's where the mqtt.cfg file should come from then I'll do that next.
Just dont want to have addon on top of addon if they're redundant.
@sentur That's what I'm doing now. Except mine is Zero W. Soldered the pins on myself.
@timo I still cant find mqtt.cfg OR org.eclipse.smarthome.mqtt.cfg. I looked thru the Github stuff but didn't see it.
Any ideas where to locate either of these files? I assume they have more lines than those four on display in the example.
Thanks. Sorry I'm still a tool with OH2
OK, n00b questions again:
@gohan N00b question, but which steps from the step-by-step need to be redone to "compile it" after altering myconfig.h? Or can you just post the command lines?
@gohan OK. Doesn't sound too hard. Does that mean I also have to update the GW? All my other nodes as well? Or are they backwards compatible?
@gohan I'm just gonna let my n00b flag fly here....
How do I do that? Arduino IDE library?
To combat the reboots, I'm rebuilding the GW with adequate power and capacitors.
Hopefully that will solve some problems.