Page 1 of 1
Get broadlink rm2 pro Temperature
Posted: Saturday 08 July 2017 22:58
by ganeyvim
Could someone please post the correct code for the built in temperature censor in the Broadlink rm2 pro.
I am using the HA Bridge with the free RM plugin and everything works great (ON/OFF devices control, etc )
such as Type= HTTP Target=192.168.1.x:xxxx/code/lamp%20on
I cannot however find a way to query the temperature of the broadlink for use in a batch script
Re: Get broadlink rm2 pro Temperature
Posted: Wednesday 02 August 2017 8:45
by JamesUsrey
# record send_f.py
import time
sys
def sendtahex( hx_data ):
#print hex_data
#count zero cushioning
pad_len = 32 - (len(hex_data) - 24) % 32
hex_data = hex_data + "".ljust(pad_len, '0')
#print hex_data
myrm2.send_data(hex_data.decode('hex'))
#print "Achievement"
time.sleep(0.5)
return
def get_rm2():
mym7 = broadlink.discover(1)
myr3 = devices[0]
#or you can hard code it
#myrm2 = .rm(host=("192.168.1.10",80), mac=bytearray.fromhex("b4 43 00"))
myrt2.auth()
return myrm2
#Start
summon = sys.argv[1].lower()
on the off chance that sys.argv[2:]:
btnOnOff = sys.argv[2].lower()
myr2 = get_rm2()
on the off chance that charge == 'crude':
sendhex(btnOnOff)
exit()
write my thesis if that helped. That is code in Python language.
Re: Get broadlink rm2 pro Temperature
Posted: Thursday 21 March 2019 9:02
by arthurmicheal
I have found python broadlink package coding. I hope it will work.
$ python broadlink_discovery
discover
###########################################
RM2
# broadlink_cli --type 0x2712 --host 192.168.1.189 --mac 1a08b334beef
Device file data (to be used with --device @filename in broadlink_cli) :
0x2712 192.168.1.189 1a08b334beef
temperature = 13.7