urreagustavo / bme60-688-node

This is a node developed with CubeCell HTCC AB01 and BME680 or BME688 sensor
1 stars 0 forks source link

how I got here #1

Open abate opened 8 months ago

abate commented 8 months ago

I was looking at the dryad https://www.dryad.net/wildfiresensor sensors, and after a bit of research I got myself a bme680 and a cubecell ... I guess we had the same idea. I still didn't have the time to play with this, but I'm looking forward to try you code !

great minds think alike :P

urreagustavo commented 8 months ago

That's great! Let me know if it works good for you too. If you have any doubt don't hesitate to ask.

gatismu commented 5 months ago

Hello, do you have TTN payload formater for this repo? Thanks!

urreagustavo commented 5 months ago

Yes, I just put it. Check please

gatismu commented 5 months ago

Yes, I just put it. Check please

I think there is no Smoke status data, am I right? Thanks! *edit, pardon, it is Spanish here, all good, will try to find now why I still have 0V for battery.. [Payload batv 0 hum_rel43 humo 0 temp 25] and last one, if I may ask, how it select how often to send sensor data to TTN, I have set as 10min (appTxDutyCycle = 600000) but it does maybe 2.. 5 times per day only.

urreagustavo commented 5 months ago

Smoke is a flag, it is 1 if there is smoke, or 0 if it is not smoke. I realized experimentaly that the sensor identifies smoke when the gas resistence is higher than 10 k, it is in line 142 in arduino code. But, it is in my case, maybe in your case could be different. You should measure it, and it could be done in Moniror Serial in Arduino. Sorry for the words in spanish, i have to upgrade the code, but this code is enought to work. I do not know why you are reading 0 V. I am using the code of an example that is in arduino which works with Cubecell htcc AB01, try it saparete and then put it together. The time when the message is sent, it is found as you said, in appTxDutyCycle and 600000 is correct. However, TTN has a limit for messages per day. You should check it in TTN, maybe with an other device you are taking the space. This link may help you https://www.thethingsnetwork.org/forum/t/fair-use-policy-explained/1300

gatismu commented 5 months ago

Thanks for replay! I have other sensor with Lilygo board - https://github.com/gatismu/TTN-BME280_TTGO_LoRa32-V2.1_1.6-Version-ESP32-LoRa-OLED/blob/main/ttn_sensor.ino and it send sensor data even each reset- almost instantly. Smoke it not priority, I just had one BME680 availabe and I just used it, in any case it can not be used as smoke detector by any mean with such intervals of reading ;) Here is example from my HA, thechnically HA update value only it is changes, but in TTN console I see same intervals. But with my other project it keeps cycling each 15min (in repo code I think I have diff. value). image I am not expert in code, what I can do is just use exsisting code and fine tune to my needs. with ESPhome I feel more " understanding" syntax is easier :) Thanks for repo, I will check that bat voltage later. fyi, I have this board - https://www.aliexpress.com/item/1005005444339915.html?spm=a2g0o.order_list.order_list_main.55.357e1802viJIVy HTCC-AB01 (V2))

urreagustavo commented 5 months ago

At the moment I have not work with Liligo so I am not able to guide you with this. However, Htcc AB01 is easy to understand. I made this video sometime ago, I explain how to connect the Cubecell Htcc AB01 to TTN, it is in spanish but I think it could be helpful for you because I show step by step the process: https://www.youtube.com/watch?v=2T1MzXbfqCE&t=687s In minute 7:18 I show how to copy a link that you need to install the Cubecell Board in Arduino In minute 18:52 I show where you have to modify the data you want to send. The rest of the video I explain first how to configure the TTN and then the cubecell but in ABP. It is easier when you use OTAA and you can find more information in the network. If you have connected cubecell ADC pin to the sensor, the battery code does not work, you have to let it free and then the cubecell can read the battery. After you install the cubecell board you can see the examples and search the libraries for the sensors you need. Then you can work with all. I recommend to you, first try the code independently and then integrate it in the code.