dirandad / lightcamera-openipc

Install OpenIPC on Light Camera (Lutec, Steinel)
15 stars 1 forks source link

lightcam-application does not work #8

Closed Goo15 closed 1 year ago

Goo15 commented 1 year ago

The communication via MQTT does not work for me. When I start the lightcam application manually, I get the following message:

LightCam Module to control Light Extension Card, Status Led and configuration Error to open the file Loading config file /var/lib/lightcam ===================lightcam configuration======================= lightmode: 98 alarmmode: 98 pirsensibility: 25 luxsensibility: 23 highlightlevel: 19 ontemporisation: 98 lowlightlevel: 12 lowlightduration: 107

Opening YAML config file '/etc/lightcam.yml' ============Configuration============== config.mqtt.server='192.168.178.23' config.mqtt.port='1883' config.mqtt.username='tgoetz' config.mqtt.password='15101965' config.mqtt.topic='camera1' config.mqtt.detectortempo='6.000000e+01' config.serial.port='/dev/ttyAMA0' config.serial.baudrate='9600' ==========fin Configuration============ Activation GPIO1_4 (1e02 -> 120c0010)...done Activation GPIO1_6 (1d02 -> 120c0018)...done Activation GPIO1_7 (1502 -> 120c001c)...done Activation GPIO0_3 (1000 -> 100c000c)...done alarm gpio configuration...done Initialize tty...done light_update...done Setting mqtt client... NetworkInit NetworkConnect Cannot open socket and run NetworkConnect on Segmentation fault

EXIT CODE: 139

What am I doing wrong?

dirandad commented 1 year ago

Have you try to connect your mqtt broker using a mqtt client with the same identification ? Have you also set osmem to 34MB in uboot env variable ? You could have a memory issue. fw_setenv osmem 34MB

dirandad commented 1 year ago

By reading the other issue, I understand that you have set the IP of the camera on MQTT Server. This is wrong. You have to install a MQTT broker (like mosquitto) on another machine (docker, windows service,...). This broker is mandatory to act with the camera from for example Home Assistant or any other domotic box that can be used as MQTT client.

Goo15 commented 1 year ago

Hello Adrien, Thank you for your descriptions. I didn't really understand the MQTT principle at first, so it didn't work. I have now installed the MQTT Broker in Homeassistent and the lamp can be controlled perfectly. Everything is now working as expected. Thanks again for your help and the great work you did on this project.

dirandad commented 1 year ago

Your are welcome.