Skip to content
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
S

slt1

@slt1
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store
About
Posts
43
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MYSController with MQTT Gateway (via Node Red)
    S slt1

    It appears this project is not really active anymore, but if anyone is interested here is a node red flow you can use to allow MYSController to use MQTT - with OTA updates (MYSBootloader)

    In MYSController setup to use TCP on port 8164 (or choose another in Node red).

    Then click "Discover" and everything should then start streaming in.

    [{"id":"05daaa30f133dea6","type":"tab","label":"MYSController Bridge","disabled":false,"info":"","env":[]},{"id":"0c03db96217a8d15","type":"tcp in","z":"05daaa30f133dea6","name":"","server":"server","host":"","port":"8164","datamode":"stream","datatype":"utf8","newline":"","topic":"","trim":false,"base64":false,"tls":"","x":120,"y":160,"wires":[["207a2bef4ba58466"]]},{"id":"b216b0fc146f38d6","type":"mqtt out","z":"05daaa30f133dea6","name":"To mygateway1-in","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"6da0af37c3ba3336","x":670,"y":160,"wires":[]},{"id":"207a2bef4ba58466","type":"function","z":"05daaa30f133dea6","name":"function 1","func":"flow.set("tcp_session",msg._session);\nflow.set("tcp_ip",msg._session);\nflow.set("tcp_port",msg._session);\nvar parts = msg.payload.split(";");\nmsg.topic = "mygateway1-in" + '/' + parts[0] + '/' + parts[1] + '/' + parts[2] + '/' + parts[3] + '/' + parts[4];\nmsg.payload = parts[5];\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":160,"wires":[["b216b0fc146f38d6"]]},{"id":"e97f3f15b6b5c04f","type":"mqtt in","z":"05daaa30f133dea6","name":"From myqateway1-out","topic":"mygateway1-out/#","qos":"2","datatype":"utf8","broker":"6da0af37c3ba3336","nl":false,"rap":true,"rh":0,"inputs":0,"x":160,"y":240,"wires":[["aa75b302916ca68b"]]},{"id":"7f06f63ff068402c","type":"tcp out","z":"05daaa30f133dea6","name":"","host":"","port":"8164","beserver":"reply","base64":false,"end":false,"tls":"","x":640,"y":240,"wires":[]},{"id":"aa75b302916ca68b","type":"function","z":"05daaa30f133dea6","name":"function 2","func":"msg._session = flow.get("tcp_session");\nmsg.ip = flow.get("tcp_ip");\nmsg.port = flow.get("tcp_port");\nif (msg._session == undefined)\n return null;\nvar parts = msg.topic.split("/");\nmsg.payload = parts[1] + ';' + parts[2] + ';' + parts[3] + ';' + parts[4] + ';' + parts[5] + ';' + msg.payload + "\n";\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":240,"wires":[["7f06f63ff068402c"]]},{"id":"6da0af37c3ba3336","type":"mqtt-broker","name":"OLD MYC PI","broker":"192.168.1.6","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]

    Development

  • JSN SR04T - Temperature Influencing Readings
    S slt1

    @zboblamont Are you "ghost levels" not perhaps echoes bouncing around the tank and nothing in the tank to absorb the sound quickly. If so perhaps increasing time between pings might help to let the previous ping dissipate.

    Troubleshooting ultrasonic water level tank

  • JSN SR04T - Temperature Influencing Readings
    S slt1

    @zboblamont Yes - that spec sheet does say "1,10uS above the TTL pulse". That is not a great english translation !

    Chinglish translations sometimes might miss some important words - here is the spec translated by google from Chinese stating "above" 10us
    0_1568194916445_bf46382c-4d29-4aa4-8f76-8a8d54997c4a-image.png

    Also, there are various people reporting issues at using 10 though. Here is something mentioned in the NewPing lib issues queue : https://bitbucket.org/teckel12/arduino-new-ping/issues/41/jsn-sr04t-20-needs-to-have-longer-high

    Troubleshooting ultrasonic water level tank

  • JSN SR04T - Temperature Influencing Readings
    S slt1

    @Timbergetter Isee you are still on 10us delay. I've read somewhere that 10us delay specified for the JSN is too short and causes failed readings in the JSN and I if I recall 15 or 20 us makes it more reliable. @zboblamont already mentioned this, so perhaps you already tried to increase the delay ???

    Also, something else someone mentioned elsewhere was that metal casing caused some erratic readings on the JSN and grounding the case to the circuit's gnd helped.

    Troubleshooting ultrasonic water level tank

  • JSN SR04T - Temperature Influencing Readings
    S slt1

    @Timbergetter Can you can post the sketch you are using?

    Troubleshooting ultrasonic water level tank

  • JSN SR04T - Temperature Influencing Readings
    S slt1

    @zboblamont Oh - and its not really winter anymore here - only goes to last month in the screenshots previously shown. Not sure where you're from - but temp inside tanks here range from 0.69 C to 42.7 C - min / max for last year

    Here is the last years graph for interest sake !
    0_1567965188881_17cf745d-5509-4255-ad61-bb23307b1bbc-image.png

    Here is my first prototype version installed on the rain tank :
    0_1567965408509_7a82306a-1de1-4c0f-a8c7-6574d524e70c-image.png

    Troubleshooting ultrasonic water level tank

  • JSN SR04T - Temperature Influencing Readings
    S slt1

    @zboblamont I bought this one https://www.hobbytronics.co.za/p/1119/waterproof-ultrasonic-distance-transducer

    Looks like its supposed to be the 5V version from those specs.

    Troubleshooting ultrasonic water level tank

  • JSN SR04T - Temperature Influencing Readings
    S slt1

    @Timbergetter I also tried the JSN SR04T sensor and had problems with it. Ended up using the cheap HC-SR04 sensors on my tanks. Have 3 different tank sensors - borehole water tank up the hill, rainwater tank at house and another reverse osmosis filtered water tank. All three going for just over a year now.

    Condensation issues / waterproof I resolved by quickly spraying some clear laq spray paint over the sensors. On one tank I also added little standoffs so the sensor is not sealed onto the lid of the tank but rather 5 to 10mm above the lid to let the ambient air pass over and prevent high humidity inside the tank condensing on the sensor.

    And then for the code ... I added LM35 temperature sensor and added temp compsensation. Also I do a few readings and average them out.

    All-in-all I now get only one or two weird readings on rare occasions - could be a spider !

    Here is the last day data of the tank I have up the hill. Its showing pump cycles as well to keep tank topped up - its a weak borehole so i can only pump a little at a time. I have a separate node with relay to turn on/off pump as well as float switch down the hole to detect low water levels in the borehole.
    0_1567957821311_be53bcf2-96d5-4603-bebb-ed51a03fb21f-image.png

    Here is a one week graph of the same tank : temp and distance only shown
    0_1567958626075_10aafdfb-e0c4-42f6-a11c-e66a6fef65d5-image.png

    Here is one month data
    0_1567958960370_e302c9b1-2df4-49a2-a5ca-605f5e5b127b-image.png

    We are just coming out of winter here (in South Africa!) - so temp swings of the air inside the tanks are quite radical between day and night (except the last 2 days its been getting rather warm here !)

    Basically - just wanted to let you know/see that the cheap HC-SR04 sensors can do the job - and no more hiking up hills to check tank levels - and also the pumping can be automated too by the controller

    Troubleshooting ultrasonic water level tank

  • 💬 Relay
    S slt1

    @mfalkvidd Thanks - and yes - I did make the assumption that send with ack = true means do a hardware ack. I was unaware that a "software ack" also exists. I read your comment here : https://forum.mysensors.org/topic/3346/discussion-reliable-delivery/17 and what you mention there needs to be made loud and clear in the docs - perhaps some mention in both the message send function and message receive function,

    Announcements

  • 💬 Relay
    S slt1

    @mfalkvidd

    For some reason I am now unable to reproduce the issue on the standard RelayActuator.ino example. It was definitely sending ACK requests when I was testing a few days ago. I have subsequently updated MySensors library and also MyController to their latest Snapshot - so perhaps the issue comes up under one of those scenarios.

    The issue around this though is that the example does not report the current status of the relay in the loop. My own sketch was doing so. I guess many people take an example and modify it like I do. Therefore copying the example and adding in the code to send the current relay status periodically means the receive function will not work properly due to the Ack messages received,

    I would then suggest adding a note to the receive function of the relay example sketch to say that "if your node sends messages then you need to check for Ack and discard those messages" - or something along those lines. This will help !

    Announcements

  • 💬 Relay
    S slt1

    There is a problem with the example code for RelayActuator.ino It is not checking for ACK messages. See the other example called SecureActuator.ino that does this. Without checking for ACK messages my relay gets an ON signal and turns on then immediately thereafter gets an ACK signal for V_STATUS command which is assumed in this example to be a control and the value is "0" so it turns off the relay.

    Announcements

  • MyController OTA problems
    S slt1

    @jkandasa Ok. I will try it out and let you know. Thanks for all the help. Its greatly appreciated.

    MyController.org

  • MyController OTA problems
    S slt1

    @jkandasa There are 2 problems I have moving to MQTT. Firstly MYSController only works on Ethernet and Serial. Secondly, in MyController.org I lose all my sensor data as it will create new nodes for each of the sensors it picks up on a new gateway.

    MyController.org

  • MyController OTA problems
    S slt1

    @jkandasa I only have an ESP8266 gateway working over ethernet. I do not have an MQTT or serial gateway. Should I rather be using one of those?

    MyController.org

  • MyController OTA problems
    S slt1

    @jkandasa Not sure why the "Upload file" for the forum is not working ! Sent via email !

    MyController.org

  • MyController OTA problems
    S slt1

    @jkandasa Sorry - i misread ... I do have the inbuilt MQTT disabled in MyController already

    MyController.org

  • MyController OTA problems
    S slt1

    @jkandasa mycontroller.log file

    I am not using MQTT for MySensors. I just installed it to try out at some stage. I am using ethernet connection for MySensors from MyController.

    MyController.org

  • MyController OTA problems
    S slt1

    @jkandasa Hi. Its not too much inconvenience :) It would just be nice to get this working as MyController seems to work rather well for me otherwise.

    I am using Version 0.0.3.Final-SNAPSHOT of MyController.org

    The CHIP i installed Oracle JDK and then set it up to start on reboot by reading through this http://forum.mycontroller.org/topic/122/launch-start-sh-on-startup-or-like-a-service/2.

    I also have mosquitto, node and node-red setup on the CHIP.

    MyController.org

  • MyController OTA problems
    S slt1

    Hi

    I am having various issues with MyController and OTA updates.

    1. If I compare MYSController OTA vs MyController.org OTA, the MYSController takes about 10% of the time to do an update. I am running MyController.org on a C.H.I.P, so is it possible that its not fast enough to keep up with the Firmware Requests.

    2. Sometimes when the OTA fails for whatever reason like I manually power down the node being updated or battery runs flat or perhaps RF connection is lost, then MyController seems to crash my ESP8266 Ethernet Gateway. Trying to reconnect i get "Connection Refused". I manually power down gateway and even router and still can't connect to the gateway anymore. Then I notice MyController crashed and needs to be started again. Eventually everything starts working again.

    3. If my C.H.I.P is unexpectedly powered down or no.2 above occurs then the database gets corrupt and I need to delete the database files in /conf and launch MyController, then do a restore, then wait a bit, then start up mycontroller again. With No.2 above seeming to happen quite often in trying out OTA, this means my DB is getting corrupt fairly often.

    4. There seems to be no way to remove Firmware from a Node once its assigned. If I continue to experience issues with MyController.org's OTA then I would like to remove the firmware assigned to the node and rather use MySController's firmware update for now. Is it possible to add an option to select "No Firmware"

    Thanks for the assistance

    MyController.org

  • MYSBootloader 1.3.0-beta.3
    S slt1

    @gohan The regulator is an AMS1117 on the one I got here. I will try them again as they are useful for prototyping. It was working fine for a regular sensor sending updates, but got into the issues when using OTA and trying to get some decent speed of updates going. I also thought perhaps it was a dud unit - so i tried a few others and all gave same results. So perhaps a bigger capacitor will do the trick.

    Development
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular