Skip to content

Commit

Permalink
the node now can update the webinterface with the current main obj st…
Browse files Browse the repository at this point in the history
…atus
  • Loading branch information
marco committed Nov 19, 2016
1 parent c7abdf1 commit aeacbd2
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 1,886 deletions.
9 changes: 9 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,15 @@ versione4.53 iniziato ad usare pythonserial come libraria dopo test fatti con
Started using pyserial because works better on openwrt.


5.24 many serial interface problem solved..added delay after serial write to improve stability


5.25 working on lamp node (not finished),
started working on wplug..
wireless plug protocol almost done,I can control the devboard from webinterface..
the node now can update the webinterface with the current main obj status!



(110, 'Connection timed out');;;
main error in handle_new_query_to_remote_node_thread;;;
Expand Down
17 changes: 11 additions & 6 deletions scripts_folder/arduinoserial.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,23 @@ def read_data(self): # thread function
if( (cmd[6]=="s")&(cmd[7]=="y") )or((cmd[6]=="u")&(cmd[7]=="l")) :
# [S_001sy3.05ProminiS0001_#] or [S_123ul5.24WPlugAvx000810000_#]

if ((cmd[6]=="u")&(cmd[7]=="l")):
obj_number_to_update=0
obj_value=cmd[24]
#todo update the first node obj reading the name from hardwaremodel


print "serial rx cmd="+cmd
buf=""
try:
serial_number=cmd[12:24]
node_fw=cmd[8:12]
node_address=cmd[3:6]

if ((cmd[6]=="u")&(cmd[7]=="l")): #todo variable data extraction [S_123ul5.24WPlugAvx000810000_#]
obj_value=cmd[24]
obj_number_to_update="0"
priorityCmdQueue.put( {"cmd":"updateObjFromNode","nodeSn":serial_number,"nodeAddress":node_address,"nodeFw":node_fw,"objects_to_update":{obj_number_to_update:obj_value} })

#todo update the first node obj reading the name from hardwaremodel




if node_address=="254": #the node is looking for a free address
priorityCmdQueue.put( {"cmd":"sendNewAddressToNode","nodeSn":serial_number,"nodeAddress":node_address,"nodeFw":node_fw})

Expand Down
Binary file modified scripts_folder/arduinoserial.pyc
Binary file not shown.

0 comments on commit aeacbd2

Please sign in to comment.