nymea / nymea-plugin-unipi

nymea plugin for UniPi and Neuron devices (deprecated, plug-in has moved to nymea-plugin-modbus)
1 stars 0 forks source link

Connection Issues #23

Open andyjshepherd opened 4 years ago

andyjshepherd commented 4 years ago

Hello!

I’ve just got my Unipi running with Nymea and I can see the gateway and the inputs and outputs etc

A few things. Firstly most important. Each time I change a state of a digital output it then closes the connection. I can’t seem to get to the bottom of this.

It turns the output on but then it closes the connection. Once it reconnects it the digital output also turns off but the core thinks its turned on.

Secondly. There is no option for analogue in. It just says this thing cannot be found

Thirdly. There is only 6 digital outputs. But there is 8 on the board.

I’ve tried using a raspberry pi 3 and rpi 4

andyjshepherd commented 4 years ago

Info From Log

Aug 14 20:05:54 localhost nymead[2178]: stack smashing detected : terminated Aug 14 20:05:54 localhost nymea-networkmanager[347]: I | NymeaService: Service unregistered "io.guh.nymead" Aug 14 20:05:54 localhost nymea-networkmanager[347]: #033[33m W | NymeaService: Service is not available any more.#033[0m Aug 14 20:05:54 localhost systemd[1]: nymead.service: Main process exited, code=killed, status=6/ABRT Aug 14 20:05:54 localhost systemd[1]: nymead.service: Failed with result 'signal'. Aug 14 20:05:55 localhost systemd[1]: nymead.service: Service RestartSec=100ms expired, scheduling restart. Aug 14 20:05:55 localhost systemd[1]: nymead.service: Scheduled restart job, restart counter is at 5. Aug 14 20:05:55 localhost systemd[1]: Stopped nymead - IoT server. Aug 14 20:05:55 localhost systemd[1]: Started nymead - IoT server. Aug 14 20:05:55 localhost nymead[2546]: Translations: Could not find nymead translations for "en_GB" Aug 14 20:05:55 localhost nymead[2546]: "/usr/translations" Aug 14 20:05:55 localhost nymead[2546]: "/usr/share/nymea/translations" Aug 14 20:05:55 localhost nymead[2546]: I | Application: ===================================== Aug 14 20:05:55 localhost nymead[2546]: I | Application: nymead 0.22.0+202007141126~buster+rpi1 started as root. Aug 14 20:05:55 localhost nymead[2546]: I | Application: ===================================== Aug 14 20:05:55 localhost nymea-networkmanager[347]: I | NymeaService: Service registered "io.guh.nymead" Aug 14 20:05:55 localhost dbus-daemon[278]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service' requested by ':1.54' (uid=0 pid=2546 comm="/usr/bin/nymead -n ") Aug 14 20:05:55 localhost systemd[1]: Starting Time & Date Service... Aug 14 20:05:56 localhost dbus-daemon[278]: [system] Successfully activated service 'org.freedesktop.timedate1' Aug 14 20:05:56 localhost systemd[1]: Started Time & Date Service. Aug 14 20:05:56 localhost nymead[2546]: #033[33m W | default: QFSFileEngine::open: No file name specified#033[0m Aug 14 20:05:56 localhost nymead[2546]: #033[33m W | ServerManager: Could not open "" : "No file name specified"#033[0m Aug 14 20:05:56 localhost nymead[2546]: #033[33m W | ServerManager: Using fallback self-signed SSL certificate: "/var/lib/nymea/certs/nymead-certificate.crt"#033[0m Aug 14 20:05:56 localhost dbus-daemon[278]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.54' (uid=0 pid=2546 comm="/usr/bin/nymead -n ") Aug 14 20:05:56 localhost systemd[1]: Condition check resulted in Bluetooth service being skipped. Aug 14 20:06:21 localhost dbus-daemon[278]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.54' (uid=0 pid=2546 comm="/usr/bin/nymead -n ") Aug 14 20:06:21 localhost systemd[1]: Condition check resulted in Bluetooth service being skipped. Aug 14 20:06:26 localhost systemd[1]: systemd-timedated.service: Succeeded. Aug 14 20:06:46 localhost nymea-networkmanager[347]: I | NymeaService: Service is now available. Aug 14 20:06:46 localhost nymea-networkmanager[347]: I | NymeaService: Request nymea to enable bluetooth resources Aug 14 20:06:46 localhost nymead[2546]: #033[33m W | default: Cannot find a running Bluez. Please check the Bluez installation.#033[0m Aug 14 20:06:46 localhost dbus-daemon[278]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.54' (uid=0 pid=2546 comm="/usr/bin/nymead -n ") Aug 14 20:06:46 localhost systemd[1]: Condition check resulted in Bluetooth service being skipped. Aug 14 20:07:11 localhost nymea-networkmanager[347]: #033[33m W | NymeaService: Could not enable/disable bluetooth on dbus: "org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."#033[0m Aug 14 20:07:11 localhost nymead[2546]: #033[33m W | Bluetooth: No bluetooth adapter found. Resource not available.#033[0m Aug 14 20:07:12 localhost nymead[2546]: #033[33m W | ThingManager: Libnymea API mismatch for "/usr/lib/arm-linux-gnueabihf/nymea/plugins/libnymea_integrationplugingenericinterfaces.so". Core API: 6.0.0, Plugin API: "5.0.0"#033[0m Aug 14 20:07:12 localhost dbus-daemon[278]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.54' (uid=0 pid=2546 comm="/usr/bin/nymead -n ") Aug 14 20:07:12 localhost systemd[1]: Condition check resulted in Bluetooth service being skipped. Aug 14 20:07:37 localhost nymead[2546]: #033[33m W | Bluez: Invalid DBus ObjectManager interface.#033[0m Aug 14 20:07:37 localhost nymead[2546]: #033[33m W | Nuki: Bluetooth not available#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | Hardware: ERROR: could not enable PWM 18#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | Hardware: ERROR: could not read "/sys/class/pwm/pwmchip18/pwm0/enable"#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | Hardware: ERROR: could not open "/sys/class/pwm/pwmchip18/pwm0/polarity"#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | Hardware: ERROR: could not open "/sys/class/pwm/pwmchip18/pwm0/duty_cycle"#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | Hardware: ERROR: could not open "/sys/class/pwm/pwmchip18/pwm0/period"#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | Hardware: ERROR: could not open "/sys/class/pwm/pwmchip18/pwm0/period"#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | Hardware: ERROR: could not open "/sys/class/pwm/pwmchip18/pwm0/duty_cycle"#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | RuleEngine: Could not load the value type of the state evaluator. The value type will be guessed by QVariant QVariant(Invalid)#033[0m Aug 14 20:07:38 localhost nymead[2546]: #033[33m W | Bluetooth: Bluetooth hardware not available. Cannot enable Hardware resource#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "unifi" ( "88bc00c7-9ea8-4aa6-8aec-831639e8fccc" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "flowerCare" ( "74e2106a-3407-4e89-a27a-1c890d78bee7" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "AirQualityIndex" ( "57d69b76-4d2d-41ec-bef6-949a79ffbe6b" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "MailNotification" ( "1ae35df1-1b51-4c93-94fa-3febc77e0318" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Bose" ( "472a3f24-b05c-49b3-ad9a-dfda608b6760" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "WakeOnLan" ( "b5a87848-de56-451e-84a6-edd26ad4958f" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Elgato" ( "c5c03ad4-bfdb-444a-8eca-2c234c46cc27" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "TexasInstruments" ( "ae550a91-e734-4331-9d71-9f37df0b0fa6" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Nuki" ( "e5806d75-a40e-4766-a272-5a3a8d3ed625" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Nanoleaf" ( "360867ec-1594-498d-8182-fbab1fe17489" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "LgSmartTv" ( "4ef7a68b-9da0-4c62-b9ac-f478dc6f9f52" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "doorBird" ( "6fe1614a-fc47-4eb2-a47c-13c50f1798ee" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Wemo" ( "2e3b5ce0-ecf1-43de-98f0-07df4068a583" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "tplink" ( "024ff2e3-30df-44a1-9c8d-63cc416f1fb8" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "daylightSensor" ( "4b7d63a7-fc39-4a50-a459-457fa7653089" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "UniPi" ( "26cba644-35ae-40a6-9c48-924198893a5f" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "PhilipsHue" ( "5f2e634b-b7f3-48ee-976a-b5ae22aa5c55" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "KebaKeContact" ( "9142b09f-30a9-43d0-9ede-2f8debe075ac" )#033[0m Aug 14 20:07:39 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "OpenUv" ( "9b7d9cc8-77df-4197-a6fc-8a365747a3b1" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "shelly" ( "6162773b-0435-408c-a4f8-7860d38031a9" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Kodi" ( "e7186890-99fa-4c5b-8247-09c6d450d490" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "EQ3" ( "f324c43c-9680-48d8-852a-93b2227139b9" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Tado" ( "b4f2d2ee-50bb-4786-b7f5-261fed204fa5" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Netatmo" ( "69d14951-0c02-4877-bcef-dffdf48b7ccb" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "anelElektronik" ( "7a3e5b64-20e4-42bd-b86b-989b84afc22a" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "awattar" ( "9c261c33-d44e-461e-8ec1-68803cb73f12" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "DateTime" ( "c26014c6-87fb-4233-85ed-01d18625018d" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "OpenWeatherMap" ( "bc6af567-2338-41d5-aac1-462dec6e4783" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Sonos" ( "cdb07719-c445-4fa5-9c7a-564ee02a4412" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "solarlog" ( "606adc5a-c9a5-45fa-9652-ea385dcb0b81" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Denon" ( "cd758269-dbbb-4ef0-80ab-48bd9a8a2765" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Pushbullet" ( "46986575-0e62-483d-b5a8-76ac356fcce7" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "tasmota" ( "d136e0c0-0cbf-4731-aabb-b2201088d6cb" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "UsbRelay" ( "ed0035d3-561c-498e-bdb2-2b574cbd0a2f" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "NetworkDetector" ( "8e0f791e-b273-4267-8605-b7c2f55a68ab" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: Could not load translation "en_GB" for plugin "Senic" ( "413e9d77-335f-4ecf-abbc-8f2a8a399c39" )#033[0m Aug 14 20:07:40 localhost nymead[2546]: #033[33m W | Translations: * Could not load translation "en_GB" for plugin "GenericElements" ( "6e22161e-39b7-4416-8623-39e730721efb" )#033[0m Aug 14 20:07:44 localhost dbus-daemon[278]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service' requested by ':1.54' (uid=0 pid=2546 comm="/usr/bin/nymead -n ") Aug 14 20:07:45 localhost systemd[1]: Starting Time & Date Service... Aug 14 20:07:45 localhost dbus-daemon[278]: [system] Successfully activated service 'org.freedesktop.timedate1' Aug 14 20:07:45 localhost systemd[1]: Started Time & Date Service.

andyjshepherd commented 4 years ago

Has anyone got any update on this? I need to get this working. Unipi is advertised as being used with Nymea and there is even a tutorial based on using it with a hot tub. I went both products knowing that they both are compatible but they are both currently unusable! Thanks

Boernsman commented 4 years ago

As stated in the forum the reported issues are work in progress and it will take some days until the update is beeing released.

In your debug logs I saw you are using the deprecated plug-in 'nymea-plugin-genericinterfaces', I guess this is stated in the Hot Tub tutorial, nevertheless this plug-in has been replaced by nymea-plugin-genericthings, please install this plug-in either by 'sudo apt install nymea-plugin-genericthings' or with the nymea:app update manager.

andyjshepherd commented 4 years ago

Boernsman, Sorry I didn't mean to sound rude and it may have come across that way. Thanks for telling me about the deprecated plug-in.

Thanks for your time on this!

Boernsman commented 4 years ago

The changes are bigger than expected, but I made good progress today.

I guess you are using the nymea image? If so, you need to enable the PWM, which is required for the analog output. Add this line: 'dtoverlay=pwm-2chan' to the file '/boot/config.txt' and reboot. After the reboot this directory should exist: '/sys/class/pwm/pwmchip0' In the next Raspberry image we will add it by default.

The UniPi plug-in crashes nymea, which is constantly restarting, leading to the connection issues your are experiencing.

andyjshepherd commented 4 years ago

Great thank you! I've added the above and the directory does exist. Do I need to enable Experimental or Testing update sources for this update or are you waiting to fix the analog input before you release the update?

Thanks for your help!

Boernsman commented 4 years ago

You will be required to enable the Experimental update channel.

There is still one issue with the Analog Inputs, but this is maybe caused by my faulty hardware. Both Analog input channels display the same voltage, please test if it is also the case on your side. Since I get the same voltage on both channels, I'm not sure if the channel numbering is correct.

Boernsman commented 4 years ago

@shepherdaudio Did you test the new release? Are the analog inputs working?

jakeelee commented 1 year ago

Hi! I cant get the Unipi to show up in "Add things" How do i setup the "Unipi Gateway"???

/Jesper

mzanetti commented 1 year ago

There's a plugin named nymea-plugin-unipi2. You'll need to install that and then you should be able to add your unipi in the usual way of adding things

jakeelee commented 1 year ago

I have the unipi2 plugin installed but it wont show up in things. Double checked that it is installed

jakeelee commented 1 year ago

I read something about setting up the Unipi gateway inside nymea? But im not sure how to do that.

mzanetti commented 1 year ago

Hmm... I have never used this plugin, but looking at the plugin code it seems you'll have to configure some stuff in System Settings -> Plugins -> Unipi.

Once that's done, you can go to Main menu -> configure things -> + and add the unipi model you have.

Perhaps @Boernsman can comment on this?

jakeelee commented 1 year ago

Tried with the latest version of nymea and installed the wiringpi and the unipi2 plugin. Now it shows up but get an error when trying to add Unipi as a thing :(