Skip to content
Snippets Groups Projects
Commit 7beb5d25 authored by lucien senaneuch's avatar lucien senaneuch Committed by GATEAU Thibault
Browse files

[eventBus] add bus message

parent c34e6606
No related branches found
No related tags found
No related merge requests found
import paho.mqtt.client as mqtt
client = mqtt.Client()
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
client.subscribe("#")
# The callback for when a PUBLISH message is received from the server.
def on_message(client, userdata, msg):
print(msg.topic+" "+str(msg.payload))
client = mqtt.Client()
client.on_connect = on_connect
client.on_message = on_message
client.connect("localhost",1884, 60)
client.loop_forever()
\ No newline at end of file
from nanospace import Nanospace
usr = 'usrName'
usr = 'usr'
pw = 'usrPw'
srvAddr = 'http://yourSrv.fr/'
srvAddr = 'http://localhost:8888/'
nanospace = Nanospace(srvAddr, usr, pw)
print(nanospace.get_string_value(83))
nanospace.update__string_value(83, 'test', '1Kg5')
print(nanospace.get_formula_value(84))
print(nanospace.update__formula_value(84, 'multiplication','5*20'))
\ No newline at end of file
nanospace.update__formula_value(84, 'multiplication','5*20')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment