Skip to content
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

Some questions: chip temperature, device list, firmware lock, bluetooth messages #277

Closed
hubaksis opened this issue Mar 22, 2021 · 6 comments
Labels
question Further information is requested

Comments

@hubaksis
Copy link

Hi there,

Firstly, thank you for the amazing job you've done!

I am trying to implement the same for OpenHab. As for now this is just to support some (around 20) devices that I've got.

Almost everything is based on your code. While working on it - I noticed a couple of things that I would like to clarify if possible:

  1. Chip temperature (message '8.0.2006').
    For my door sensor (MCCGQ01LM) values are usually in the range from 70 to 80.
    For my motion sensor with illuminance (RTCGQ11LM) chip temp is 30-40.
    Any idea if these values mean anything or what is the scale/divider/unit of measurement?

  2. Get device list from the gateway.
    This can be done if you send a command 'get_device_list' (or get_device_prop) to the gateway according to this issue. Is there any reason why you are not using it? Sorry if I missed it, I think I saw receiving device list from the server only.
    I am using this command to get all devices' models.

  3. Can you explain in a nutshell how firmware lock works?
    Is it just setting an attribute for the firmware files with a command over telnet
    (md5sum /data/busybox | grep 099137899ece96f311ac5ab554ea6fec) && /data/busybox chattr +i /data/firmware.bin
    (md5sum /data/busybox | grep 099137899ece96f311ac5ab554ea6fec) && /data/busybox chattr +i /data/firmware_ota.bin

  4. My gateway firmware is 1.4.6_0043 with removed telnet password
    On power on I send a command to enable telnet, then I use the following telnet commands to enable remote MQTT access:

mosquitto -d
killall zigbee_gw
exit

I can see messages in zigbee/send topic, but nothing for bluetooth Xiaomi Mi thermometer (lywsd03mmc).
I didn't turn off the cloud connection.
Can you advise on how to enable bluetooth messages or where I can get them?

Thank you.

@hubaksis hubaksis changed the title Some questions: chip temperature, device list, firmware lock Some questions: chip temperature, device list, firmware lock, bluetooth messages Mar 22, 2021
@hubaksis
Copy link
Author

hubaksis commented Mar 22, 2021

After some digging I can answer to my question 4.

The code is in gateway3.py and shell.py.
To fix BT, the shell replaces file /data/silabs_ncp_bt from http://master.dl.sourceforge.net/project/mgl03/ depending on firmware version. Check for an updated version is done by comparing md5.
Then executes

killall silabs_ncp_bt; pkill -f log/ble;  
/data/silabs_ncp_bt /dev/ttyS1 1 2>&1 >/dev/null | 
mosquitto_pub -t log/ble -l &

Is everything correct?

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 22, 2021

  1. Don't know. Don't show this data in Home Assistant
  2. I get not only a list of devices, but also their sensor values.
  3. Check wiki - Immutable. Gateway can't download new firmware version
  4. Bluetooth messages don't send to mqtt by default. Check this

@AlexxIT AlexxIT added the question Further information is requested label Mar 22, 2021
@hubaksis
Copy link
Author

Thank you!
All clear now.

@bubez81
Copy link

bubez81 commented Mar 9, 2022

hello, it's possible to reactivate Bluetooth mqtt topics?

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 10, 2022

@bubez81 check this project https://github.com/AlexxIT/gw3

@bubez81
Copy link

bubez81 commented Mar 10, 2022

yes thank you checked!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants