Sensors & Pi Dome Controller - Sensor ID assignment on AUTO mode not completing assignment of ID to sensor



  • Testing PiDome as my controller;
    have succesfully connected arduino pro mini over ftdi module;
    broadcast msg from sensor comes in OK, and pidome asks for assignment of id correctly;
    unfortunately, when I assign the id, it appears to not be SET on the sensor node - i.e., it keeps on re-asking it by broadcasting messages.

    GW works ok from FTDI check via serial monitor,
    but in PiDome I get "Waiting for gateway" in Gateway information page Version field.
    Has anyone seen this before?

    Here the log from the pidome

    Below is a list of last known 20 messages

    07-12-2014 13:02:38: Trying assigning address '2' to a new node
    07-12-2014 13:02:38: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:59:25: Trying assigning address '1' to a new node
    07-12-2014 12:59:25: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:58:51: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:57:45: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:54:31: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:46:31: Trying assigning address '1' to a new node
    07-12-2014 12:46:31: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:42:45: Trying assigning address '1' to a new node
    07-12-2014 12:42:45: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:42:11: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:41:38: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:40:32: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:36:14: Trying assigning address '1' to a new node
    07-12-2014 12:36:14: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:35:40: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 12:35:07: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:

    Some more logs from pidome:

    2014-12-07 13:12:38,735 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.system.rpc.AbstractRPCMethodExecutor - Declared params for peripheralDeviceFunction : [class java.lang.String, interface java.util.Map]
    2014-12-07 13:12:38,736 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.system.rpc.AbstractRPCMethodExecutor - Passed in params for 'peripheralDeviceFunction': [/dev/ttyUSB0, {identifier=newNodeRequest, function_label=Add sensor node, ADDRESS=3, function_id=customFunction}]
    2014-12-07 13:12:38,742 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Sending internal message to device: '255;255;3;0;4;3'
    2014-12-07 13:12:38,743 [pool-45-thread-1] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - sending: [B@8b0e52
    2014-12-07 13:12:38,746 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.system.rpc.PidomeJSONRPC - Response data: {data=true, success=true, message=}
    2014-12-07 13:12:38,916 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.services.clients.http.HTTPClientHandler - 192.168.1.24 - GET: /desktop/driversedit.html
    2014-12-07 13:12:40,191 [Thread-89] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Handling internal: 0;0;INTERNAL;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    2014-12-07 13:12:40,192 [Thread-89] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Log request: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    2014-12-07 13:12:40,193 [Thread-89] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Handling internal: 255;255;INTERNAL;3;
    2014-12-07 13:12:43,022 [Thread-89] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Handling internal: 0;0;INTERNAL;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    2014-12-07 13:12:43,023 [Thread-89] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Log request: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    2014-12-07 13:12:43,024 [Thread-89] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Handling internal: 255;255;INTERNAL;3;

    And some more logging from pidome upon adding a sensor 👍

    2014-12-07 13:24:44,420 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.system.rpc.AbstractRPCMethodExecutor - searching for peripheralDeviceFunction in DeviceService
    2014-12-07 13:24:44,421 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.system.rpc.AbstractRPCMethodExecutor - Declared params for peripheralDeviceFunction : [class java.lang.String, interface java.util.Map]
    2014-12-07 13:24:44,422 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.system.rpc.AbstractRPCMethodExecutor - Passed in params for 'peripheralDeviceFunction': [/dev/ttyUSB0, {identifier=newNodeRequest, function_label=Add sensor node, ADDRESS=3, function_id=customFunction}]
    2014-12-07 13:24:44,424 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - Sending internal message to device: '255;255;3;0;4;3'
    2014-12-07 13:24:44,426 [pool-45-thread-1] DEBUG
    org.pidome.driver.driver.nativeMySensorsDriver14.NativeMySensorsDriver14 - sending: [B@12b9811
    2014-12-07 13:24:44,428 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.system.rpc.PidomeJSONRPC - Response data: {data=true, success=true, message=}
    2014-12-07 13:24:44,525 [WEBCLIENT:192.168.1.24] DEBUG org.pidome.server.services.clients.http.HTTPClientHandler - 192.168.1.24 - GET: /desktop/driversedit.html

    Is the highlighted line supposed to be correct?
    Btw, Pidome does not allow for location adding for me - an exception prevents me to do so 😕



  • Try to turn off node, restart pidome server. After restart go to drivers management/ drivers.. Turn on node and refresh drivers page. If you see new request about id press apply. You have only few second after power on node to apply new address.



  • Thanks for the suggestion;
    tried, same result. Node keeps on askig for valid ID.

    Below is a list of last known 20 messages

    07-12-2014 18:30:48: Trying assigning address '2' to a new node
    07-12-2014 18:30:48: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 18:26:31: Trying assigning address '2' to a new node
    07-12-2014 18:26:31: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 18:23:49: Trying assigning address '2' to a new node
    07-12-2014 18:23:49: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 18:23:46: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 18:23:44: Trying assigning address '2' to a new node
    07-12-2014 18:23:44: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 18:23:42: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 18:23:38: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 18:23:36: Trying assigning address '2' to a new node
    07-12-2014 18:23:36: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
    07-12-2014 18:23:34: 0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:


  • Plugin Developer

    I'm not seeing a send log message from the gateway. I have replyed to you in the other thread about the gateway ready message.

    The highlighted message is a correct message, it is a verification the data is passed to the serial driver. The reason it appears like "garbled" text is because they are bytes being send.

    Regarding an exception within the location editor. Send me the log file to support@pidome.org

    John.



  • Thanks for the support guys, after re-checking the sensor, I am pretty positive this is a sensor power issue (i.e. I need more power 🙂 ).


  • Plugin Developer

    Well ,the log should also display the send command. You can start the server with a trace option in the command line. The server then only has to be started in a different way. When the server is stopped. start it with the server.sh shell file (probably you have to set 755 first). Commandline then is "./server.sh trace". Could you try to assign an address while trace is on and send me the log?



  • @John said:

    Well ,the log should also display the send command. You can start the server with a trace option in the command line. The server then only has to be started in a different way. When the server is stopped. start it with the server.sh shell file (probably you have to set 755 first). Commandline then is "./server.sh trace". Could you try to assign an address while trace is on and send me the log?

    Are the last 20 lines of log enough or the appLog file would be better?


  • Plugin Developer

    @tortoisedoc You can send the whole thing, no problem, if you would be so kind to try to add a location which gave you an issue that would be nice also, then i can pick that one up also



  • @John said:

    @tortoisedoc You can send the whole thing, no problem, if you would be so kind to try to add a location which gave you an issue that would be nice also, then i can pick that one up also

    Ok, Ill get to it tomorrow - pretty late now around here, unfortunately.


  • Plugin Developer

    @tortoisedoc Same "issue" here. I will try to take a look. Keep an eye on the builder server which always contains the latest build: builder.pidome.org. maybe it will be solved when you try it tomorrow.



  • Maybe a new topic?

    I want to connect a smartmeter to Pi Dome controller.
    I have a USP/Serial cable connected to the powermeter.
    With another program I have seen that the Raspberry receives information.
    The light on the serial-usb cable is flashing every 10 seconds. That means that data is available.

    Now I have installed Pi Dome. This works nice and has a good performance.

    At this moment I don't know how to go further.
    I have installed some drivers. Adjusted the baudrate and now I get the message "Waiting for gateway" and I don't receive values in the logging.


  • Plugin Developer

    @Derk-W.

    The smart meter, is it a mysensors based device?



  • Hi, The Smartmeter (in Dutch de slimme meter) is an electricitymeter with a serial port.
    The energy company installs it in all the Dutch houses (during the coming years).
    Many owners of houses with solar cells have already such a meter.
    The meter can be connected to the gas meter.
    So it's possible to get in one message the gas and electricity usage.

    Electronically it's simple. You use a modified USBtoSerial (RS232) cable, connected directly to the RbP.
    Every 10 seconds the meter produces some ascii strings with informaiton about the energy usage .

    You can look at the dutch article: http://gejanssen.com/howto/Slimme-meter-uitlezen/

    Regards.

    Now I hope someone can help me with connecting this meter to PIDome.

    I've posted the same question in detail on the PiDome forum under Hardware/Devices.
    http://forum.pidome.org/viewforum.php?id=13


  • Plugin Developer

    @Derk-W.
    As this is a non mysensors like device i will help you further on the pidome forum. I have seen the post but was gone all day, wasn't in the position to help earlier.



  • @tortoisedoc said:

    but in PiDome I get "Waiting for gateway" in Gateway information page Version field.

    I had a similar problem...You need to fix the Waiting for gateway as it doesn't look like it is working. What type of gateway are you using. I had a hardware issue where the Pro Micro's I was using did not work, no matter what I tried.

    Is Device Discovery working?


  • Plugin Developer

    @den2k
    My test device was an Arduino Nano and have not found any issues with it. I receive the gateway ready message, and after this received i send a command to ask for the version number and this is also received. As you said you have used Pro Micro's did it show gateway ready in your Arduino terminal?

    With this setup also the device discovery is tested (all though this is the exact same shared code as used for for example RFXCom devices). The device discovery works when the gateway ready message is received as then, data interaction is enabled.



  • Yes. On the Pro Micro it did not show the Gateway ready. But, now that I using Pro Mini's it does show Gateway ready.

    I traced back to Arduino, and it looks like I wasn't able to get even the Serial Gateway to work and show through the Serial Monitor, Gateway started on the pro Micro. But on the Mini the gateway at least seems to be working.

    @tortoisedoc - I'm not sure why you can be "Waiting for gateway" but yet still have packets between GW and Node show up on the driver. I'm still debugging as well.


  • Plugin Developer

    The reason that the log is being filled is because despite not having the gateway ready message data can become available. I have been thinking of adding an extra switch in the software that if gateway ready is not received, but other data arrives to toggle the internal state and have the gateway marked ready. And when first data arrives ask for the version number.

    I do not have enough knowledge about the differences between the FTDI FT232RL (nano) and ATmega32U4 (pro micro) when they are ready to accept data to be send to/from the gateway. If the usb chip is not ready to accept and gateway ready is send, data is lost. But this is an assumption (Arduino's only have receive and not send buffers as far as i know), maybe some hardware guru can shine a light on it.


 

257
Online

8.8k
Users

9.5k
Topics

100.2k
Posts