-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
output in json format #41
Comments
Hi G0sch Do you use a influxdb? I use the data in NodeRED as well. However every script writes it directly to influx DB and then Node RED fetches the results. |
Thank you for your fast reply. I will check the callback option |
Hi @G0sch |
Hi @G0sch |
cool - thank you. will test it. you wrote you will create an node-red node... is it still on the roadmap? |
I've created a flow (MiTemperature2 Node-Red Flows.txt) with which you can also use the script. The flow / possibilities with this solution is quite complex, there are so many possibilities. Would be hart to pack that into a single node while keeping it clear. Just tell me after testing/trying out if you still see many advantages in an own node. Then I would take your input into the Node design. However it could take a while, because currently I have so many other fascinating projects. |
yes will test it in the next days! thx |
Hi @G0sch, Hope the provided solution satisfies your requirements. I've also taken just a brief look into doing with creating a native Node-RED Node. It would be possible, however it has a major disadvantage: The noble library doesn't support passive scanning right now, see abandonware/noble#151 When you start the script in ATC mode you can see that scanning is passive via hcidump
|
Hi @JsBergbau first: thank you for the great support and effort :-) What I do to simplify it for my need:
here the options: LYWSD03MMC.py --unreachable-count 5 -c 1 -r -deb -b --device I also understand the point with noble - so I still think the smartes way is to get json output directly from your script... :-) |
True. The sample flow is for ATC version where you can have multiple receivers and then this complexity makes sense. For your solution connecting to a single sensor it doesn't need that complexity. Changing the script to json output is not that simple, because for example the callback sending thread may also print to stdout. It would be a lot of effort to really make it print only valid json and needs a lot of tests to ensure that for every case. So I wouldn't it consider the smartes way. |
finally the workflow will monitor 6 sensors/rooms - may be I will tune the flow a bit for this. |
As you wrote you take the temperature to control heater: Another problem: If battery of one device gets empty it can stop whole raspberry pi from receiving other sensors. I don't know what exactly happens. I had this situation a few times and then at least one battery is empty. You see that because sensor reboots while connecting. Connecting needs a lot of power, battery voltage drops a lot --> reboot. |
I'm testing the ATC firmware an two sensors for now - with 1 or 5 min interval. Thx for the battery empty hint - will implement an alerting to prevent it! |
Hi,
I like the script very much, but is it a big deal to get the output in json format?
(e.g using it in Node Red flow)
thx
G0sch
The text was updated successfully, but these errors were encountered: