-
thanks, that should solve the problem, which brings me to the next question, i rarely am able to program the puck through the espruino hub, i generally resort to the direct connection.... how can this be solved please
When i go to the espruino hub, i can mot of the time locate the puck when i try to connect i get "connection failed"
-
-
-
lucky you you get this fast response. I really wish
when clicking on timestamp the light turns on instantaneous
i uploaded your code. tried it and was kinda quick. but then after restarting the machine it got slow like before. i am unable to turn off the red led from my flow,
after doing the mosquito command, i get this,
it seems to be skipping button counts if a press on button say 5 times i.e. one 1 press a second. see log. but if i press once and wait, it eventually prints it but after a while/ble/advertise/d8:19:e7:5b:3a:57/ffff [37]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [39]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [43]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [45]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [45]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [46]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [48]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [49]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [50]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [51]
/ble/advertise/d8:19:e7:5b:3a:57/ffff [52]my machine uptime is as follow, i am not running anything besides nodered
21:39:17 up 1:02, 2 users, load average: 0.21, 0.15, 0.10
-
-
NRF.setTxPower(4) did the trick :)
much better, some delays at times but way better.
although i want it to be better. like the flic button.
any suggestions please?the nordered flow i have is straightforward, i.e.
[{"id":"597ae332.73aaa4","type":"mqtt in","z":"99c290d2.1b2068","name":"","topic":"/ble/advertise/d8:19:e7:5b:3a:57/ffff","qos":"2","broker":"21fe8cb3.438fcc","x":160,"y":440,"wires":[["2b1d98d6.76c7b","d47b84a0.1d40e8"]]},{"id":"2b1d98d6.76c7b","type":"debug","z":"99c290d2.1b2068","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":410,"y":360,"wires":[]},{"id":"9efb6c2e.9426b","type":"hue-group","z":"99c290d2.1b2068","name":"Living Room","bridge":"fe3415a5.63152","groupid":"24","colornamer":true,"x":810,"y":500,"wires":[["1c68d506.5a4eb3"]]},{"id":"8a84c118.fdbae","type":"function","z":"99c290d2.1b2068","name":"On/Off","func":"var liv_light_bool = global.get(\"liv_light_bool\"); \nconst msg1 = {}\n\n \nif(!liv_light_bool){\n\n msg.payload={\n \t\"on\":[true],\n \t\"brightness\":[100],\n \t\"rgb\":[255,255,255],\n \t\"transitionTime\":[3],\n \t//\"colorloop\":[10],\n };\n \n}\n\nelse\n{\n msg.payload={\n \t\"on\":[false],\n \t\"brightness\":[0],\n };\n \n \n}\n\n\nmsg1.payload =\"digitalPulse(LED1, 1, 50);\";\n\nreturn [ msg, msg1];","outputs":2,"noerr":0,"x":530,"y":440,"wires":[["9efb6c2e.9426b"],["1660958b.f84e62","73e8e8a3.ba5848"]]},{"id":"1c68d506.5a4eb3","type":"function","z":"99c290d2.1b2068","name":"Set Global var","func":"global.set(\"liv_light_bool\",msg.payload.on); \nnode.status({fill:\"red\",shape:\"ring\",text:msg.payload.on});","outputs":1,"noerr":0,"x":1060,"y":500,"wires":[[]]},{"id":"1660958b.f84e62","type":"debug","z":"99c290d2.1b2068","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":670,"y":360,"wires":[]},{"id":"d47b84a0.1d40e8","type":"rbe","z":"99c290d2.1b2068","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":390,"y":440,"wires":[["8a84c118.fdbae"]]},{"id":"21fe8cb3.438fcc","type":"mqtt-broker","z":"","name":"Localhost","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"fe3415a5.63152","type":"hue-bridge","z":"","name":"Philips hue","bridge":"192.168.0.24","key":"vvB2GXGT15E6qEaaGTWzRwZVKoBXTcHYCnN25sGo","interval":"1500"}]
-
I am using the puck.js button to turn on my hue lights.
basically the button press is advertised and pickup by EspruinoHub then diverted through nodered to turn off the light. this unfortunately can take some time with delays around 8 secs.can this delay be improved, i understand the battery can take the hit but willing to try different scenarios.
any help please
thanks gordon, you are a god send.
appreciate your help. i am at the moment very comfortable with he button
I would like to know 1 last thing, which of the options above is best to save battery
Bluetooth.write("PRESS\r\n")
or
NRF.setAdvertising