Page 1 of 1
HowTo refresh a virtual device?
Posted: 23 Sep 2016 13:26
by pz1
ref:
FAQ
I do have a problem with my Wunderground App (
github) I moved some of the metrics to a newly created vDev for the wind direction
direction. However the metrics that I did move out, still show up in the JSON that I get from the device.
The image below show that "moved" metrics still showing up in the
configjson file in folder stage
- vDevClean.PNG (15.39 KiB) Viewed 6809 times
What can I do to resfresh these devices? The data marked in yellow is expired data. Even system reboot did not clean this up
Note: The device is found under the
vdevInfo-branch
Re: HowTo refresh a virtual device?
Posted: 23 Sep 2016 14:36
by gsaw
pz1 wrote:I do have a problem with my Wunderground App (
github) I moved some of the metrics to a newly created vDev for the wind direction
direction. However the metrics that I did move out, still show up in the JSON that I get from the device.
The image below show that "moved" metrics still showing up in the
configjson file in folder stage
vDevClean.PNG
What can I do to resfresh these devices? The data marked in yellow is expired data. Even system reboot did not clean this up
I guess you should to stop server, remove metrics manually from configjson and start server again. I had to do this, as i reworked OpenWheather for me for multiple devices. But i removed from config whole old device entry, created new module, then changed id of newly created device to old one in configjson.
Re: HowTo refresh a virtual device?
Posted: 24 Sep 2016 12:01
by pz1
gsaw wrote:I guess you should to stop server, remove metrics manually from configjson and start server again.
Thanks, I did just that, and it worked! Last time I edited this configjson 1-2 years ago it ended up in a big mess. Hence my question to the forum Apparantly the system and me have become more robust
Side note: I do use Notepad++ as an editor. It does have a nice graphical tree browser on json, as can be seen in the first post
Re: HowTo refresh a virtual device?
Posted: 24 Sep 2016 12:53
by gsaw
pz1 wrote:
Side note: I do use Notepad++ as an editor. It does have a nice graphical tree browser on json, as can be seen in the first post
I installed a json pretty printing tool directly on my banana pi. It makes json file readable like on your screenshot. Then i can edit file using nano from my tablet, just i have to disable syntax highlighting in nano (alt-m) because configjson is to big for that.
Code: Select all
georg@bananapi:~$ cat /opt/z-way-server/automation/storage/configjson-06b2d3b23dce96e1619d2b53d6c947ec.json | json_pp
{
"profiles" : [
{
"interval" : 2000,
"hide_single_device_events" : [],
"rooms" : [
0
],
"expert_view" : true,
"name" : "Administrator",
"password" : "admin",
"lang" : "en",
"dashboard" : [
"ZWayVDev_zway_6-1-37",
"ZWayVDev_zway_6-2-37",
"LightScene_10",
"LightScene_11",
"LightScene_12",
"ZWayVDev_zway_8-0-37",
"ZWayVDev_zway_10-1-38",
"ZWayVDev_zway_9-1-38",
"ZWayVDev_zway_5-0-49-3",
"LightScene_28",
"ZWayVDev_zway_22-2-37",
"ZWayVDev_zway_22-1-37",
"Code_Device_sensorBinary_43",
"Code_Device_sensorMultilevel_43",
"Code_Device_sensorMultilevel_46"
],
"hide_all_device_events" : false,
"color" : "#dddddd",
Re: HowTo refresh a virtual device?
Posted: 24 Sep 2016 17:57
by pz1
gsaw wrote:I installed a json pretty printing tool directly on my banana pi.
Thanks for sharing. Do you have a reference? May be of interest to others
Re: HowTo refresh a virtual device?
Posted: 25 Sep 2016 13:15
by gsaw
pz1 wrote:gsaw wrote:I installed a json pretty printing tool directly on my banana pi.
Thanks for sharing. Do you have a reference? May be of interest to others
Oh, sorry, i dont know anymore, from which debian package exactly the script is. I just regulary installed several debian packages for json. There is one which is purposed for pretty printing.
Code: Select all
georg@bananapi:~$ apt-cache search json | grep pretty
aeson-pretty - JSON pretty-printing tool
libghc-aeson-pretty-dev - JSON pretty-printing library
libghc-aeson-pretty-doc - JSON pretty-printing library; documentation
libghc-aeson-pretty-prof - JSON pretty-printing library; profiling libraries
try to install it with