diggs
Posts
-
Remote Node Reset -
Running two gateways side-by-side -
Running two gateways side-by-sideHi all,
Just wondering if it is OK to have two gateways running within range of each other. I have a home system running, but want to build a system for a friend and do the testing at home. That means I will have two gateways (and their nodes) within range of each other when doing the test and build.
I would imagine both gateways will pickup all nodes. Would this cause confusion in the systems?
Thanks for the advice
-
MyController.org@jkandasa as discussed on chat, but thought I would put the info her as well.
Using one of the 4 USB ports on the PI.
Versions
Linux raspberrypi 4.1.6-v7+ #810 SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l GNU/Linux
-
MyController.org@jkandasa I do have an AMA0, but it does not work on that one either. The gateway is definitely connected to ACM0. Which is the one it works on when I have Domoticz connected up.
Something odd is happening with the PI USB side of things. Tried switching to another port but no luck there either.
As a side, I installed on windows and it works fine, so I know the gateway is OK, but I really want it running on the PI at some point
-
MyController.org@jkandasa Checked my settings and they were already set as per that article, so I don't believe that is the trouble I am facing. From the logs I sent you, anything else you think could be causing the issue. Was the port being opened OK in the system?
-
MyController.org@jkandasa OK thanks
At least I am not going crazy :)
-
MyController.org@davidbd Thanks for the reply.
Yep, can connect to the port and see the node / gateway data in the line.
Still nothing though in the Mycontroller
All my settings seem pretty standard, so not sure what the issue would be or what to check next.
#======================================================================== # MySensors Gateway settings # Select Type of gateway will be used, Only one gateway will be used # Types -> serial, ethernet, mqtt #======================================================================== mcc.ethernet.gateway.type=serial #======================================================================== # MySensors Serial port settings # In this section select: Driver, port name and baud rate # Available drivers -> [pi4j, jssc, jserialcomm, auto] #======================================================================== mcc.serialport.driver.type=auto mcc.serialport.name=/dev/ttyACM0 mcc.serialport.baud.rate=115200 #======================================================================== # MySensors Ethernet Gateway settings # Update host name/ip and port number, Default: 192.168.178.6:5003 # Keep alive check frequency in seconds #======================================================================== mcc.ethernet.gateway.host=192.168.178.6 mcc.ethernet.gateway.port=5003 mcc.ethernet.gateway.keep.alive.frequency=60 #======================================================================== # MySensors MQTT Gateway settings # Update broker host name/ip and port number, Default: 192.168.178.6:1883 # Root topic name of broker # Note: MQTT_TRANSLATE_TYPES will be not supported # Disable MQTT_TRANSLATE_TYPES in your MQTT gateway #======================================================================== mcc.mqtt.gateway.broker.host=192.168.178.6 mcc.mqtt.gateway.broker.port=1883 mcc.mqtt.gateway.broker.root.topic=MyMQTT #======================================================================== # Database # Where do you want to keep your database. # It is highly recommended to take a backup of this db on upgrade. # Database: H2DB, location and name, example:/tmp/mycontroller #======================================================================== mcc.h2db.location=../conf/mycontroller #======================================================================== # Web files, will be located under ../www by default # For web used angularjs #======================================================================== www.file.location=../www/ #======================================================================== # Web Application server configuration # bind.address - interface to bind. 0.0.0.0 - all available interfaces # You can use either http or https, enable.https - https is enabled # if https is enabled specify keystore file details # It is highly recommended to use https also change default keystore file #======================================================================== bind.address=0.0.0.0 enable.https=true http.port=8443 ssl.keystore.file=../conf/keystore.jks ssl.keystore.password=password ssl.keystore.type=JKS #logger configuration - logback.xml -
MyController.org@jkandasa Thanks
Have now done all that. Stopped the Domoticz server, started Mycontroller. I get the webpage up now, but still no nodes showing up and for some reason nothing is being written to my logs the past few hours at all.
What can I look at?
-
MyController.org@jkandasa Thanks for that.
The latest Java version has go me going as far as server access goes, but I am having issues opening the serial port it seems.
I am trying to run in parallel with Domoticz, but I maybe having an issue trying to access the same port I am guess.
Suggestions on how to get around that?
2015-09-27 15:45:16,568 ERROR [main] [org.mycontroller.standalone.gateway.serialport.SerialPortPi4jImpl:68] Failed to load serial port, java.io.IOException: Unable to open the serial port/device. (Error #2) at com.pi4j.jni.Serial.open(Native Method) ~[mycontroller-standalone-0.0.2-alpha4-single.jar:na] at com.pi4j.io.serial.impl.SerialImpl.open(SerialImpl.java:151) ~[mycontroller-standalone-0.0.2-alpha4-single.jar:na] at com.pi4j.io.serial.impl.SerialImpl.open(SerialImpl.java:242) ~[mycontroller-standalone-0.0.2-alpha4-single.jar:na] at org.mycontroller.standalone.gateway.serialport.SerialPortPi4jImpl.initialize(SerialPortPi4jImpl.java:61) [mycontroller-standalone-0.0.2-alpha4-single.jar:na] at org.mycontroller.standalone.gateway.serialport.SerialPortPi4jImpl.<init>(SerialPortPi4jImpl.java:40) [mycontroller-standalone-0.0.2-alpha4-single.jar:na] at org.mycontroller.standalone.StartApp.startServices(StartApp.java:217) [mycontroller-standalone-0.0.2-alpha4-single.jar:na] at org.mycontroller.standalone.StartApp.main(StartApp.java:78) [mycontroller-standalone-0.0.2-alpha4-single.jar:na] 2015-09-27 15:45:16,646 INFO [main] [org.mycontroller.standalone.db.TimerUtils:144] Updated Time:[SunRise:Sun Sep 27 10:36:00 AEST 2015, SunSet:Sun Sep 27 22:41:00 AEST 2015], City:[latitude:11.2333, longit$ [Sun Sep 27 15:45:21 AEST 2015] TJWS httpd 0.0.0.0 - [SSL: ServerSocket[addr=0.0.0.0/0.0.0.0,localport=8443]] is listening. -
MyController.orgFor some reason cannot seem to get it running.
Have installed the software and the server appears to start, but there is no web access and this is what I get when I check the log.
Have I setup something incorrect
Running on a PI
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/mycontroller/standalone/StartApp : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:792) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode) -
MyController.orgJust wondering if it is possible to run two controllers side by side both looking at the same serial port?
i.e. can I run Domoticz and MyController at the same time in serial mode with the one gateway or would it cause issues?
-
Remote Node ResetI have a requirement where I will be running a sensor in a remote location that I will not have physical access to for several weeks. I will have remote access via either port forwarding on the remote network or using weaved on the PI.
http://www.weaved.com/in-action/weaved-iot-kit
The issue I have is that from time to time, a node may lock-up and stop communicating (often due to a noisy electrical environment). While it is not a common thing, I cannot afford to lose comms with the node, so I am after a way to either
-
have the node reboot at some specific time or some type of watchdog system on board to do this
-
a way to reboot the node remotely when I see it not responding anymore
Any suggestions, tips and pointers appreciated. If I had to change controller for this specific project I could consider that, but must have the remote access.
Setup
Raspberry PI
Serial Gateway
Moisture Detection Sensor
NRF24 Radio
Domoticz Controller
Weaved (http ssh access) -
-
Random Sensor ReadingsThanks for the input all
I might put two sensors together and see what transpires to see if I can narrow things down a bit and see if it is specifically a sensor issue or the controller.
-
soil moisture sensor sketch@BartE Thanks for that. My issue ended up being with the signal lead from the sensor to the arduino. A bad connector. Your advice on the pull-up resistor was very useful.
Thanks
-
soil moisture sensor sketchHi all,
Just looking for some help here. I have uploaded the soil moisture sensor sketch, but when I look on the serial port, it is just a constant stream of messages alternating as below. Eventually the system fails.
Even if if I disconnect the moisture sensor from the system it does the same thing, so not the sensor. If I upload a different sketch to the node (Dallas temp sensor for example) it does not have the issue, so I am thinking it is something in the moisture sensor sketch.
Any suggestions on what is happening?
Below are the messages that stream past in the serial monitor at high speed
send: 1-1-0-0 s=0,c=1,t=16,pt=2,l=2,sg=0,st=ok:1
1
send: 1-1-0-0 s=0,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
0
send: 1-1-0-0 s=0,c=1,t=16,pt=2,l=2,sg=0,st=ok:1
1
send: 1-1-0-0 s=0,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
0
send: 1-1-0-0 s=0,c=1,t=16,pt=2,l=2,sg=0,st=ok:1
1This is the standard sketch i am using
/**
- The MySensors Arduino library handles the wireless radio link and protocol
- between your home built sensors/actuators and HA controller of choice.
- The sensors forms a self healing radio network with optional repeaters. Each
- repeater and gateway builds a routing tables in EEPROM which keeps track of the
- network topology allowing messages to be routed to nodes.
- Created by Henrik Ekblad henrik.ekblad@mysensors.org
- Copyright (C) 2013-2015 Sensnology AB
- Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
- Documentation: http://www.mysensors.org
- Support Forum: http://forum.mysensors.org
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as published by the Free Software Foundation.
- REVISION HISTORY
- Version 1.0 - Henrik Ekblad
- DESCRIPTION
- Example sketch sending soil moisture alarm to controller
- http://www.mysensors.org/build/moisture
*/
#include <SPI.h>
#include <MySensor.h>#define DIGITAL_INPUT_SOIL_SENSOR 3 // Digital input did you attach your soil sensor.
#define INTERRUPT DIGITAL_INPUT_SOIL_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
#define CHILD_ID 0 // Id of the sensor childMySensor gw;
MyMessage msg(CHILD_ID, V_TRIPPED);
int lastSoilValue = -1;void setup()
{
gw.begin();// Send the sketch version information to the gateway and Controller
gw.sendSketchInfo("Soil Moisture Sensor", "1.0");
// sets the soil sensor digital pin as input
pinMode(DIGITAL_INPUT_SOIL_SENSOR, INPUT);
// Register all sensors to gw (they will be created as child devices)
gw.present(CHILD_ID, S_MOTION);
}void loop()
{
// Read digital soil value
int soilValue = digitalRead(DIGITAL_INPUT_SOIL_SENSOR); // 1 = Not triggered, 0 = In soil with water
if (soilValue != lastSoilValue) {
Serial.println(soilValue);
gw.send(msg.set(soilValue==0?1:0)); // Send the inverse to gw as tripped should be when no water in soil
lastSoilValue = soilValue;
}
// Power down the radio and arduino until digital input changes.
gw.sleep(INTERRUPT,CHANGE);
} -
Random Sensor ReadingsHi all,
Not sure if this a domoticz or mysensor issue. Every once in a while I will get a random temp reading on my graph and I am not sure exactly how to go about tracking down the issue, so any advice appreciated. The sensor being used is a DS18B20 on a serial gateway to a PI. Normally if I lose radio connection the sensor data will flatline so the issue must be somewhere else. In this case it has dropped to zero degrees.
-
Using OpenHAB, any better (looking) alternatives?@kolaf I was wondering what you needed to do to get MQTT working with the MySensors and Domoticz. Can you point me in the right direction for that?
-
Moving Sensor Between GatewaysThanks, I will watch out for conflicting node id's
-
Moving Sensor Between GatewaysI have two gateways (home & work) and I am wanting to swap some sensors back and forth between gateways.
Is there any issue in moving sensors between gateways?
Once the sensor ID is assigned by the first gateway, does it then keep that ID when moved to the second gateway or will the second gateway try and assign a new ID?