I've hit another wall.
Edited to make more sense:
I'm trying to use persistent variables in teh webserver plugin.
I got 2 python scripts. One where I receive a temperature and put it in eg.globals.temperature.
And another one where I do the same but with luminance and put it in eg.globals.luminance.
I then broadcasts these.
Code: Select all
mytemperature = eg.event.payload
eg.globals.temperature = mytemperature [3]
eg.plugins.Webserver.SetPersistentValue(u'ptemperature', u'{eg.globals.temperature}', False, False)
eg.plugins.BroadcastListener.Broadcast(u'!!!tem{eg.globals.temperature}///', u'', 33333)Code: Select all
myluminance = eg.event.payload
eg.globals.luminance = myluminance [3]
eg.plugins.BroadcastListener.Broadcast(u'!!!lum{eg.globals.luminance}///', u'', 33333)
eg.plugins.Webserver.SetPersistentValue(u'pluminance', u'{eg.globals.luminance}', False, False)Code: Select all
eg.plugins.Webserver.GetPersistentValue(u'pluminance', True)
eg.globals.luminance = eg.result
eg.plugins.BroadcastListener.Broadcast(u'!!!lum{eg.globals.luminance}///', u'', 33333)Code: Select all
eg.plugins.Webserver.GetPersistentValue(u'ptemperature', False)
eg.globals.temperature = eg.result
eg.plugins.BroadcastListener.Broadcast(u'!!!temp{eg.globals.temperature}///', u'', 33333)But it does not do this, it just returns a none.
Maybe GetPersistentValue is not an action? If not, how do I print/use/broadcast the value of my Persistent value?
Cheers
