Runner-42 / HomeDomotica

HomeDomitica system based on Raspberry Pi
0 stars 0 forks source link

Standardize config files to JSON format #18

Open Runner-42 opened 2 years ago

Runner-42 commented 2 years ago

Current format (per raspberry pi and process)

=(board#, pin#);; where depends on the type of process: => Input button process: action represents Rabbit queue name => output process (light, relay,...): list of action for each input event received, comma separated in case multiple events should be processed **Expected format** [ { "Process" : "rpi_inputbutton_tst1", "Host" : "DomoticaPiTst1" [ { "Type": "Button", "BoardNumber": "0", "PinNumber": "0", "Description": "Button 0 on Test Pi", "Action": "Send Event", "ConsumerQueue": "IQ_RPI_OUTPUTLIGHTS_TST1" }, { "Type": "Button", "BoardNumber": "0", "PinNumber": "1", "Description": "Button 1 on Test Pi", "Action": "Send Event", "ConsumerQueue": "IQ_RPI_OUTPUTLIGHTS_TST1" } ] { "Process" : "rpi_outputlights_tst1", "Host" : "DomoticaPiTst1" [ { "Type": "Light", "BoardNumber": "0", "PinNumber": "0", "Description": "Output 0 on Test Pi", [ { "Action": "Toggle", "Event": "RPI_INPUTBUTTON_TST1_0_0_PRESSED" }, { "Action": "Toggle", "Event": "RPI_INPUTBUTTON_TST1_0_1_PRESSED" } ] }, { "Type": "Relais", "BoardNumber": "0", "PinNumber": "0", "Description": "Relais 0 on Test Pi", "Action": "PULSE", "Event": "RPI_INPUTBUTTON_TST1_0_0_PRESSED" } ] } ] Goal is to use a single config file on all raspberry Pi's and all processes