Usage problem with 2.0 library



  • HI,

    I have several sensors running on the V1.0 my sensors library, this for quite some time now... All works like a charm.

    Now, i wanted to create a new Lux sensor, so I have decided to make this one using the v2.0 library code
    For starters I had some installation issues. I I didn't know how to upgrade the library from v1 to v2, so I have decided to uninstall/install Arduino software and to use the tutorial how to add the 2.0 library to the arduino software. For some reason the new sketches didn't work and I didn't saw how to upgrade it on my earlier version of the Arduino software. But this fixed it.

    Then, I was not able to use Bh1750.h library, so I have donwloaded it from gifthub and added it to the library. All was working and compiling wel from then.

    But now, the lux sensor itself is not working. It gives me an error:
    TSM:ID
    TSM:CHKID:OK (ID=6)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 6-6-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:CHKUPL:FAIL (hops=255)
    !TSM:UPL:FAIL
    TSM:FPAR
    TSP:MSG:SEND 6-6-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-6 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=6)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 6-6-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1

    I see a fail on TCP:CHKUPL:FAIL.. I found on the internet, that maybe ID 0 was used in the (used the example sketch from this site), changed this to a different value, but with no luck..

    I need to say that my GW is still using the V1.0 library code. I didn't upgraded this yet because I am not sure when I change my GW that I need to upgrade all my other sensors? Hopefully this is not the case :).....

    Anyone got an idea what this error could mean?



  • Version 2.0 sensors will not work on a 1.x gateway. You should update your gateway. I can't say for certain about 1.0, but I can say that I had 1.5 sensors running fine on my new 2.0 gateway.


  • Admin

    @dbemowsk @rnollen Yes you're right, 2.x is not backwards compatible with 1.x setups. Ideally, all nodes/GW should be on the same version.



  • OK... I will try to find v2.0 code for my projects 🙂 And will upgrade the GW first then 🙂



  • @tekka said:

    Ideally, all nodes/GW should be on the same version.

    You say that ideally they should be on the same version, but you should be able to run the nodes on a 2.0 gateway. My suggestion would be to change your gateway first and see how things run. If the nodes run okay, then you can update them at your leisure. I ran my 1.5 nodes for a while on my 2.0 gateway before I changed them all completely.

    @rnollen The hard part for you right now is that you have your MySensors arduino library code changed to 2.0 now, so it would be a pain to go back. If you have the parts, you could make yourself a whole new 2.0 gateway and leave your old 1.0 gateway in tact. That way if you have sensors that don't work with the 2.0 gateway, you can swap your 1.0 gateway back for normal operation and switch in the 2.0 gateway when you want to test new nodes. You could at least lessen the burden on the update of all your nodes.


  • Hardware Contributor

    ideally meaning if you want to be sure to have no issue 🙂
    but for testing, you're right, it's perahps better to assemble a small test setup and see how it behaves before updating.



  • @scalz said:

    but for testing, you're right, it's perahps better to assemble a small test setup and see how it behaves before updating.

    Ofcourse.. No Nuts no glory, I thought 🙂 So updated my gateway..

    Now, updating went well: I see this in the logs of the gateway:
    IP: 192.168.0.20
    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    IP: 192.168.0.20
    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    IP: 192.168.0.20
    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    IP: 192.168.0.20
    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    IP: 192.168.0.20

    And it doing this in a loop... So I think this is OK?

    But now, my domoticz doesn't connect correclty 😞 It does an initial connection, but I get an connection reset after a few seconds.
    Anyone tried this with Domoticz? I would not have expected this 😞

    <edit>
    Hmm.. Gateway is not functioning correctly I guess.. In the troubleshooting guide I think I should see more at the end: (Copy/paste from this site):
    IP: 192.168.10.80
    0;255;3;0;9;MCO:REG:NOT NEEDED
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    0;255;3;0;9;TSF:MSG:READ,12-4-0,s=18,c=1,t=16,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:READ,12-4-0,s=31,c=1,t=16,pt=1,l=1,sg=0:1

    Also, I should see Gateway Startup Complete as the last line, but for some reason it is not working.. The wiring is exactly the same as before..? Also cleared the EEProm; republish the sketch.. but no luck
    So it does not initialize correctly I think... but why?


  • Hardware Contributor

    looks like your GW is rebooting..
    What's your hardware for GW?



  • @scalz said:

    looks like your GW is rebooting..
    What's your hardware for GW?

    I use an Arduino Uno and the W5100 Module, not the shield which you can click on an Uno..

    I know in the past when I created the module, I needed to enable "//#define MY_SOFTSPI" in MyConfig.h... Tried it again, no luck.. Checked the wiring, nothing strange here..also nothing was changed on the wiring part, so I thought I would expect the same result...


  • Hardware Contributor

    oki so you're using softspi. i guess you're using NRF24 radio ?
    I am checking with a few people if softspi is working ok with rfm69 (but i'm not using ethernet gw).
    Just to be sure, can you confirm : W5100 SS/CSN pin on Arduino D10, and Radio SS/CSN pin on D6, right?
    I'll look later today. I hope we will be able to get rid of the softspi 😉



  • Thanks.. I am not sure what is going wrong at this stage.

    I am using an indeed a NRF24 radio, but I use the one with an external antenna (such as this one: http://www.ebay.com/itm/2-4G-1100m-Module-NRF24L01-PA-LNA-Communication-SMA-Antenna-Wireless-Transceiver-/172255694961?hash=item281b3d5071)
    I use an external antenna because of the range and because I can make a cleaner box around it 😉

    Also my W5100 is slightly different, because alternative names are printed on the bottem. It has the same labels as the topicstarter here: https://forum.mysensors.org/topic/467/ethernet-gateway-troubleshooting-advice

    But it worked like a charm for the last 1,5 years 🙂

    But to give you an answer.. the SS/CSN is called NSS on my W5100 and this is the D10. Think this is OK?
    The Radio CSN is connected to D6


  • Hardware Contributor

    @rnollen
    noted, thx!
    i'll give you feedback 😉


  • Hardware Contributor

    can you upload your gw and node sketch, so i can see your defines please?



  • @scalz said:

    can you upload your gw and node sketch, so i can see your defines please?

    Hi, I am only busy with the GW at this moment, I have not altered any sensor yet to 2.0 (Got 7 nodes).. this was the next phase 🙂 I only have a lux sensor on y Breadboard running on MySensors 2.0

    I used the sketch from the example libary, the same as on the build page of MySensors: (https://www.mysensors.org/build/ethernet_gateway) and used the "WizNET (W5100) Ethernet module" sketch.

    Things I have tested:

    1. Enabled "//#define MY_W5100_SPI_EN 4" in the sketch. This resulted in a radio error:
    2. Changed the "//#define MY_SOFTSPI" in MyConfig.h, didn't seem to do anything when I enabled that. I have tested it where I have Enabled step 1, then it didn't give me an error on the radio... but it didn't fix anything also. Disabled step 1. Same result.

    Don't know what I can test more 🙂

    If you need anything, just let know. 🙂



  • Think I have fixed it 🙂

    I found this topic: https://forum.mysensors.org/topic/4680/mysensors-2-0-ethernet-gateway-atmega-w5100-restart-all-time/5

    The answer for me was to downgrade the Arduino AVR Boards to version 1.6.11 (Using Tools/Boards/Boardsmanager) ... It seems there is a bug in the newer release of this tool and the W5100. So hopefully this issue can be fixed, so that in newer releases this is OK. Maybe it is wise to add this to the Ethernet Gateway Page when using a W5100 and Mysensors 2.0 😉


Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 4
  • 3
  • 10
  • 2

19
Online

11.2k
Users

11.1k
Topics

112.5k
Posts