(2019-09-23, 07:45 PM)glowntiger Wrote: If I make all config edits for the 1-wire ds2482 in the MCS-App, is it possible that your 1-wire app Handle the Sensor too?
Or should I make an own 1-wire handle in the MCS app?
The code after config
Code:import os
x= os.listdir("/sys/bus/w1/devices")
x.remove ("w1_bus_master1")
sensor_data=""
for i in x:
foo = open("/sys/bus/w1/devices/"+ i +"/w1_slave","r")
data = foo.read ()
foo.close()
spos=data.find("t=")
tempx=(data[spos+2:-1])
temp = int(tempx)/1000
sensor_data +=i + ";" + str(temp) +","
sensor_data=sensor_data.split(",")
for i in sensor_data:
print (i)
You need to handle the sensors readings from your app. The idea is that all apps are independent from others and openplotter-settings is the only requirement.
To do this you have to use the openplotterMyappRead.py file where you will found an example to send data to Signal K. This file have to be ran as a service at startup (see setup.py and myappPostInstall.py to see how to implement the service)